--vdr feat hochladen2000 RSI

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

Tested with GER30            

Remove from Favorite Scripts Add to Favorite Scripts
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?
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.
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out