Is this 1 plot or 3 plots? Also, do I have to calculate the RSI Average or is that available in a variable?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Vertical Bar Indicator
Collapse
X
-
Vertical Bar Indicator
I want to code an Indicator which plots vertical bars with 3 different colors. The color of the bars would be based on the following: If the RSI and it's average are both above the RSI Bullish Level, color = (Say) Blue. If the RSI and it's average are both below the RSI Bearish Level, color = (Say) Red. If at least one of the RSI and it's average are between the Bearish Level and the Bullish Level, color = (Say) Khaki.
Is this 1 plot or 3 plots? Also, do I have to calculate the RSI Average or is that available in a variable?Last edited by freeway; 10-28-2011, 05:22 PM.Tags: None
-
Changing colors and RSI Average
Freeway,
I am happy to assist you.
This is possible with only 1 bar plot. You just need to set the color of the bar whenever a certain condition is true. You can use the following line and adapt it for your use.
For more information on colors, please see the following link.Code:if ( condition is true ) { PlotColors[0][0] = Color.Red; }
For more information on PlotColors, please see the link below.
By RSI average do you mean a moving average? Something like this would work.
Please let me know if I may assist further.Code:SMA(RSI(RSIPeriod,smooth),SMAperiod)[barsAgo]
Adam P.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
134 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
75 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
119 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
114 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
92 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment