Hello all,
I'm really confused by this, see screenshot:
It just doesn't make any sense to me why this stops plotting. The code is cut out of and modified from the NextSignals trend following strategy, this is the code creating the above plot:
This AMA is a crucial part of another indicator I am using (which takes the AMA plot value as an input for another function). I would be very grateful if anyone has any idea about how or why this stopped plotting for the current day while working for previous days.
I'm really confused by this, see screenshot:
It just doesn't make any sense to me why this stops plotting. The code is cut out of and modified from the NextSignals trend following strategy, this is the code creating the above plot:
Code:
def direction;
def volatility;
def ER;
def length = 2;
direction = AbsValue(close – close[length]);
volatility = Sum(AbsValue(close – close[1]), length);
ER = AbsValue((close – Lowest(low, length)) –
(Highest(high, length) – close)) / (Highest(high,
length) – Lowest(low, length));
def SlowSF = 0.2222;
def ScaledSF = ER * (0.4 – SlowSF) + SlowSF;
def AMA = CompoundValue(1, AMA[1] + Sqr(ScaledSF) * (close – AMA[1]),
close);
plot MAA = AMA;
MAA.assignvaluecolor(if OHLC4 > AMA then Color.White
else Color.Light_Red);
MAA.setlineweight(2);
MAA.hidebubble();
MAA.hidetitle();
This AMA is a crucial part of another indicator I am using (which takes the AMA plot value as an input for another function). I would be very grateful if anyone has any idea about how or why this stopped plotting for the current day while working for previous days.