I get the code from trading view and here is it:
// Simple average used for bias in any market on any timeframe. Its purpose is to provide the overall momentum bias you should have when trading an instrument. It works across all markets and all timeframes.
// © xkavalis
//@version=4
study(title="RexDog Average", shorttitle="RDAVG", overlay=true)
atr_range_offset=input(3, title="ATR Range Offset")
src = close
sma_200 = sma(src, 200)
sma_100 = sma(src,100)
sma_50 = sma(src,50)
sma_24 = sma(src,24)
sma_9 = sma(src,9)
sma_5 = sma(src, 5)
sma_avg = (sma_200 + sma_100 + sma_50 + sma_24 + sma_9 + sma_5 ) / 6
cus_line_width = 2
plot(sma_avg, title="SMA Avg", color=color.yellow, linewidth=cus_line_width)
It’s very simple thing but I think i need a lot of time to learn how to build something at ninjatrader
if anybody can help me I will appreciate that
Comment