Squeeze Light

Category: Indicators By: Nicolas Created: November 7, 2017, 4:34 PM
November 7, 2017, 4:34 PM
Indicators
3 Comments

Another “Squeeze” indicator that plot histogram in red color when the Bollinger Bands are inside the Keltner bands, informing us of a pause in the market and a probable burst of volatility to varnish.

Bollinger bands and Keltner bands periods and deviation factors are adjustable in the settings.

 

Converted from MQL4 version by a request in ProBuilder English forum section.

//PRC_Squeeze Light | indicator
//07.11.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge

// --- settings
//bolPrd=21
//bolDev=2.0
//keltPrd=20
//keltFactor=1.5
// --- end of settings

diff = averagetruerange[keltPrd]*keltFactor
stdd = std[bolPrd](close)
bbs = bolDev*stdd/diff

if bbs<1 then
 upK = 1
 loK = 0
else
 loK = 1
 upK = 0
endif

return upK coloured(255,0,0) style(histogram,1) as "Squeeze On", loK coloured(255,0,0,30) style(histogram,1) as "Squeeze Off"

 

Download
Filename: PRC_Squeeze-Light.itf
Downloads: 368
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...