UDAY_C_Santhakumar

UCS_Squeeze_Timing-V2

Statistically, Squeeze fires in the direction of strength (Up or Down). By replacing the Rate of Change with Bollinger Band % BB, allows us to easily pick the direction to trade the Squeeze. With the knowledge of Price Pattern, it makes it even easier.

I have identified 4 Setups that works wells with this. I will let you explore and comment. Could possibly initiate arguments and can identify a few more.

Nothing is perfect, but probable.

Using this with the Timing V1 Signals - It is easier to sneak in. More variations to this in future. Will need time to backtest other variations.

Uday C Santhakumar
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?
// Variation - Lazybear Squeeze Indicator
// Recreated and Modified by UCSgears
// Replaced the momentum indicator 

study(shorttitle = "UCS_SQUEEZE_Timing_V2", title="Squeeze Momentum Timing and Direction", overlay=false)

lengthBB = input(20, title="BB Length")
multBB = input(2,title="BB MultFactor")
lengthKC=input(20, title="KC Length")
multKC = input(1.5, title="KC MultFactor")

useTrueRange = input(true, title="Use TrueRange (KC)", type=bool)

// Calculate BB
source = close
basis = sma(source, lengthBB)
dev = multBB * stdev(source, lengthBB)
upperBB = basis + dev
lowerBB = basis - dev

// Calculate KC
ma = sma(source, lengthKC)
range = useTrueRange ? tr : (high - low)
rangema = sma(range, lengthKC)
upperKC = ma + rangema * multKC
lowerKC = ma - rangema * multKC

sqzOn  = (lowerBB > lowerKC) and (upperBB < upperKC)
sqzOff = (lowerBB < lowerKC) and (upperBB > upperKC)
noSqz  = (sqzOn == false) and (sqzOff == false)

bbr = ((source - lowerBB)/(upperBB - lowerBB))-0.5

val = sma(bbr,20)

bcolor = iff( val > 0, 
            iff( val > nz(val[1]), green, blue),
            iff( val < nz(val[1]), red, orange))
scolor = noSqz ? blue : sqzOn ? red : green 
plot(val, color=bcolor, style=histogram, linewidth=3)
plot(0, color=scolor, style=circles, linewidth=3)