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 DannyP96, 05-18-2026, 02:38 PM
|
1 response
78 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
131 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
79 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
242 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
331 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|

Comment