@Iceburgh Sure thing. Here you go:
Code:
# TMO ((T)rue (M)omentum (O)scilator)
# Mobius
# V01.05.2018
# hint: TMO calculates momentum using the delta of price. Giving a much better picture of trend, tend reversals and divergence than momentum oscillators using price.
# Modified by BenTen 03/24/2021: added arrows to upper chart
input length = 14;
input calcLength = 5;
input smoothLength = 3;
def o = open;
def c = close;
def data = fold i = 0 to length
with s
do s + (if c > getValue(o, i)
then 1
else if c < getValue(o, i)
then - 1
else 0);
def EMA5 = ExpAverage(data, calcLength);
def Main = ExpAverage(EMA5, smoothLength);
def Signal = ExpAverage(Main, smoothLength);
plot up = if Main crosses above Signal then low else double.nan;
plot down = if Main crosses below Signal then high else double.nan;
up.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
down.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);