Attila
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
TSSuperTrend trailing stop
Collapse
X
-
TSSuperTrend trailing stop
Hi, I want to create a trailing stop uses TSSupertrend data, but I get an error in the strategy editor. It won't work any method I've tried. Thanks!
Attila -
Hello Attila,
Thank you for your post and welcome to the NinjaTrader Support Forum!
Can you please specify the error that you are getting?
As I do not have the TSSupertrend indicator, I will just use the PriorDayOHLC indicator as an example. Let's say I want to use the prior day's High for my trailing stop parameter.
I would first need to set a user defined variable to this value in one of my set tabs:
Variable0 = PriorDayOHLC().PriorHigh[0]
Then, in the stops and targets section, I'd add a trailing stop that uses Variable0 as its Value. While this is nonsensical, this is how one would pull data from an indicator to use in a trailing stop in the Strategy Wizard.
Please, let us know if we may be of further assistance.Zachary G.NinjaTrader Customer Service
-
Hello meszi9,
So we may better assist you, please export your strategy by navigating to File -> Utilities -> Export NinjaScript... -> [double click your strategy] -> Type in "Support" as the file name at the top -> Press Export
Then create a new email to platformsupport[AT]ninjatrader[DOT]com and attach the .zip file you exported (normally this can be found in (My) Documents\NinjaTrader 7\bin\Custom\ExportNinjaScript). Please make sure to include this ticket number in the body of your email: #1346423
Thank you in advance.Michael M.NinjaTrader Quality Assurance
Comment
-
Hello brucelevy,
Can you please compile your NinjaScript files and check if they contain any errors.
-Open NinjaTrader
-From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
-Select any indicator and double click on it (we need only to open and compile one script to see all compile errors for all files).
-A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
-At the bottom of the window a new section will appear where you can find the error locations.
-From there you have the option to comment out offending code sections, remove the complete indicator or debug it to be able to compile again.
If you are unsure as to what the error is indicating, please send me a screenshot of the error with the name and description fields clearly readable.
The TSSuperTrend indicator by Roonius can be called in the following ways:
Please note this may be different if you are not using the version made by Roonius (such as the optimized version by Zondor).Code:TSSuperTrend(int length, MovingAverageType mAType, double multiplier, int smooth, SuperTrendMode sTMode) TSSuperTrend(Data.IDataSeries input, int length, MovingAverageType mAType, double multiplier, int smooth, SuperTrendMode sTMode)
Thank you in advance.Michael M.NinjaTrader Quality Assurance
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment