FredFerrell

Big Shadow by Walter Peters v1.0

This is an indicator for the Big Shadow (engulfing candle) that Walter Peters teaches in his course and book "Naked Forex". I hope this will help other "Naked" traders to identify this candle pattern.
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 đồ?
//Based on Big Shadow Strategy by Walter Peters (fxjake.com and nakedforexnow.com)
//Coded by Fred Ferrell
study(title = "Big Shadow by Walter Peters v1.0", overlay = true)

PercentageFromClose = input(20, minval=1, maxval=99, title="Percentage input for the range a candle has to close within the high or low on an up or down candle respectively.")
PercentageFromCloseFormula = PercentageFromClose * .01
roomToTheLeftPeriod = input(7, minval=2, maxval=30, title="Room To Left Interval Check")
range = high - low

//Largest candle range within last 10 days. Need to find cleaner code.
largestCandle = high-low > high[1]-low[1] and high-low > high[2]-low[2] and high-low > high[3]-low[3] and high-low > high[4]-low[4] and high-low > high[5]-low[5] and high-low > high[6]-low[6] and high-low > high[7]-low[7] and high-low > high[8]-low[8] and high-low > high[9]-low[9] and high-low > high[10]-low[10]

//Bearish Engulfing Candle
higherHigh = high > high[1]
bearishEngulfing = close[1] > open[1] and open > close and open >= close[1] and low[1] >= close and open - close > close[1] - open[1]

//Room to left rising is checking that last 7 candle highs are lower than entry candle
roomToTheLeftRising = rising(high,roomToTheLeftPeriod)

//shavedBarDown is checking that distance from low and close is less than 10% (default) of candle body
shavedBarDown = close <= (low + (range * PercentageFromCloseFormula))

//Coloring of candle
barcolor(higherHigh and bearishEngulfing and roomToTheLeftRising and largestCandle and shavedBarDown? red : na)

//Arrow and text on chart
bearishNote = higherHigh and bearishEngulfing and roomToTheLeftRising and largestCandle and shavedBarDown
plotshape(bearishNote,  title="Bearish Engulfing Candle", location=location.abovebar, color=red, style=shape.arrowdown, text="Bearish\nBig\nShadow")

//Bullish Engulfing Candle
lowerLow = low < low[1]
bullishEngulfing = open[1] > close[1] and close > open and close >= high[1] and close[1] >= open and close - open > open[1] - close[1] 

//Room to left falling is checking that last 7 candle lows are higher than entry candle
roomToTheLeftFalling = falling(low,roomToTheLeftPeriod)

//shavedBarUp is checking that distance from high and close is less than 10% (default) of candle body
shavedBarUp = close >= (high - (range * PercentageFromCloseFormula))

//Coloring of candle
barcolor(lowerLow and bullishEngulfing and roomToTheLeftFalling and largestCandle and shavedBarUp? green : na)

//Arrow and text on chart
bullishNote = lowerLow and bullishEngulfing and roomToTheLeftFalling and largestCandle and shavedBarUp
plotshape(bullishNote, title="Bullish Engulfing Candle", location=location.belowbar, color=lime, style=shape.arrowup, text="Bullish\nBig\nShadow")