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.htmPaul H.NinjaTrader Customer Service
- Likes 1
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by hazylizard, Today, 08:38 AM
|
0 responses
4 views
0 likes
|
Last Post
by hazylizard
Today, 08:38 AM
|
||
Started by Max238, Today, 01:28 AM
|
5 responses
42 views
0 likes
|
Last Post
by Max238
Today, 08:30 AM
|
||
Started by giulyko00, Yesterday, 12:03 PM
|
3 responses
12 views
0 likes
|
Last Post Today, 08:26 AM | ||
Started by habeebft, Today, 07:27 AM
|
1 response
14 views
0 likes
|
Last Post Today, 08:08 AM | ||
Hi
by AveryFlynn
Started by AveryFlynn, Today, 04:57 AM
|
1 response
13 views
0 likes
|
Last Post Today, 07:57 AM |
Comment