Hey guys!
So this simple strat made over 7k in under 24 hrs net of commissions with one contract on /ES at the time this was posted,
So, I stumbled upon Mobius's Supertrend and was blown away by its efficiency when paired with other indicators (such as MACD). And since TOS currently does not support Auto Trading
and I have used NT in the past so I was wondering if I could configure my MACD + Supertrend strategy on NT.
I am aware that there is a supertrend indicator already on Ninja Trader (https://ninjatraderecosystem.com/us...complete-collection-of-supporting-indicators/) but I cross-referenced it using the same settings as the one by Mobius and It does not match.
My guess is that the problem is the "offset period" since it cannot be set to zero?
Here is my strategy where I combine super trend and MACD signals on TOS (used on 3 Range on /ES) that generated over 7k (on /ES with 1 contract) in profits in the last 24 hrs net of commissions:
Bullish Strategy:
Bearish Strategy:
Supertrend Code by Mobius:
Some results:
Please help either convert the strategies to Ninja Trader or the Supertrend (Mobius) indicator to NT or tweak the existing Supertrend indicator (link is above) to make it match the one on TOS on the 3 RANGE CHART. Or even, if you find a NT indicator that already emulates the one by Mobius please share it.
ANY help is greatly appreciated as I am trying to make this work ASAP, and I will do my best to answer any questions!
Thanks for all the help guys!
** To set up your 3 Range chart (on PC): go to chart settings (the gear icon @ the top left corner of your chart), click "Time Axis" (found in the top header), change aggregation type to Range, change the price range to 3, and the Range type to range bars.
PS: Sorry BenTen for posting in the wrong forum again :/ I have no idea how to move it to a different forum after I posted it.
So this simple strat made over 7k in under 24 hrs net of commissions with one contract on /ES at the time this was posted,
So, I stumbled upon Mobius's Supertrend and was blown away by its efficiency when paired with other indicators (such as MACD). And since TOS currently does not support Auto Trading
I am aware that there is a supertrend indicator already on Ninja Trader (https://ninjatraderecosystem.com/us...complete-collection-of-supporting-indicators/) but I cross-referenced it using the same settings as the one by Mobius and It does not match.
My guess is that the problem is the "offset period" since it cannot be set to zero?
Here is my strategy where I combine super trend and MACD signals on TOS (used on 3 Range on /ES) that generated over 7k (on /ES with 1 contract) in profits in the last 24 hrs net of commissions:
Bullish Strategy:
Code:
# SuperTrend
input AtrMult = 1.0;
input nATR = 4;
input AvgType = AverageType.HULL;
input PaintBars = yes;
def ATR = MovingAverage(AvgType, TrueRange(high, close, low), nATR);
def UP = HL2 + (AtrMult * ATR);
def DN = HL2 + (-AtrMult * ATR);
def ST = if close < ST[1] then UP else DN;
plot SuperTrend = ST;
SuperTrend.AssignValueColor(if close < ST then Color.RED else Color.GREEN);
AssignPriceColor(if PaintBars and close < ST
then Color.RED
else if PaintBars and close > ST
then Color.GREEN
else Color.CURRENT);
# End Code SuperTrend
#MACD
#
# TD Ameritrade IP Company, Inc. (c) 2007-2020
#
input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input averageType = AverageType.EXPONENTIAL;
input showBreakoutSignals = no;
plot Value = MovingAverage(averageType, close, fastLength) - MovingAverage(averageType, close, slowLength);
plot Avg = MovingAverage(averageType, Value, MACDLength);
plot Diff = Value - Avg;
plot ZeroLine = 0;
plot UpSignal = if Diff crosses above ZeroLine then ZeroLine else Double.NaN;
plot DownSignal = if Diff crosses below ZeroLine then ZeroLine else Double.NaN;
UpSignal.SetHiding(!showBreakoutSignals);
DownSignal.SetHiding(!showBreakoutSignals);
Value.SetDefaultColor(GetColor(1));
Avg.SetDefaultColor(GetColor(8));
Diff.SetDefaultColor(GetColor(5));
Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Diff.SetLineWeight(3);
Diff.DefineColor("Positive and Up", Color.GREEN);
Diff.DefineColor("Positive and Down", Color.DARK_GREEN);
Diff.DefineColor("Negative and Down", Color.RED);
Diff.DefineColor("Negative and Up", Color.DARK_RED);
Diff.AssignValueColor(if Diff >= 0 then if Diff > Diff[1] then Diff.color("Positive and Up") else Diff.color("Positive and Down") else if Diff < Diff[1] then Diff.color("Negative and Down") else Diff.color("Negative and Up"));
ZeroLine.SetDefaultColor(GetColor(0));
UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
#ORDERS
AddOrder(type = OrderType.BUY_TO_OPEN, ST < close and Diff > 0, tradeSize = 1, tickColor = Color.GREEN, arrowColor = Color.GREEN, name = "Long", price = CLOSE);
AddOrder(type = OrderType.SELL_TO_CLOSE, ST > close or Diff < 0, tradeSize = 1, name = "Close", tickColor = Color.GRAY, arrowColor = Color.GRAY, price = CLOSE);
Bearish Strategy:
Code:
# SuperTrend
input AtrMult = 1.0;
input nATR = 4;
input AvgType = AverageType.HULL;
input PaintBars = yes;
def ATR = MovingAverage(AvgType, TrueRange(high, close, low), nATR);
def UP = HL2 + (AtrMult * ATR);
def DN = HL2 + (-AtrMult * ATR);
def ST = if close < ST[1] then UP else DN;
plot SuperTrend = ST;
SuperTrend.AssignValueColor(if close < ST then Color.RED else Color.GREEN);
AssignPriceColor(if PaintBars and close < ST
then Color.RED
else if PaintBars and close > ST
then Color.GREEN
else Color.CURRENT);
# End Code SuperTrend
#MACD
#
# TD Ameritrade IP Company, Inc. (c) 2007-2020
#
input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input averageType = AverageType.EXPONENTIAL;
input showBreakoutSignals = no;
plot Value = MovingAverage(averageType, close, fastLength) - MovingAverage(averageType, close, slowLength);
plot Avg = MovingAverage(averageType, Value, MACDLength);
plot Diff = Value - Avg;
plot ZeroLine = 0;
plot UpSignal = if Diff crosses above ZeroLine then ZeroLine else Double.NaN;
plot DownSignal = if Diff crosses below ZeroLine then ZeroLine else Double.NaN;
UpSignal.SetHiding(!showBreakoutSignals);
DownSignal.SetHiding(!showBreakoutSignals);
Value.SetDefaultColor(GetColor(1));
Avg.SetDefaultColor(GetColor(8));
Diff.SetDefaultColor(GetColor(5));
Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Diff.SetLineWeight(3);
Diff.DefineColor("Positive and Up", Color.GREEN);
Diff.DefineColor("Positive and Down", Color.DARK_GREEN);
Diff.DefineColor("Negative and Down", Color.RED);
Diff.DefineColor("Negative and Up", Color.DARK_RED);
Diff.AssignValueColor(if Diff >= 0 then if Diff > Diff[1] then Diff.color("Positive and Up") else Diff.color("Positive and Down") else if Diff < Diff[1] then Diff.color("Negative and Down") else Diff.color("Negative and Up"));
ZeroLine.SetDefaultColor(GetColor(0));
UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
#ORDERS
AddOrder(type = OrderType.SELL_TO_OPEN, ST > close and Diff < 0, tradeSize = 1, name = "Short", tickColor = Color.LIGHT_RED, arrowColor = Color.LIGHT_RED, price = CLOSE);
AddOrder(type = OrderType.BUY_TO_CLOSE, ST < close or Diff > 0, tradeSize = 1, tickColor = Color.GRAY, arrowColor = Color.GRAY, name = "Close", price = CLOSE);
Supertrend Code by Mobius:
Code:
# Mobius
# SuperTrend
# Chat Room Request
input AtrMult = 1.0;
input nATR = 4;
input AvgType = AverageType.HULL;
input PaintBars = yes;
def ATR = MovingAverage(AvgType, TrueRange(high, close, low), nATR);
def UP = HL2 + (AtrMult * ATR);
def DN = HL2 + (-AtrMult * ATR);
def ST = if close < ST[1] then UP else DN;
plot SuperTrend = ST;
SuperTrend.AssignValueColor(if close < ST then Color.RED else Color.GREEN);
AssignPriceColor(if PaintBars and close < ST
then Color.RED
else if PaintBars and close > ST
then Color.GREEN
else Color.CURRENT);
AddChartBubble(close crosses below ST, low[1], low[1], color.Dark_Gray);
AddChartBubble(close crosses above ST, high[1], high[1], color.Dark_Gray, no);
# End Code SuperTrend
Some results:


Please help either convert the strategies to Ninja Trader or the Supertrend (Mobius) indicator to NT or tweak the existing Supertrend indicator (link is above) to make it match the one on TOS on the 3 RANGE CHART. Or even, if you find a NT indicator that already emulates the one by Mobius please share it.
ANY help is greatly appreciated as I am trying to make this work ASAP, and I will do my best to answer any questions!
Thanks for all the help guys!
** To set up your 3 Range chart (on PC): go to chart settings (the gear icon @ the top left corner of your chart), click "Time Axis" (found in the top header), change aggregation type to Range, change the price range to 3, and the Range type to range bars.
PS: Sorry BenTen for posting in the wrong forum again :/ I have no idea how to move it to a different forum after I posted it.
Last edited: