TradingView
UnknownUnicorn2151907
6 มกรา 2020 เวลา 12 นาฬิกา 8 นาที

RSI-VWAP INDICATOR 

Bitcoin / TetherUSBinance

คำอธิบาย

This simple indicator provides great results.

It is the popular RSI indicator with VWAP as a source instead of close.

What is the Volume Weighted Average Price (VWAP)?

VWAP is calculated by adding up the dollars traded for every transaction (price multiplied by the number of shares traded) and then dividing by the total shares traded. That is, volume.

On the Backtest, trades are laddered to improve the average entrance price.

ความคิดเห็น
schapa1975
Good afternoon! And how can I test this indicator?
Kenneth_BullMkt
Do you know if this works with Stocks/Futures as well? Or just Crypto primarily?
UnknownUnicorn2151907
@Kenneth_BullMkt, try this with SP500 on OANDA at 30 minutes for example: (34, 20 , 80) and change the comission value to 0.2 USD per contract. You will see a profit factor >= 8 🤑
FranSkaf
is there a possibility to use take profit and stop loss in your script to run the backtest?
eggman94
Hey I really love your indicator! How can one edit the message to be compatible with a 3commas message?

RSI-VWAP INDICATOR (19, 19, 82):
order {{strategy.order.action}} @ < could I insert the 3commas message in here? and determine what it message it will trigger in the code?
{{strategy.order.contracts}} filled on {{ticker}}.
New strategy position is {{strategy.position_size}}
premoxxx
@eggman94, I would like to know it too
kiwi047
Hey mate, changed it up a bit. Configured it for binance settings (commission=0.1% trading fee that binance charges, added stop loss and take profit levels for risk management, Also added in security function to combat repainting.
Works great on all timeframes, but Im trying to tweak it for lower timeframes. Might throw in a moving average not sure yet. Hope you like it :)

//@version=4
strategy("RSI-VWAP STRATEGY", "RSI-VWAP", overlay=false, initial_capital = 1000, currency = "USD", pyramiding = 1, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, commission_value = 0.1)

// ================================================================================================================================================================================
// RSI VWAP INDICATOR
// ================================================================================================================================================================================

// Initial input
Act_RSI_VWAP = input(true, "RSI VOLUME WEIGHTED AVERAGE PRICE")
RSI_VWAP_length = input(14, "RSI-VWAP LENGTH")
RSI_VWAP_overSold = input(20, "RSI-VWAP OVERSOLD", type=input.float)
RSI_VWAP_overBought = input(80, "RSI-VWAP OVERBOUGHT", type=input.float)

// Stoploss and Profits Inputs
SL_TP = input(true, title="Stop loss and Take profit")
stoploss_input = input(10, title='Stop Loss %', type=input.float, step=0.2, minval=0.01)/100
takeprofit_input = input(20, title='Take Profit %', type=input.float, step=0.2, minval=0.01)/100
stoploss_level = strategy.position_avg_price * (1 - stoploss_input)
takeprofit_level = strategy.position_avg_price * (1 + takeprofit_input)

// RSI with VWAP as source
// RSI with VWAP as source
RSI_VWAP_1 = rsi(vwap(close), RSI_VWAP_length)
RSI_VWAP = security(syminfo.tickerid, resolution="", expression=RSI_VWAP_1, gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)

// Plotting, overlay=false
r=plot(RSI_VWAP, color = RSI_VWAP > RSI_VWAP_overBought ? color.red : RSI_VWAP < RSI_VWAP_overSold ? color.lime : color.blue, title="rsi", linewidth=2, style=plot.style_line)
h1=plot(RSI_VWAP_overBought, color = color.gray, style=plot.style_stepline)
h2=plot(RSI_VWAP_overSold, color = color.gray, style=plot.style_stepline)
fill(r,h1, color = RSI_VWAP > RSI_VWAP_overBought ? color.red : na)
fill(r,h2, color = RSI_VWAP < RSI_VWAP_overSold ? color.lime : na)

// Long only Backtest
strategy.entry("Long", strategy.long, when = (crossover(RSI_VWAP, RSI_VWAP_overSold)))
strategy.close("Long", when = (crossunder(RSI_VWAP, RSI_VWAP_overBought)))
strategy.exit("SL/TP", "Long", stop = stoploss_level, limit = takeprofit_level)
abdull9191
@kiwi047, how does it work ? Is it possible to insert alerts on it ?
SHANKAR12345
@kiwi047, can you code for vwap with crossing black crows and white soilders with sl lows and highs of the candlestick pattern,target trailed
เพิ่มเติม