1 - Pro Trading
1 - Pro Trading
1 - Pro Trading
0 at
https://mozilla.org/MPL/2.0/
// � protradingart
//@version=5
indicator("Pro Trading Art - Candlestick Patterns with alert", "PTA - Candlestick
Patterns", overlay=true)
emaLen = input.int(21, "EMA Length")
ema = ta.ema(close, emaLen)
array.push(candleRange, distance)
avgRange = array.avg(candleRange)
//#region Hammer
shadowGroup = "=========== Shadow ==========="
isHammer = input.bool(true, "Hammer", group=shadowGroup, inline = "Hammer")
hammerMult = input.float(defval=2.0, title="Multiplier", step=0.1,
group=shadowGroup, inline = "Hammer")
hammer = (open-low) > (close-open)*hammerMult and (close-open) > (high-close) and
isHammer and close < ema
if hammer
alert("Hammer in : "+syminfo.ticker, alert.freq_once_per_bar_close)
//#endregion
if hanging
alert("Hanging Man In : "+syminfo.ticker, alert.freq_once_per_bar_close)
//#endregion
if invertedHammer
alert("Inverted Hammer : "+syminfo.ticker, alert.freq_once_per_bar_close)
//#endregion
if shootingStar
alert("Shooting Star : "+syminfo.ticker, alert.freq_once_per_bar_close)
//#endregion
morningstar = morningStar(open, close, high, low) and isMorningStar and close < ema
plotshape(morningstar ? low : na, title="Morning Star", style=shape.labelup,
color=color.rgb(54, 167, 58), location=location.absolute, text="Morning Star",
textcolor=color.black, size=size.normal)
if morningstar
alert("Morning Star : "+syminfo.ticker, alert.freq_once_per_bar_close)
//#endregion
eveningstar = eveningStar(open, close, high, low) and isEveningStar and close > ema
plotshape(eveningstar ? high : na, title="Evening Star", style=shape.labeldown,
color=color.rgb(230, 47, 47, 7), location=location.absolute, text="Evening Star",
textcolor=color.white, size=size.normal)
if eveningstar
alert("Evening Star : "+syminfo.ticker, alert.freq_once_per_bar_close)
//#endregion
bullishEngulfing = close > open[1] and close > close[1] and open < open[1] and open
< close[1] and close < ema and distance > avgRange and isBulllishEngulfing
if bullishEngulfing
alert("Bullish Engulfing in : "+syminfo.ticker, alert.freq_once_per_bar_close)
//#endregion
bearishEngulfing = close < open[1] and close < close[1] and open > open[1] and open
> close[1] and close > ema and distance > avgRange and isBearishEngulfing
if bearishEngulfing
alert("Bearish Engulfing in : "+syminfo.ticker, alert.freq_once_per_bar_close)
//#endregion
if darkCloud
alert("Dark - Cloud Cover in : "+syminfo.ticker, alert.freq_once_per_bar_close)
//#endregion
if piercing
alert("Piercing Pattern in : "+syminfo.ticker, alert.freq_once_per_bar_close)
//#endregion