I adapted the script below to run an exploration and it works great, 
except I can't figure out how to close the "Automatic Analysis" box 
at the end of the script - can anyone help?

Thank you for your time!


/*Simple jScript to perform exploration using rules in TEST.AFL,
  produces text file of results as TEST.TXT   Use at own risk!*/
var AB, AA;
AB = new ActiveXObject("Broker.Application");
AA = AB.Analysis;
AA.ClearFilters(); 
AA.ApplyTo = 0; // use symbols
AA.RangeMode = 1; 
AA.RangeN=1; //last 1 trading days
AA.ApplyTo = 2; // use filters  
AA.Filter(0,"watchlist") = 0; /* watch list number*/;

AA.LoadFormula( "C:\\AmiBroker\\TEST.AFL" )  //use this test
AA.Explore();
AA.Export ( "C:\\AmiBroker\\TEST.TXT" ); // generate report


Reply via email to