Hi,
Can someone help me with this script? I want to change the ticker in
the active window. At the moment I do it as below:
AS.Open("FCX");
AS.Close();
AS.Open("XTO");
but I it is not a very efficient way. I want to add a timer and cycle
all symbols from a watchlist with a 3 seconds delay.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
AB = new ActiveXObject("Broker.Application");
/* retrieve automatic analysis object */
AA = AB.Analysis;
AS = AB.Documents;
AT = AB.Stocks;
AW = AB.Windows;
/* load formula from external file */
AA.LoadFormula("C:\\Program
Files\\Amibroker\\Formulas\\Scans\\EODExplorer.afl");
/* optional: load settings */
// AA.LoadSettings("the_path_to_the_settings_file.abs");
/* setup filters */
/* backtest over symbols present in market 0 only (zero-based number) */
AA.ClearFilters();
AA.Filter(0,"watchlist") = 6;
//AA.Filter( 0, "market" ) = 0;
// uncomment line below to
// AA.Filter( 1, "market" ) = 2; // exclude 2nd market
/* set apply to and range */
AA.ApplyTo = 2; // use filters
AA.RangeMode = 0; // use all available quotes
/* run backtest and display report */
//AA.Backtest( 0 ); // IMPORTANT: you need to specify parameter 0 to
get PORTFOLIO backtest
//AA.Report(""); // empty file name means display report
AS.Open("FCX");
AS.Close();
AS.Open("XTO");