![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: May 2008
Posts: 221
Thanks: 12
Thanked 2 times in 2 posts
|
I'm using a strategy with this in the Initialize section;
Add(StrategyPlot(0)); StrategyPlot(0).Plots[0].Pen.Color = Color.Lime; StrategyPlot(0).PanelUI = 3; I am unable however to find the syntax to designate the plot style (bar, line, etc) and width (1,2, etc) for this plot. Would you please point me in the direction where I can find this? thanks, Safetrading |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
GM Safetrading, please try with the snippets shown in our tip for adding indicators to strategies - http://www.ninjatrader.com/support/f...ead.php?t=3228
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Senior Member
Join Date: May 2008
Posts: 221
Thanks: 12
Thanked 2 times in 2 posts
|
I received the link from you regarding the Plot syntax. It was helpful except for one item. I did not see anything referring to how to designate the PlotStyle, ie, Line, Bar, etc. I tried using the following which was a similar format to the other Pen.XXX, but it did not work;
StrategyPlot(1).Plots[0].Pen.Style = Bar; I would appreciate it if you could show me this one as well. Thanks again for your assistance. Safetrading Quote:
|
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Sorry about missing that part, this could unfortunately not be set / changed this way programmatically. But you could change it for the plot directly in the StrategyPlot indicator itself.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jul 2011
Posts: 10
Thanks: 0
Thanked 1 time in 1 post
|
This is most helpful indeed. What would the proper syntax be to change the lable of the plot from StrategyPlot? It gets kind of confusing when all the indicators are the same name.
I tried StrategyPlot(0).Plots[0].Name = "xxx" but nothing seemed to change. |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Jul 2011
Posts: 10
Thanks: 0
Thanked 1 time in 1 post
|
Also, I've added three indicators to my strategy. The third being a ROC indicator which is a ratio of two other instruments. It plots fine on the chart, but when I try to add a line at the "0" level, it crashes NT.
StrategyPlot(2).Lines[0].Value = 20; |
|
|
|
|
|
#7 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
reticent67, glad to hear - both items you mentioned would unfortunately not be supported for this technique, please add / change them in the originating indicator you add for display.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#8 | |
|
Senior Member
|
Quote:
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| syntax | tonynt | Automated Trading | 5 | 07-11-2011 08:36 AM |
| Problem of Syntax | germano | Strategy Development | 13 | 04-02-2009 10:55 AM |
| Print() syntax | stefy | General Programming | 8 | 10-08-2008 06:22 PM |
| Strategy plots. Syntax for referencing lines | raz0rback | Strategy Development | 2 | 06-15-2008 09:06 AM |
| Syntax for adding Woodies Pivots to strategy | raz0rback | Strategy Development | 1 | 06-15-2008 07:54 AM |