Jump to content

Amibroker 5.50 full


Recommended Posts

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

Any hints to get a Cr*ck`*d working copy of Amiquote 3?

 

Thanks

indo37

 

I agree. Most members would like to have a Cr*ck`*d working copy of Amiquote together with a Cr*ck`*d working copy of Amibroker. Can some help us?

Link to comment
Share on other sites

Before you ever start Abroker (and especially AQuote) you MUST add amibrokerDOTcom to your local Host!!!!!

If that URL is unreachable for the program everything will run smoothly and perfectly.

 

 

 

But a word of warning: This might not work for everybody.

 

Thanks

Edited by indo37
Link to comment
Share on other sites

Before you ever start Abroker (and especially AQuote) you MUST add amibrokerDOTcom to your local Host!!!!!

 

You can edit the host file with Hostess (http://www.raymarron.com/hostess/); however, the purpose of having a Cr*ck`*d working copy of Amiquote is to download stock quotes. Unless someone knows how to update the JavaScript posted on Amibroker's website. http://www.amibroker.com/newsletter/06-2001.html Amibroker now has an ActiveX function to import Yahoo quotes directly into its database and can be used by modifying this JavaScript. This can be done for any market exchange in the world. Below is an example for the Australian Exchange.

 

/*

** AmiBroker/Win32 scripting Example

**

** File: ASX.js

** Created: Tomasz Janeczko, January 12th, 2000

** Purpose: Download and import quotes from www.australian-stockmarket.com (http://www.australian-stockmarket.com)

** Language: JavaScript (Windows Scripting Host)

**

**

*/

/**************************************************************/

/* Constants */

/**************************************************************/

/* The ticker to check */

ChkTicker = "XAO";

/* The folder where the files will be downloaded */

DestDir = "C:\\ASX\\";

/* The name and the path to downloader program */

DownloaderPrg = "URLGet.exe";

/* Force download - if true causes downloading data file */

/* even if it exists on the local drive */

ForceDownloadFlag = false;

/* URL from where data are downloaded */

/* Note that australian-stockmarket site changed directory for 2001 quotes */

URLPrefix = "http://www.australian-stockmarket.com/updates/";

URLPrefix2001 = "http://www.australian-stockmarket.com/updates2001/";

/* extension of file name, YYYYMMDD will be prepended */

FileExt = ".prn";

/* max number of days to download when history is empty */

nMaxHistoryLen = 365;

/**************************************************************/

/* Main part */

/**************************************************************/

/* Create AmiBroker app object */

AmiBroker = new ActiveXObject( "Broker.Application" );

/* ... and file system object */

FileSys = new ActiveXObject( "Scripting.FileSystemObject" );

WshShell = new ActiveXObject( "WScript.Shell" );

var MiliSecInDay = 24 * 60 * 60 * 1000;

function Download( URL, filename )

{

if( ! ForceDownloadFlag && FileSys.FileExists( filename ) ) return true;

if( WshShell.Run( DownloaderPrg + " " + URL + " " + filename, 0, true ) == 0 ) return true;

WScript.echo("Download of " + URL + " failed." );

return false;

}

function Import( filename )

{

try

{

AmiBroker.Import( 0, filename, "prnn.format" );

}

catch( e )

{

return false;

}

/* refresh ticker list and windows */

AmiBroker.RefreshAll();

return true;

}

function CheckFolder()

{

if( ! FileSys.FolderExists( DestDir ) )

{

FileSys.CreateFolder( DestDir );

}

}

function GetNumberOfDaysToLoad()

{

var Today = new Date();

var LastDate = new Date();

LastDate.setDate( LastDate.getDate() - nMaxHistoryLen ); // one year

if( AmiBroker.Stocks.Count > 0 )

{

nQty = AmiBroker.Stocks( ChkTicker ).Quotations.Count;

if( nQty > 0 )

{

LastDate = new Date( AmiBroker.Stocks( ChkTicker ).Quotations( nQty - 1 ).Date );

}

}

 

// the difference is in milliseconds

return ( Math.floor( (Today - LastDate)/MiliSecInDay ) );

}

function IsValidDatabase()

{

if( AmiBroker.Stocks.Count > 0 )

{

try

{

return AmiBroker.Stocks( ChkTicker ).Ticker == ChkTicker;

}

catch( e )

{

WScript.echo("The database currently loaded into AmiBroker does not have " + ChkTicker + "\nSo I guess this is not correct database.\nUpdate failed.");

}

}

return false;

}

function Main()

{

bOK = true;

if( ! IsValidDatabase() ) return;

 

var CurDate = new Date();

var NumDays = GetNumberOfDaysToLoad();

WScript.echo("Your database is " + NumDays + " day(s) old.\n" + (NumDays > 0 ? "Downloading missing quotes" : "No update is needed" ) );

CheckFolder();

for( i = 0; i < NumDays; i++ )

{

if( CurDate.getDay() > 0 && CurDate.getDay() < 6 )

{

// bussiness day

y = CurDate.getFullYear();

m = CurDate.getMonth() + 1;

d = CurDate.getDate();

bOK = true;

filename = y + ( m < 10 ? "0" : "" ) + m + ( d < 10 ? "0" : "" ) + d + FileExt;

URL = URLPrefix + filename;

if( y == 2001 && URLPrefix2001 != "" )

{

URL = URLPrefix2001 + filename;

}

if( Download( URL, DestDir + filename ) )

{

if( ! Import( DestDir + filename ) ) bOK = false;

}

else

{

bOK = false;

}

if( ! bOK && WshShell.popup( "The download and/or import of the " + filename + " has failed.\nThis can be because the data are not available or network connection problem.\nDo you want to abort?" , 0, "Abort updating", 4 + 256 ) == 6 )

{

break;

}

}

CurDate.setDate( CurDate.getDate() - 1 );

}

if( bOK ) WScript.echo("Update script finished. Your database is now up-to-date" );

else WScript.echo("Update script finished. There were, however, some errors during download/import");

}

Main();

Edited by Bill Bundle
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...