Hello..
Nicolas, Ivan and other experts,
could you please convert this trading view indicator to ProRealTime : Buy and Sell Alerts using VWAP ?
I think the Alerts cannot be programmed in PRT
So, it is enough for me to convert it to an indicator only
I hope that the buy and sell signal
Have the option to add or delete from the chart as needed
I think this indicator will benefit everyone,
Thanks in advance
https://ar.tradingview.com/script/HJyXKmit-Buy-and-Sell-Alerts-using-VWAP/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © thisgirl
//@version=5
indicator(“Custom VWAP and MA Alerts”, overlay=true)
// Input for selecting moving averages
show_vwap = input(true, title=”Show VWAP”)
show_9ema = input(false, title=”Show 9 EMA”)
show_10sma = input(false, title=”Show 10 SMA”)
show_50sma = input(false, title=”Show 50 SMA”)
show_100sma = input(false, title=”Show 100 SMA”)
show_200sma = input(false, title=”Show 200 SMA”)
show_325sma = input(false, title=”Show 325 SMA”)
// Input for volume threshold
volume_threshold = input(0, title=”Volume threshold”)
// Calclulate moving averages
vwap = ta.vwap
ema9 = ta.ema(close, 9)
sma10 = ta.sma(close, 10)
sma20 = ta.sma(close, 20)
sma50 = ta.sma(close, 50)
sma100 = ta.sma(close, 100)
sma200 = ta.sma(close, 200)
sma325 = ta.sma(close, 325)
// Plot moving averages based on user input
plot(show_vwap ? vwap : na, title=”VWAP”, color = color.blue)
plot(show_9ema ? ema9 : na, title=”9 EMA”, color = color.orange)
plot(show_10sma ? sma10 : na, title=”10 SMA”, color = color.purple)
plot(show_50sma ? sma50 : na, title=”50 SMA”, color = color.green)
plot(show_100sma ? sma100 : na, title=”100 SMA”, color = color.yellow)
plot(show_200sma ? sma200 : na, title=”200 SMA”, color = color.red)
plot(show_325sma ? sma325 : na, title=”325 SMA”, color = color.gray)
// Buy and sell conditions based on crossing VWAP and volume threshold
crossAboveVWAP = ta.crossover(close, vwap) and volume > volume_threshold
crossBelowVWAP = ta.crossunder(close, vwap) and volume > volume_threshold
// Plot buy and sell signals
plotshape(series=crossAboveVWAP, location=location.belowbar, color = color.green, style=shape.labelup, title=”Buy Signal”, text=”BUY”)
plotshape(series=crossBelowVWAP, location=location.abovebar, color = color.red, style=shape.labeldown, title=”Sell Signal”, text=”SELL”)
// Alerts
alertcondition(crossAboveVWAP, title=”Buy Alert”, message=”Price crossed above VWAP with volume threshold met”)
alertcondition(crossBelowVWAP, title=”Sell Alert”, message=”Price closed below VWAP with volume threshold met”)