UDAY_C_Santhakumar

UCS_Squeeze_Timing-V3

Another Version with More Features . I am confident enough this works fine now. I am Sure this will be a valuable tool for you guys who love squeezes.

///////////////// This can be further optimized, Let me know with a comment, if you still need this to be optimized. ////////////////////

This update includes

- Added Options to detect squeeze using Heikin Ashi Candle
- Added Options to use BBR or Momentum (ROC) for the Momentum Histogram
- Custom Momentum Smoothing time period
- Removed the Separate Look back periods for BB/KC - Since it doesn't really make sense using different lengths for KC and BB.

HA Closes can be really helpful in trading ETFs like FXE, GLD, FXY, SLV etc, which constantly gaps on daily basis. This helps in smoothing out. And most Importantly it Lines up with the Underlying's Squeeze.

[The Next Major Version is currently being Back tested with better timing triggers etc...... That will replace all other Squeeze indicators in the market - Some Major upgrades have been done to the squeezes to read the consolidation is with support or resistance. Also plan on adding best bet entries and pre-breakout signals. So far so good, this recent contradicting trends in daily / weekly in the market is making the indicator hard to work per theory]

The delay is because, I do not like to post any script (with signals) without sufficient back testing . I will not post these indicator with signals, unless I am sure it works per my theoretical derivations.

-

Thanks for Being Patient and all your support.

Until then - Good Luck Trading.

Uday C Santhakumar
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
// Variation - Lazybear Squeeze Indicator
// Recreated and Modified by UCSgears
// Added Options to detect squeeze using Heikin Ashi Candle
// Added Options to use BBR or Momentum (ROC) for the Momentum Histogram
// Custom Momentum Smoothing
// Removed the Seperate Lookback periods for BB/KC - Since this doesn't really make sense in using a different lengths. 

study(shorttitle = "UCS_SQUEEZE_Timing_V3", title="Squeeze Momentum Timing and Direction - Version 3", overlay=false)

length = input(20, title="Squeeze Length")
multBB = input(2,title="BB MultFactor")
multKC = input(1.5, title="KC MultFactor")
smooth = input(20, title = "Momentum Smoothing")

usebbr = input(true, title = "Use Bollinger Band Ratio", type = bool)
useHAC = input(true, title = "Use Heikin Ashi Candle", type=bool)
useTrueRange = input(true, title="Use TrueRange (KC)", type=bool)

// Calculate BB
source = useHAC ? ohlc4 : close
basis = sma(source, length)
dev = multBB * stdev(source, length)
upperBB = basis + dev
lowerBB = basis - dev

// Calculate KC
ma = sma(source, length)
range = useTrueRange ? tr : (high - low)
rangema = sma(range, length)
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)

momentum = usebbr ? (((source - lowerBB)/(upperBB - lowerBB))-0.5) : (((close - close[12])/close[12])*100)

val = sma(momentum,smooth)

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)