Hello,
In real time the indicators are calculated as the price raises and low in the last candle. Therefore just as the price the indicator to oscillate until it finalizes the candle and it leaves the following one.
I need that the indicator only calculates once the candle has finalized. That it sentences must add to the following indicator.
BG2a=HHV(LLV(L,6)+ATR(6),6);
BR2a=LLV(HHV(H,6)-ATR(6),6);
Candlecolor = IIf(Close>BG2a ,colorBlue,IIf(Close < BR2a,colorRed,colorYellow));
He=EMA(High,5);
Le=EMA(Low,5);
Ce=EMA(Close,5);
Ae=(He+Ref(He,-1)+Ref(He,-2)+Ref(He,-3)+Ref(He,-4)+
Le+Ref(Le,-1)+Ref(Le,-2)+Ref(Le,-3)+Ref(Le,-4)+
Ce+Ref(Ce,-1)+Ref(Ce,-2)+Ref(Ce,-3)+Ref(Ce,-4))/15;
Plot(Ae,"EMA Average:",CandleColor,styleLine+styleThick);
Greetings,
In real time the indicators are calculated as the price raises and low in the last candle. Therefore just as the price the indicator to oscillate until it finalizes the candle and it leaves the following one.
I need that the indicator only calculates once the candle has finalized. That it sentences must add to the following indicator.
BG2a=HHV(LLV(L,6)+ATR(6),6);
BR2a=LLV(HHV(H,6)-ATR(6),6);
Candlecolor = IIf(Close>BG2a ,colorBlue,IIf(Close < BR2a,colorRed,colorYellow));
He=EMA(High,5);
Le=EMA(Low,5);
Ce=EMA(Close,5);
Ae=(He+Ref(He,-1)+Ref(He,-2)+Ref(He,-3)+Ref(He,-4)+
Le+Ref(Le,-1)+Ref(Le,-2)+Ref(Le,-3)+Ref(Le,-4)+
Ce+Ref(Ce,-1)+Ref(Ce,-2)+Ref(Ce,-3)+Ref(Ce,-4))/15;
Plot(Ae,"EMA Average:",CandleColor,styleLine+styleThick);
Greetings,