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.
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//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")