Thanks
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
Create paintbar of Key reversal bar
Collapse
X
-
Create paintbar of Key reversal bar
There are 2 indicators that show Key Reversal Bars but they show them in separate indicator windows. How can I show them as a paint bar on the price chart when they occur. If there is a Key reversal bar down say it would paint that bar orange and for a Key reversal bar up say it would paint purple. With the paintbar I would not need the seperate indicator windows.
ThanksTags: None
-
Originally posted by petvett View PostThere are 2 indicators that show Key Reversal Bars but they show them in separate indicator windows. How can I show them as a paint bar on the price chart when they occur. If there is a Key reversal bar down say it would paint that bar orange and for a Key reversal bar up say it would paint purple. With the paintbar I would not need the seperate indicator windows.
Thanks
- if you eliminate all key reversals with an active trading range
- if you use a second indicator to determine overbought and oversold conditions based on the price volume distribution of the current day
What is your definition of a key reversal?
-
Hello petvett,
Thanks for your post.
You can change the color of a bar based on conditions by setting the BarColor variable.
For example:
if (SMA(19)[0] < SMA(20)[0])
{
BarColor = Color.Green;
}
Below is a link to the help guide on BarColor.
http://www.ninjatrader.com/support/h...7/barcolor.htm
If you would like assistance getting the values from the indicators, please let me know the names of the indicators you are working with.Chelsea B.NinjaTrader Customer Service
Comment
-
Do I do this by setting up a new indicator called bar color? I could not find where to choose a variable bar color. I am looking at the indicator called Key Reversal bar up and Key reversal bar down. If those conditions are met I would like that bar to be a different color. Thanks for your help.
Comment
-
Hello,
Try adding a line similar to this to the end of the OnBarUpdate() method.
if (/* conditions here */)
{
BarColor = Color.Green;
}
Where it says /* conditions here */ replace this with the conditions of your choosing.
To do this you will need to make a copy of the indicator with a different name. The original indicator will be locked from editing.
To copy the script:- Click Tools -> Edit NinjaScript -> select KeyReversalUp -> click OK
- Right-click the code in the code editor window -> select Save As...
- Give the new script a unique name such as KeyReversalUpModified -> click OK
Chelsea B.NinjaTrader Customer Service
Comment
-
Originally posted by petvett View PostHarry there is an indicator listed in the package called Key reversal Bar. It is when price makes a new high (or low) and then reverses and closes in the bottom 25% of that bar (closes in the top 25%).
Thanks
Ron
Below is a sample chart, arbitrarily chosen. I do not think that this is really a good selection of key reversals. Out of 9 identified reversal bars, a single one is valid, 6 lack any significance, because they are narrow range bars and 2 just show the resumption of an existing trend, which is not a reversal.
Comment
-
Here is a litte chart with a few filtered key reversals. The reversals are shown as paintbars. There is no additional plot. The R is only plotted, once the high (key reversal up) or the low (key reversal down) has been taken out, which is used to confirm the reversal.
A 2-bar-reversal, which is also known as a railway (one track down, another track up), is a reversal pattern derived from two bars. If you paint the composite candle built from two bars, you will see the one bar pattern. Therefore the railway is just a reversal pattern on a higher timeframe, that is a 30 min timeframe for a 15 minute chart.Last edited by Harry; 09-04-2013, 02:23 PM.
Comment
-
Me too
Hello Chelsea, I too have been trying to color a bar based on the Key Reversal Indicator. Is it possible for you to pass on the code you helped Pet With. Thanks
Comment
-
Key reversal paintbars
Sorry. I did not know how to export the scripts. Here they are. Thanks
Comment
-
-
I’m also trying to show key reversal bars. I like to use:-
Sell reversal bar: (H>=H[-1],C<(L+(H-L)/2.5)
Buy reversal bar: (L<=L[-1],C>(H-(H-L)/2.5))
I thought I would find this as an option in the candlestick pattern indicator, but not that I can see.
How can I paint the bars in this way?
Thanks
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by f.saeidi, Yesterday, 12:14 PM
|
9 responses
23 views
0 likes
|
Last Post
by f.saeidi
Today, 04:39 AM
|
||
Started by Tim-c, Today, 03:54 AM
|
0 responses
3 views
0 likes
|
Last Post
by Tim-c
Today, 03:54 AM
|
||
Started by FrancisMorro, Today, 03:24 AM
|
0 responses
3 views
0 likes
|
Last Post
by FrancisMorro
Today, 03:24 AM
|
||
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
10 responses
1,772 views
0 likes
|
Last Post
by Leafcutter
Today, 03:01 AM
|
||
Change colour of Stop market and limit orders to red and green via indicator script
by Rapine Heihei
Started by Rapine Heihei, 04-23-2024, 07:51 PM
|
2 responses
31 views
0 likes
|
Last Post
by Max238
Today, 02:25 AM
|
Comment