Hi everyone, I have a question about the use of iHighest
A compile results in zero errors.
I want the indicator to place an arrow at the bar that meets the criteria, but it seems the third and fourth condition are not taken into account, so I get arrows at every candle that meets the first two criteria.
if(iMA(NULL, PERIOD_M15, MainTrend, 0, MODE_EMA, PRICE_CLOSE, 2+i) < iMA(NULL, PERIOD_M15, MainTrend, 0, MODE_EMA, PRICE_CLOSE, 1+i)
&& iMA(NULL, PERIOD_M15, 21, 0, MODE_EMA, PRICE_CLOSE, 2+i) > iMA(NULL, PERIOD_M15, 21, 0, MODE_EMA, PRICE_CLOSE, 1+i)
&& iVolume(NULL, PERIOD_M15, i) >= iHighest(NULL, PERIOD_M15,MODE_VOLUME, 100, i)
&& iLow(NULL, PERIOD_M15, i) <= iLowest(NULL, PERIOD_M15,MODE_LOW,50,i)
Can anyone tell me what I'm doing wrong here?
Robert
A compile results in zero errors.
I want the indicator to place an arrow at the bar that meets the criteria, but it seems the third and fourth condition are not taken into account, so I get arrows at every candle that meets the first two criteria.
if(iMA(NULL, PERIOD_M15, MainTrend, 0, MODE_EMA, PRICE_CLOSE, 2+i) < iMA(NULL, PERIOD_M15, MainTrend, 0, MODE_EMA, PRICE_CLOSE, 1+i)
&& iMA(NULL, PERIOD_M15, 21, 0, MODE_EMA, PRICE_CLOSE, 2+i) > iMA(NULL, PERIOD_M15, 21, 0, MODE_EMA, PRICE_CLOSE, 1+i)
&& iVolume(NULL, PERIOD_M15, i) >= iHighest(NULL, PERIOD_M15,MODE_VOLUME, 100, i)
&& iLow(NULL, PERIOD_M15, i) <= iLowest(NULL, PERIOD_M15,MODE_LOW,50,i)
Can anyone tell me what I'm doing wrong here?
Robert