Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Coding the color and dash style of an indicator in a custom strategy
Collapse
X
-
Coding the color and dash style of an indicator in a custom strategy
I am looking for a way I can set the MAX indicator in my custom strategy to be diplayed not only in black but also as dashed ( width 2 ). Could you please advice me on the code I need to use to achieve this because as for now, I am stuck at Add(MAX(High,50)); -
Welcome to our forums - we have posted a tip in the forums to show how this could be further customized as desired including the dash style - http://www.ninjatrader.com/support/f...ead.php?t=3228
-
Still getting errors
Thanks for your reply. I checked out the link you sent me and tried recoding the indicators in the Initialize() section as shown below.
Add(MAX(High,MAXprdlng).Plots[0].Pen.DashStyle = DashStyle.Dash);
Add(MAX(High,MAXprdlng).Plots[0].Pen.Color = Color.Black);
However, I still got error messages. Could you please tell me what's wrong with the code?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
57 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
143 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
161 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
97 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
276 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment