Hi,
I am using the coral moving average which flashes green and red. Is there something that measures over a set period and would tell you which is greater…………….the red side of the indicator or the green side in percentage terms say?
Or is there a way of setting the indicator for that?
Thanks
I’ll make an example with a 10-period Simple Moving Average (you will easily replace it with any other one of your choice) over the last N bars:
N = 20
Sma = average[10,0](close)
Green = Sma > Sma[1]
Red = Sma < Sma[1]
tallyG = summation[N](Green)
tallyR = summation[N](Red)
Return tallyG AS "Green SMA",tallyR AS "Red SMA"
Set the two returned values as (coloured) histograms, if you don’t love lines.