ucsgears

UCS_Squeeze_Optimization

Squeeze Momentum Indicator - Optimized

All Updates from Version 3 + Squeeze Optimized further.
Gỡ bỏ khỏi Script Ưa thích Thêm vào Script Ưa thích
// Heikin Ashi Optimization Applied

study(shorttitle = "UCS_SQZ_Opt", title="UCS_Squeeze Momentum - Optimized", 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 Instead of Momentum", type = bool)
useHAC = input(true, title = "Heikin Ashi Optimization", type=bool)

// Heikin Ashi ATR Calculations
haclose = ohlc4
haopen = na(haopen[1]) ? (open + close)/2 : (haopen[1] + haclose[1]) / 2
hahigh = max (high, max(haopen,haclose))
halow = min (low, min(haopen,haclose))
haatra = abs(hahigh - haclose[1])
haatrb = abs(haclose[1] - halow)
haatrc = abs(hahigh - halow)
haatr = max(haatra, max(haatrb,haatrc))

source = useHAC ? haclose : close

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


// Calculate KC
ma = sma(source, length)
range = useHAC ? haatr : tr
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 ======> %B Indicator OR Rate of Change (ROC)
momentum = usebbr ? (((source - lowerBB)/(upperBB - lowerBB))-0.5) : (((close - close[12])/close[12])*100)
val = sma(momentum,smooth)

// Plot Statements
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)
how do you use this?
Phản hồi
Hello, I just joined so not sure how active this thread is. I'm very interested in using the 'Squeeze event' for trading...I have access to TTM_Squeeze on ThinkorSwim. But I'll be interested if I can try your versions using this sites charts. Is there by chance a way to use your Squeeze indicator on the stock screener to find stocks that fit a breakout scenario. Actually I'm interested in a different use. I would like to be able to scan for stocks that on the Weekly chart data signal a first red dot(begin of squeeze) with a few other conditions; above 52sma, price > $40, and large trade volume.
Is there any way I could use your indicator to scan for such stocks?
Is there an easy way for your code to be translated into Thinkscript for TOS?
Thanks
Phản hồi
ucsgears NeoFitz
There is no way to scan for stocks in Tradingview, Yet. TOS have scanners. The codes from TV can be translated. Provided you can convert them, Its simple.
Phản hồi
Phản hồi
There are sooo many ways this tool can be used! Here I simply overlapped a longer time frame (weekly) momentum over the one day momentum. This tool makes spotting divergence extremely easy.

+1 Phản hồi
Alphaoptions coondawg71
Great illustration coondawg!
Phản hồi
coondawg71 Alphaoptions
thanks ! just like to help with what I see, what I know, UCS GEARS puts up great tools. I can go on and on and on, but I wouldnt want to hi-jack the thread.
Phản hồi
ucsgears coondawg71
Thanks for sharing ideas.
Phản hồi
You are very welcome, and thank you for your generosity !
Phản hồi
vaicru coondawg71
Phản hồi
Trang chủ Bộ lọc cổ phiếu Bộ lọc Forex Bộ lọc Tiền điện tử Lịch kinh tế Shows Cách thức hoạt động Tính năng Biểu đồ Giá Quy tắc Áp dụng Người điều hành Giải pháp cho Website & Nhà môi giới Widget Giải pháp biểu đồ Thư viện Biểu đồ Lightweight Trung tâm Trợ giúp Giới thiệu bạn Yêu cầu tính năng Blog & Tin tức Câu hỏi thường gặp Wiki Twitter
Hồ sơ Tùy chỉnh Hồ sơ Tài khoản và Thanh toán Giới thiệu bạn Ticket Hỗ trợ của tôi Trung tâm Trợ giúp Các ý tưởng đã đăng Người theo dõi Đang theo dõi Tin nhắn riêng Trò chuyện Đăng xuất