AleksanderThor

IB BREAKOUT FAILURE With custom Wick size

139
Great update -> choose the size of the wick that fails the ID range.
This will improve the stats of this failed PA play.
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
study(title = "IF v1", overlay = true)
showlabel = input(title="Show label", type=bool, defval=true)

pctP = input(50, minval=1, maxval=99, title="Percentage Input For PBars, What % The Wick Of Candle Has To Be")
pblb = input(1, minval=1, maxval=100, title="PBars Look Back Period To Define The Trend of Highs and Lows")

//PBar Percentages
pctCp = pctP * .01
pctCPO = 1 - pctCp

range = high - low

outsidebar = (high >= high[1] and low <= low[1])
insidebar = ((high[1] <= high[2] and low[1] >= low[2]) and not(outsidebar))

bearishibbf=((insidebar and (high > high[1] and close < high[1]) and open < high - (range *  pctCp) and close < high-(range * pctCp) and high >= highest(pblb) ? 1 : 0))
bullishibbf=((insidebar and (low < low[1] and close > low[1]) and open > high - (range * pctCPO) and close > high - (range * pctCPO) and low <= lowest(pblb) ? 1 : 0))

barcolor( bearishibbf ? white : na, 0, true, "IF")
plotshape(showlabel ? bearishibbf : na, title= "IF", location=location.abovebar, color=white, style=shape.arrowdown, text="IF")

barcolor(bullishibbf ? white : na, 0, true, "IF")
plotshape(showlabel ? bullishibbf : na, title= "IF", location=location.belowbar, color=white, style=shape.arrowup, text="IF")