Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Add horizontal lines to indicator in strategy script
Collapse
X
-
Alexstox,
I would recommend that you create a double variable and assign it the MAX or MIN value of the ATR and then pass that value through a DrawHorizontalLine
http://www.ninjatrader.com/support/h...aximum_max.htm
http://www.ninjatrader.com/support/h...zontalline.htmCal H.NinjaTrader Customer Service
Comment
-
Dear Cal, can you show me an example?Originally posted by NinjaTrader_Cal View PostAlexstox,
If you want the zig zag effect you will need to create a plot class and then pass through the MAX or MIN values to the plot.
Code:Add(new Plot(Color.Blue, PlotStyle.Line, "myPlot"));
Code:myPlot.Set(MAX(ATR(14), 5)[0]);
Comment
-
DrawOnPricePanel = false;
Put this in the Initialize() method.
http://www.ninjatrader.com/support/h...pricepanel.htmCal H.NinjaTrader Customer Service
Comment
-
Alexstox,
You won't be able to use DrawOnPricePanel in the Strategy script. However, what you can do is create an indicator that does all this functionality and then call that indicator from the Strategy.
Example of adding the SMA to a Strategy -
Otherwise, you would need to use the plot option that I outlined in posts 6 and 8Code:Add(SMA(14));
Cal H.NinjaTrader Customer Service
Comment
-
Dear Cal, to import it via NT I tried to zip it, than import. NT shows message that everything imported OK. But I didn't find that indicator when tried to edit it from Tools-Edit. Than I just copy your file to NinjaTrader 7\bin\Custom\IndicatorOriginally posted by NinjaTrader_Cal View PostSample is attached.
Now I can Edut it, but can't add it to chart, because there is no "Test2" or something like it in indicators' list.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
601 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
347 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 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
559 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
558 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment