Bollinger Range Bound

Category: Indicators By: Nicolas Created: March 3, 2016, 12:52 PM
March 3, 2016, 12:52 PM
Indicators
2 Comments

Here is a smart idea for an indicator to detect range, as it compares 2 bollinger bandwidth spread as an hint for current price contraction.

When the oscillator is set to 1, price is ranging and “NoTrade” would be initiated.

 

a = BollingerUp[40](close)
b = BollingerDown[40](close)
B1Range = a - b

c = BollingerUp[20](close)
d = BollingerDown[20](close)
B2Range = c - d

if B2Range < (B1Range/2) then
  NoTrade = 1
else
  NoTrade = 0
endif

return NoTrade AS "No Trade"

 

Download
Filename: Bollinger-Range-Bound.itf
Downloads: 217
Nicolas Master
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Logo Logo
Loading...