Condition = y ? ValueWhenTrue : ValueWhenFalse
if( y is true )
{
Condition = ValueWhenTrue
}
else //when y is false
{
Condition = ValueWhenFalse
}
y = na( "abc" ) //Output: y = 0 becase abc is not a number
y = na( 15 ) //Output: y = 1 becase 15 is a number
y = na( Null ) //Output: y = 0 becase Null is not a number
if( Current element of "haopen" array is NOT A NUMBER ) //Could be a Null for being empty
{
Current "haopen" element = ( Current "Open" + Current "Close" ) / 2
}
else //Current element of "haopen" array is A NUMBER
{
Current "haopen" element = ( Current "haopen" + Current "haclose" ) / 2
}
_SECTION_BEGIN( "Heiken-Ashi" );
//Heiken-Ashi Candle Calculations
HaClose = ( O + H + L + C ) / 4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "", colorDefault, styleCandle | styleNoLabel, Null, Null, 0, 0 );
_SECTION_END();
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
B | Help needed in coding amibroker afl and back testing for payment | AmiBroker | 1 | |
P | Help Needed in AFL Amibroker | AmiBroker | 0 | |
Amibroker afl sma ema needed | AmiBroker | 1 | ||
K | amibroker afl needed for intraday trade | AmiBroker | 0 | |
V | Amibroker Help Needed For Afl | AmiBroker | 13 |