I am new on NinjaTrader and I don't know how to make an indicator but I need to programming a new one. It is very simple.
The indicator is composed by 3 simple moving averages. The SMA are 3, 8 and 20 but all of them are divided by the SMA 8. So the SMA8 will be plotted as horizontal line and the others two SMA will be the SMA(3)/SMA(8) and SMA(20)/SMA(8), all 3 SMAs are plotted on the same panel. Could someone help me with this indicator.
The SMA(3)/SMA(8) is blue, the SMA(20)/SMA(8) is red and the SMA(8)/SMA(8) will be an horizontal white line.
I have this indicator on my Tradingview website and the code that works perfectly is:
study("Didi Index")
sma1=sma(close, 3)/sma(close,8)
sma2=sma(close, 8)/sma(close,8)
sma3=sma(close, 20)/sma(close,8)
plot(sma1, style=line)
plot(sma2, style=line)
plot(sma3, style=line)
The problem is that I don't have an idea of how can I do it on NinjaTrader 8.
This is how it is appear:
Someone can help me?
Comment