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

Fw: [amibroker] How to express some conditin occurred in the last ten bars



PureBytes Links

Trading Reference Links

There's a function called BarsSince.  
Hope this helps
JOE L.    

// To demonstrate use of BarsSince and SelectedValue..

SignalArray = Cross(MA(C,10),MA(C,20));

if( SelectedValue(BarsSince(SignalArray)< 10));

{

// your work

a = 30;

}

A = SelectedValue(BarsSince(SignalArray));

Plot(C,"Close",colorBlack,styleThick);

Plot(MA(C,20),"20MA",colorBlue,styleLine);

Plot(MA(C,10),"10MA",colorGreen,styleLine);

Title = "Crossing Point = " + WriteVal(Signalarray,8.3) + " Bars Since Crossing Point =" + WriteVal(A);

BARSSINCE
- bars since

Trading system toolbox

SYNTAX BarsSince( ARRAY )
RETURNS ARRAY
FUNCTION Calculates the number of bars (time periods) that have passed since ARRAY was true (or 1)
EXAMPLE barssince( macd() < 0 )
SEE ALSO
----- Original Message -----
From: itmwh
Sent: Sunday, May 20, 2007 5:20 AM
Subject: [amibroker] How to express some conditin occurred in the last ten bars

How to express in AFL that there is at least one occurance of crossing
of ma1 and ma2 in the last ten bars ? thanks a lot

__._,_.___

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

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

__,_._,___