OPEN-SOURCE SCRIPT

king 3

74
//version=5
indicator("BTC_QQQ_Crown_Indicator", overlay=true)

// 1. MACD Numbers (8, 16, 11)
[m_line, s_line, hist] = ta.macd(close, 8, 16, 11)

// 2. Engulfing Candle Logic
bull = close[1] < open[1] and open < close[1] and close > open[1]
bear = close[1] > open[1] and open > close[1] and close < open[1]

// 3. Crown Signal Condition
crownBuy = bull and hist > hist[1]
crownSell = bear and hist < hist[1]

// 4. Drawing Crowns on Chart
plotshape(crownBuy, title="Buy_Crown", style=shape.labelup, location=location.belowbar, color=color.yellow, size=size.normal, text="👑\nBUY", textcolor=color.black)
plotshape(crownSell, title="Sell_Crown", style=shape.labeldown, location=location.abovebar, color=color.red, size=size.normal, text="👑\nSELL", textcolor=color.white)

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

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.