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 Hwop38, 05-04-2026, 07:02 PM
|
0 responses
164 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
319 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
246 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
350 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
179 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment