I want to be able to see the current value for the SD slope on my chart. This is the code I am starting with, but it gives me values on top of every bar, and I would prefer just the last one.
timeframe(1mn)
il = ((LinearRegressionSlope[120](close))/close)*10000 //
DRAWTEXT("#il#", barindex, high+.2, Dialog, Standard, 12) COLOURED(255,0,10)
RETURN
Try replacing high+.2 with:
high+.2*pipsize
That helps in one regard but I would like to just have the value over the last candle, not all of them.
Simply add this as first line:
Defparam DrawOnLastBarOnly = true