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

Re: [amibroker] Sequential higher highs



PureBytes Links

Trading Reference Links

try something like this
per = optimize("closes", 3, 1, 10, 1 );
Buy = sum( C > Ref(C, -1)  , per )==per;

--
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 2/20/06, Keith Osborne <kosborn3@xxxxxxxxxxxxxx> wrote:
> Hi, the following gives me a buy condition if there are 3 successive
> higher highs.
>
> Buy = C > Ref(C, -1)  AND Ref(C, -1) > Ref(C, -2) AND Ref(C, -2) >
> Ref(C, -3); /* 3 increased closes in a row */
>
> What I would like to do is optimize or param this so that I can backtest
> over a shorter/longer lookback, say 2 to 6 periods. How can I do this
> other than by a long string of Ref(c, -X) type conditions. Do I have to
> enter the world of loops (something I can't do).
>
> TIA.........Keith
>
>
>
>
> 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/