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

Re: [amibroker] Bitten the bullet on loops



PureBytes Links

Trading Reference Links

Graham.

I think your last comment about loops makes some sense to me and is in fact 
exactly the issue I have been working on.  Sometimes you need variable x to 
define variable y, but you can't define x until you define y !!

For instance:

Buy = Buycond and NumberofPriorBuys < 3;
NumberofPriorBuys = sum(buy, barssince(daystart));

But how can I use a loop to solve this mess?

Thanks in advance...
----- Original Message ----- 
From: "Graham" <kavemanperth@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, September 29, 2005 7:23 PM
Subject: Re: [amibroker] Bitten the bullet on loops


> Loops are best used when you need to refer to a previous value of a
> variable in calculating the current value of that same variable.
> There are other cases where loops are preferable, but I first try
> "normal" AFL functions and methods first. If at first they don't
> succeed get loopy
>
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
>
>
> On 9/30/05, Charles Stangor <cstangor232@xxxxxxxxxxxxxxxxxx> wrote:
>> Are you guys writing loops because you just can't do what you want using 
>> the
>> regular ++ code?  I'm getting convinced it's the way to go.   Thanks for 
>> the
>> great code.
>
>
>
> 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/