Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
[NT8] SMA with color based on slope.
Collapse
X
-
Hello Drtro,
Thank you for your inquiry.
You would be able to utilize the Slope() method call, and based on the return value, change the color of your plots.
We have a reference sample on our support forum that details multi-colored plots: http://ninjatrader.com/support/forum...ead.php?t=3227
As an example:
Please, let us know if we may be of further assistance.Code:// if the slope of the line of a 20 period SMA in the last 10 bars is more than 0.5, change the plot to black if (Slope(SMA(20), 10, 0) > 0.5) PlotBrushes[0][0] = Brushes.Black;Zachary G.NinjaTrader Customer Service
-
It works. How do I make the colors variable to be able to change in the indicator settings?Originally posted by NinjaTrader_ZacharyG View PostHello Drtro,
Thank you for your inquiry.
You would be able to utilize the Slope() method call, and based on the return value, change the color of your plots.
We have a reference sample on our support forum that details multi-colored plots: http://ninjatrader.com/support/forum...ead.php?t=3227
As an example:
Please, let us know if we may be of further assistance.Code:// if the slope of the line of a 20 period SMA in the last 10 bars is more than 0.5, change the plot to black if (Slope(SMA(20), 10, 0) > 0.5) PlotBrushes[0][0] = Brushes.Black;
Comment
-
Hello Drtro,
We do have a post on our Tips section that provides information on how to allow a Brush to be a user defined input: http://ninjatrader.com/support/forum...43&postcount=2
Please, let us know if we may be of further assistance.Zachary G.NinjaTrader Customer Service
Comment
-
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment