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

[amibroker] Re: Script to automate scanning



PureBytes Links

Trading Reference Links

Hello,

Braek in Afl loop is not available as in c++
I think you must use something like this:

Breakloop=FALSE;
for(i = 1 and Breakloop; i <= 1000; i++)
{
AA.LoadFormula("Formulas\\systems\\foreverUv5.afl");
result = AA.scan();
if(result)
Breakloop=TRUE;

AA.LoadFormula("Formulas\\systems\\DailyComposite.afl");
result = AA.scan();
if (result == 0) Breakloop=TRUE;



}

> 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





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/