Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Change background color via code
Collapse
X
-
Change background color via code
How do I change the background color of a chart via code? For instance, for a custom indicator, if EMA is rising I'll like the chart background color to be green or if its falling I'll like it to be red.Tags: None
-
Hello MadScientist,
Thanks for your post.
You can use BackBrush for coloring the panel background or BackBrushAll for the chart (all panels) background.
You can use the IsRising() or IsFalling() for your direction checks.
Example:
if (IsRising(EMA(20))
{
BackBrush = Brushes.Green;
}
References:
http://ninjatrader.com/support/helpG...?backbrush.htm
http://ninjatrader.com/support/helpG...ckbrushall.htm
http://ninjatrader.com/support/helpG...us/?rising.htm
http://ninjatrader.com/support/helpG...s/?falling.htm
- Likes 1
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
17 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
120 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
174 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
92 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
134 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|

Comment