Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Indicator using mixed colors
Collapse
X
-
Indicator using mixed colors
I am using an indicator which draws multiple chart lines (in this case a Bollinger) and need to set the draw properties (color, thickness, etc.) different for one part of the indicator (the Bollinger Middle) from the other parts. I have found how to do this modifing the properties of the indicator on the chart but I need to do it using Ninjascript in my strategy. How could I do this?Tags: None
-
You can try something like the following in the Initialize() method.
Code:Bollinger myBollinger = Bollinger(2, 14); // Assign the indicator to a temp variable myBollinger.Plots[1].Pen = new Pen(Color.Red, 2); // Change the pen of the middle plot to a color of red and width of 2 Add(myBollinger); // Add the indicator to the chart for display
RayNinjaTrader Customer Service
-
So we can make commands that modify individual indicator's properties. Can we also make commands that modify the overall chart properties? For instance, I am not use to seeing dates as dd.mm.yyyy on the x-axis and would like to be able to change it to mm.dd.yyyy
Better yet, is there a way I can change the default settings for this so I don't have to do it manually every time?Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
63 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
35 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
54 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
61 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
48 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment