AleksanderThor

Outside Bar Failure Updated!

145
Great update -> choose the size of the wick that fails the OD range.
I will try to implement this for inside day failure as well.
This will improve the stats of this failed PA play.

開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
study(title = "OF 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

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

bearishobbf = ((outsidebar and (high > high[1] and close < high[1]) and open < high - (range *  pctCp) and close < high-(range * pctCp) and high >= highest(pblb) ? 1 : 0))
bullishobbf = ((outsidebar 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(bearishobbf ? white : na, 0, true, "OF")
plotshape(showlabel ? bearishobbf : na, title= "OF", location=location.abovebar, color=white, style=shape.arrowdown, text="OF")

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