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 argusthome, 03-08-2026, 10:06 AM
|
0 responses
94 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
49 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
31 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
35 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
71 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment