Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Super Trend For Ninja Trader Needed
Collapse
X
-
supertrend stop
Deart programmers,
I would like to use the supertrend for close my open positions.
(It should seems like an ATR trailing stop, with (h-l/2 value))
Somebody can write it for me?
tnx
Psycho
-
supertrend trail stop
Hello,
I would like to use the supertrend to closing my open trades.
It should seems like an ATR trailing stop.
Somebody can help me, how can I rebuild the script for it?
tnx
Psycho
Leave a comment:
-
ok, that was wierd, i recompiled and now it worked lol, damn it. thanks for your quick reply Bertrand
Leave a comment:
-
kabott, do you get any error messages in the NT log tab when the indicator fails to display?
Leave a comment:
-
hi, i been trying to call a supetrend from inside an other indicator, i created a new plot called "MarketAnalizer" that goes 1 if its up or -1 if its down (see image) looks like its working fine, tho wen i try to call it from the other indicator this one just goes empty, it dissapears, can someone gave me hand with this? ill appreciate it.
this is my "marketanalizer" code (looks like its working fine):
this is how i call the supertrend:
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "EM"));
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "LT"));
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Black"));
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "SPTrend"));
Overlay = false;
}
protected override void OnBarUpdate()
{
if (CurrentBar < 50)return;
double T3O = T3(Open,4,3,0.7)[0];
double T3C = T3(Close,4,3,0.7)[0];
double ST = SuperTrend_Regular (Close,50, 7).MarketAnalyzerTrend[0];
SPTrend.Set(0);
EM.Set(center);
LT.Set(center);
Black.Set(center);
if (T3O >= T3C)
PlotColors[1][0]=cDown;
else
PlotColors[1][0]=cUp;
if (T3O >= T3C && Close[0] < Open[0])
PlotColors[0][0]=cDown;
else if (T3O >= T3C && Close[0] > Open[0])
PlotColors[0][0]=colorDis;
else if (T3O <= T3C && Close[0] > Open[0])
PlotColors[0][0]=cUp;
else if (T3O <= T3C && Close[0] < Open[0])
PlotColors[0][0]=colorDis;
if ( ST > 0)
PlotColors[2][0]=cUp;
else if ( ST < 0)
PlotColors[2][0]=cDown;
}
if i remove the Supetrend calling part the rest of the plots re-appear and seems to work fine again. heelppppp!
Leave a comment:
-
You would have to find some way of knowing which plot was active and always use that one. You could make another ( dummy ) plot within SuperTrend and access that.
But are you using this in a strategy, do you want it for a trailing stop? If so. there is an easier way.
Leave a comment:
-
Ah right, think I know the one then.
The SuperTrend line is actualy made from two different plots, one Red one Green. You need to do something like -
double STUp = SuperTrend(14, 1.4, false).UpTrend[0];
and
double STDown = SuperTrend(14, 1.4, false).DownTrend[0];
to get both. The .Uptrend and .Downtrend give you access to the public plots that you can find in the 'Properties' section, near the bottom of the code.
Parameters are length, multiplier, show arrows?
If you want to use this as a trailing stop there is an easier way.
Leave a comment:
-
Hi kabbott
Been doing some stuff with supertrend so I was going to take a look at this. Where did you find the Supertrend_Regular indicator?
Leave a comment:
-
-
did you also check the behaviour with the different types of MovingAverageType, like HMA,SMA,EMA ? because these will have a great impact on the switching of TSSupertrend.
I'm not sure, but it is possible that there are core-logic code differences between the old and new supertrend, which could also explain these differences...
Marco
Leave a comment:
-
Thanks for your reply.
I changed the multiplier to a very low number but still doesn't get any closer to my old supertrend.
any other suggestions?
thanks
Leave a comment:
-
Alan,
first of all, it's not my SuperTrend, credits go to all the contributors at the beginning of this thread.....;Marco, how do you accelerate the signals w/your supertrend? what parameters would you change?
What SuperTrend for NT6.5 are you referring to ? Is it SuperTrend.cs ?
If you compare SuperTrend and TSSuperTrend, you will find that TSSuperTrend (the version posted in post #346) has an additional setting for MovingAverageType in the indicator parameters. That's probably why you see a difference between these 2 versions.
I recommend you to test the different MovingAverageType settings, and look for a match with the older SuperTrend.
To make TSSSuperTrend switch faster, lower the Multiplier setting in the indicator parameters.
Marco
Leave a comment:
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
668 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
377 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
110 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
575 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
580 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Leave a comment: