Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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
-
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 -
Code:Add(SMA(14));
Cal H.NinjaTrader Customer Service
Comment
-
Originally 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 AaronKoRn, Today, 09:49 PM
|
0 responses
6 views
0 likes
|
Last Post
by AaronKoRn
Today, 09:49 PM
|
||
Started by carnitron, Today, 08:42 PM
|
0 responses
8 views
0 likes
|
Last Post
by carnitron
Today, 08:42 PM
|
||
Started by strategist007, Today, 07:51 PM
|
0 responses
9 views
0 likes
|
Last Post Today, 07:51 PM | ||
Started by StockTrader88, 03-06-2021, 08:58 AM
|
44 responses
3,975 views
3 likes
|
Last Post
by jhudas88
Today, 06:59 PM
|
||
Started by rbeckmann05, Today, 06:48 PM
|
0 responses
9 views
0 likes
|
Last Post
by rbeckmann05
Today, 06:48 PM
|
Comment