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

[amibroker] Hold and Valuewhen functions



PureBytes Links

Trading Reference Links

I wondered whether you could tell me where I'm wrong with this basic 
formula. I want it to hold my setup for 5 bars and then buy once the 
high is more than 15% higher than the setup price. I'm having 
difficulty with the hold and value when functions.
Thanks in advance.


Setup = C<BBandBot (C,20,2);
Buyzone= Hold(Setup,5); //What I'm trying to say here is once I have a 
setup, hold it up to 5 periods//
SetupPrice = ValueWhen (Setup,H); //What I'm trying to say here is the 
setup price is the high of the setup//
Buy = Buyzone AND H>SetupPrice*1.15;
Sell = 0;



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Transfer from your equities account.  
Receive up to $1,000 from GFT. Click here to learn more.
http://us.click.yahoo.com/aZttyC/X_xQAA/cosFAA/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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/