Loop bar ema
-
It is posible conver this qml4 to fxdrema
int Barras = 400
for(int i=1; i<=Barras+1; i++) {
double EMA200value = NormalizeDouble( iMA(NULL,0,MovingPeriod,MovingShift,MODE_EMA,PRICE_MEDIAN,i) ,5);if (EMA200value <= High[i] && EMA200value >= Low[i]) { -
I dont know what you need to do with this code ... because now:
for loop is looking into history of 400 candles, if somewhere EMA is inside candle
... and if it is inside, IF condition is true ...
result is, that you can be sure that this MA is most time inside candle
...
question is, what you will to do with this history? .... if you need only look if EMA is inside candle, just do this:https://fxdreema.com/shared/T5toN1U8d


-
There is a block "Indicator moves within limits" that does something like this under the hood