vDr78

--vdr feat hochladen2000 RSI

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

Tested with GER30

Enjoy!
Supprimer des scripts favoris Ajouter aux scripts favoris
//@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?
Répondre
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.
Répondre
Accueil Filtre d'actions Filtre Forex Filtre Crypto Calendrier économique Comment ça marche Caractéristiques du graphique Prix Règles de conduite Modérateurs Solutions site web & courtier Widgets Solutions de cartographie Obtenir de l'aide Demande de fonctionnalité Blog & News Questions Fréquentes Wiki Twitter
Profil Paramètres du Profil Compte et Facturation Obtenir de l'aide Idées Publiées Suiveurs Suivi Messages privés dialogue en ligne Se Déconnecter