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
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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.
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.
Code:SMA(RSI(RSIPeriod,smooth),SMAperiod)[barsAgo]
Adam P.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by egordleo, Today, 05:50 AM
|
0 responses
5 views
0 likes
|
Last Post
by egordleo
Today, 05:50 AM
|
||
Started by kevinenergy, 02-17-2023, 12:42 PM
|
118 responses
2,778 views
1 like
|
Last Post
by kevinenergy
Today, 05:41 AM
|
||
Started by briansaul, Today, 05:31 AM
|
0 responses
9 views
0 likes
|
Last Post
by briansaul
Today, 05:31 AM
|
||
Started by fwendolynlpxz, Today, 05:19 AM
|
0 responses
5 views
0 likes
|
Last Post Today, 05:19 AM | ||
Started by traderqz, Yesterday, 12:06 AM
|
11 responses
28 views
0 likes
|
Last Post Today, 05:11 AM |
Comment