[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Script to automate scanning



PureBytes Links

Trading Reference Links

Hi,
I have written a js script that automate scanning a number of afl files every minute.
I want a way to get out of the loop based on some kind of user input.
So I came up with the idea that user click on "cancel" during a scan,  but this is where I'm stuck, because I dont know how this can be detected.
I tried using the return value of scan(), but no luck. Can anybody help?
 
Ami = new ActiveXObject( "Broker.Application" );
AA = Ami.analysis;
for(i = 1; i <= 1000; i++)
{
 AA.LoadFormula("Formulas\\systems\\foreverUv5.afl");
 result = AA.scan();
 if (result) break;
 AA.LoadFormula("Formulas\\systems\\DailyComposite.afl");
 result = AA.scan();
 if (result == 0) break;
 AA.LoadFormula("Formulas\\systems\\BB squeezeV3.afl");
 result = AA.scan();
 if (result == 0) break;
 WScript.sleep(60000);
}
 

Paul Ho



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software Stock investment software


YAHOO! GROUPS LINKS