Greetings Experts,
Trying to run Optimization externally:
AB = new ActiveXObject( "Broker.Application" ); // creates AmiBroker object
try
{
NewA = AB.AnalysisDocs.Open( "C:\\TradingApps\\AmiBroker\\Formulas\\Custom\\# EOD Scheme\\OptimizerAPX.apx" );
if( NewA )
{
NewA.Run( 4 ); // starts optimizer
while( NewA.IsBusy ) WScript.Sleep( 500 ); // check IsBusy every 0.5 second
NewA.Close(); // close new Analysis
}
}
catch( err )
{
WScript.echo( "Exception: " + err.message ); // display error that may occur
}
For some symbols the above script is getting halted because of the below precautionary warning.
Is there a solution using Batch or any other OLE command?
Thank you