Alpharetta, GA
Experience: Intermediate
Platform: ninja
Broker: Mirus / Zenfire
Trading: ES
Posts: 234 since Jun 2009
Thanks Given: 28
Thanks Received: 40
|
The code pasted below is for a moving average that I use in TradeStation.
Is is possible and easy to create this code in ninjascript for NT7?
inputs: Price( Close), FastLength( 50), SlowLength( 200);
inputs: UpColor( green), DownColor( Red) , width(1);
//Plot4( Average( Price, FastLength ), "50" ) ;
Plot2( Average( Price, SlowLength ), "200" ) ;
//if Plot4 > Plot4[1] then
// SetPlotColor( 4, cyan )
//else
//if Plot4 < Plot4[1] then
// SetPlotColor( 4, blue );
if Plot2 > Plot2[1] then
SetPlotColor( 2, UpColor )
else
if Plot2 < Plot2[1] then
SetPlotColor( 2, DownColor );
if Plot2 > Plot2[1] then
SetPlotWidth(2, width)
else
if Plot2 < Plot2[1] then
SetPlotWidth(2, width);
I saw that the double moving average in the indicator download section does not work in NT7 for some reason.
Any help is appreciated.
Thanks,
Todd
|