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

[amibroker] How do I reference the last condition



PureBytes Links

Trading Reference Links

How do I reference only the last condition? In this case, say I want to buy when price crosses above the last pivot high or below the last pivot low. I define pivot high as:
 
Phigh = ( H > Ref (H, 1) AND H > Ref (H, -1) );
 
I want to buy if price crosses the last occurence of this and not an occurence 20 bars ago that could be at a lower price. So Phigh is only the last Phigh. Hope this makes sense.
 
Thanks in advance,
James


Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. __._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___