vDr78

--vdr feat hochladen2000 RSI

Tune your offset to close paramters input rsi for entry long, short, oversold, overbought.

Tested with GER30

Enjoy!
Von Favorisierten Skripten entfernen Zu Favorisierten Skripten hinzufügen
//@version=2
strategy("--vdr feat hochladen2000 RSI", overlay=true, calc_on_every_tick=true, calc_on_order_fills=true)

offset_to_close = input(0.7, minval=0.001, step=0.1)

from_year=input(2016, minval=2000, maxval=2020)
from_month=input(1, minval=1, maxval=12)
from_day=input(1, minval=1, maxval=31)

to_year=input(2016, minval=2007, maxval=2020)
to_month=input(12, minval=1, maxval=12)
to_day=input(31, minval=1, maxval=31)

in_time()=> (time >= (timestamp(from_year, from_month, from_day, 00, 00)) and time < (timestamp(to_year, to_month, to_day, 00, 00)))

length = input( 14 )
rsiEntryLong = input( 51 )
rsiEntryShort = input( 49 )
rsiOverSold = input( 15 )
rsiOverBought = input( 85 )
price = close

vrsi = rsi(price, length)

openLong = in_time() and crossover(vrsi, rsiEntryLong)
openShort= in_time() and crossunder(vrsi, rsiEntryShort)

closeLongV3  = (open-close)>offset_to_close or crossover(vrsi, rsiOverBought)
closeShortV3 = (close-open)>offset_to_close or crossunder(vrsi, rsiOverSold)

if (not na(vrsi))
    strategy.entry("LONG", strategy.long, when= openLong)
    strategy.entry("SHORT", strategy.short, when =openShort)
    strategy.close("LONG",  when = closeLongV3 and not openShort)
    strategy.close("SHORT", when = closeShortV3 and not openLong)
Does this strategy repaint signals?
Antworten
zelibobla mynmi16
In general it must not repaint, but in author's example (and displayed performance) it does because he uses Heikin Ashi candles which formula includes higher timeframe close price what leads to known bug: https://getsatisfaction.com/tradingview/topics/strategies-and-indicators-are-repainting

Please vote up for fix.
Antworten
Startseite Aktien-Screener Forex-Screener Krypto-Screener Wirtschaftskalender So funktioniert es! Chartmerkmale Preise Hausregeln Moderatoren Webseite & Brokerlösungen Widgets Charting Lösungen Hilfe Themen Feature-Anfrage Blog & News FAQ - Häufige Fragen & Antworten Wiki Twitter
Profil Profileinstellungen Konto und Abrechnung TradingView Coins Meine Support Tickets Hilfe Themen Veröffentlichte Ideen Followers Ich folge Private Nachrichten Chat Abmelden