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

Re: [amibroker] Does Amibroker always loop through the array?



PureBytes Links

Trading Reference Links

Hello,

No your code does not loop.

It is calculated ONCE.

Statements involving subscript operators like this:
Close[BarCount-1]/Close[BarCount-200]-1;

operate on SINGLE values referred by subscripts.

If you want one line per symbol, you should simply go to AA
window and select RANGE
"N LAST QUOTATIONS" and enter 1
into "N" field.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "tomsoyer_php" <tom.soyer@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, February 06, 2006 5:31 AM
Subject: [amibroker] Does Amibroker always loop through the array?


> Hi,
> 
> I am new to Amibroker and just starting to learn AFL. I created a 
> custom exploration to practice coding, and something very surprising 
> happened. Here is the code:
> 
> test=Close[BarCount-1]/Close[BarCount-200]-1;
> Filter = test>0;
> AddColumn (test,"Test");
> 
> There is no syntax error, and the explore run fine when it was 
> applied to all symbols and all qoutations. However, the results are 
> not expected. It seems that for every symbol, the computer does not 
> stop after the initial calculation and kept going down the Close 
> array until the variable test is no longer less than zero. Is this 
> the normal behavior for the Amibroker software? If so, is it even 
> possible in Amibroker to calculate just once for each symbol, 
> instead of going through the array?
> 
> Thanks,
> 
> Tom
> 
> 
> 
> 
> 
> 
> 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
> 
> 
> 
> 
> 
> 
> 
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/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/