0% found this document useful (0 votes)
5 views2 pages

Multi Indicator Pine Script

The document outlines a Multi-Indicator Confirmation Strategy using Pine Script v6 for trading, incorporating trend, momentum, volume, and volatility indicators. It defines specific buy and sell conditions based on various technical indicators and includes mechanisms for entry, exit, and alerts. Additionally, it implements an ATR-based stop loss and take profit strategy to manage trades effectively.

Uploaded by

sankalp8213
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Multi Indicator Pine Script

The document outlines a Multi-Indicator Confirmation Strategy using Pine Script v6 for trading, incorporating trend, momentum, volume, and volatility indicators. It defines specific buy and sell conditions based on various technical indicators and includes mechanisms for entry, exit, and alerts. Additionally, it implements an ATR-based stop loss and take profit strategy to manage trades effectively.

Uploaded by

sankalp8213
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Multi-Indicator Confirmation Strategy (Pine Script v6)

//@version=6
strategy("Multi-Indicator Confirmation Strategy", overlay=true)

// Trend Confirmation
ema20 = [Link](close, 20)
ema50 = [Link](close, 50)
ema200 = [Link](close, 200)
supertrend = [Link](3, 7)
adx = [Link](14)
ichimoku = [Link]("IchimokuCloud", "D", close)

// Momentum Confirmation
rsi = [Link](close, 14)
[macdLine, signalLine] = [Link](close, 12, 26, 9)
stochK = [Link](close, high, low, 14)
stochD = [Link](stochK, 3)
cci = [Link](close, 20)

// Volume Confirmation
volumeAvg = [Link](volume, 20)
vwap = [Link](close)
mfi = [Link](close, volume, 14)

// Volatility Filter
atr = [Link](14)
bollingerUpper = [Link](close, 20, 2)
bollingerLower = [Link](close, 20, -2)
keltnerUpper = [Link](close, 20) + atr * 1.5
keltnerLower = [Link](close, 20) - atr * 1.5

// Smart Money Concepts


bos = [Link](high) > 0 ? 1 : [Link](low) < 0 ? -1 : 0
orderBlockBull = close > open
orderBlockBear = close < open

// Buy Conditions
buyCondition = (close > ema50 and close > ema200) and
(supertrend == 1) and
(rsi > 50) and
(macdLine > signalLine) and
(volume > volumeAvg) and
(bos == 1) and
(orderBlockBull)

// Sell Conditions
sellCondition = (close < ema50 and close < ema200) and
(supertrend == -1) and
(rsi < 50) and
(macdLine < signalLine) and
(volume > volumeAvg) and
(bos == -1) and
(orderBlockBear)

// Entry and Exit


if (buyCondition)
[Link]("Buy", [Link])
[Link](bar_index, high, "Buy", color=[Link], style=label.style_label_down)

if (sellCondition)
[Link]("Sell", [Link])
[Link](bar_index, low, "Sell", color=[Link], style=label.style_label_up)

bgcolor(buyCondition ? [Link]([Link], 90) : na)


bgcolor(sellCondition ? [Link]([Link], 90) : na)

// Alerts
alertcondition(buyCondition, title="Buy Alert", message="Buy Signal")
alertcondition(sellCondition, title="Sell Alert", message="Sell Signal")

// ATR-based Stop Loss and Take Profit


longStopLoss = close - atr
longTakeProfit = close + 2 * atr
shortStopLoss = close + atr
shortTakeProfit = close - 2 * atr

[Link]("Take Profit/Stop Loss", "Buy", stop=longStopLoss, limit=longTakeProfit)


[Link]("Take Profit/Stop Loss", "Sell", stop=shortStopLoss, limit=shortTakeProfit)

// Avoid Repainting
var float lastClose = na
if (not na(close))
lastClose := close

You might also like