Having Trouble Adding Volatility Stop Bands to Price Chart?
Forums › ProRealTime English forum › ProBuilder support › Having Trouble Adding Volatility Stop Bands to Price Chart?
- This topic has 6 replies, 4 voices, and was last updated 5 years ago by Bard.
-
-
07/14/2019 at 3:32 PM #102555
Hi there,
I coded some Volatility Stop Bands and it shows up as an indicator in the lower pane (pls see image) but not on the main price chart?
I think the coding’s correct, the idea grabbed from an article called “Maximising Risk-Adjusted gains with Trade Management – Trading Recipes” was:
“Each day divide the close by its 144-day simple moving average. The result is a relative strength indicator we can call R. Take a 21-day simple moving average of R. Plot bands at intervals 3% above and below the 21-day smoothing. If R drops below the lower band, exit the trade on tomorrow’s open.”
Any ideas?
Cheers
BardTrading Recipes Volatility Stop1234567891011121314151617181920212223//R is a Relative Strength Volatility Stop Indicator//---SettingsCloseMAPeriod = 144RMAPeriod = 21UpperValue = 3.0 //"Upperbands %"LowerValue = 3.0 //"Lowerbands %"//---end of settingsR=Close/Average[CloseMAPeriod]RAve = Average[RMAPeriod](R)VolStop = RaveUpperBand = VolStop * UpperValue / 100LowerBand = VolStop * LowerValue / 100RETURN VolStop+UpperBand as "Volatility Upperband",VolStop-LowerBand as "Volatility Lowerband"07/14/2019 at 5:36 PM #102559From your description in your post the indicator does not appear to be one that you apply to a price chart. It is meant to be a separate relative strength indicator. Just add R to your returned values to complete the indicator.
1234567891011121314151617181920212223//R is a Relative Strength Volatility Stop Indicator//---SettingsCloseMAPeriod = 144RMAPeriod = 21UpperValue = 3.0 //"Upperbands %"LowerValue = 3.0 //"Lowerbands %"//---end of settingsR=Close/Average[CloseMAPeriod]RAve = Average[RMAPeriod](R)VolStop = RaveUpperBand = VolStop * UpperValue / 100LowerBand = VolStop * LowerValue / 100RETURN VolStop+UpperBand as "Volatility Upperband",VolStop-LowerBand as "Volatility Lowerband", R as "R"07/14/2019 at 10:53 PM #102563Cheers @Vonasi, I guess I kind of pictured it being overlaid on price to be able to see how price interacts within the indicator but take your point: “If R drops below the lower band, exit the trade on tomorrow’s open.” If they’re typical volatility bands they could be added to price, right?
07/15/2019 at 8:36 AM #10257207/15/2019 at 10:47 AM #102594I have created an easier to read version by normalising the upper band as 100 and the lower as 0. Top indicator in the image is this new version with the original at the bottom.
1234567891011121314151617181920//R is a Relative Strength Volatility Stop Indicator//---SettingsCloseMAPeriod = 144RMAPeriod = 21UpperValue = 3.0 //"Upperbands %"LowerValue = 3.0 //"Lowerbands %"//---end of settingsR=Close/Average[CloseMAPeriod]RAve = Average[RMAPeriod](R)UpperBand = RAve * (1 + (UpperValue / 100))LowerBand = RAve * (1 - (LowerValue / 100))RValue = ((R - lowerband) / (upperband - lowerband)) * 100RETURN 100, 0, RValue as "R"1 user thanked author for this post.
07/15/2019 at 11:03 AM #10259807/16/2019 at 12:26 PM #102664 -
AuthorPosts
Find exclusive trading pro-tools on