so that if I have WMA(20) and EMA(30) i can easily tell which is which by their colors of the text
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How do I get the color of an indicator programatically
Collapse
X
-
How do I get the color of an indicator programatically
basically what I want to do is to get the color of an indicator (single plot) and set its text to that same color.
so that if I have WMA(20) and EMA(30) i can easily tell which is which by their colors of the textTags: None
-
Hello Mike82,
Thank you for your post.
You may be able to achieve what you want with custom programming, and the following reference sample helps with some of the label formatting available. The DrawTextFixed() method provides an overload that allows font colors.
Ryan M.NinjaTrader Customer Service
-
To retrieve a Plot's color, try:Originally posted by mike82 View Postbasically what I want to do is to get the color of an indicator (single plot) and set its text to that same color.
so that if I have WMA(20) and EMA(30) i can easily tell which is which by their colors of the text
Plots[#].Pen.Color
Where # = the number of the Plot (starting at 0) that you Add in Initialize.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
601 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
347 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
559 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
558 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment