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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
41 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
27 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
45 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
37 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment