Professional Documents
Culture Documents
Strategia RSI2
Strategia RSI2
strategy("RSI2", overlay=true)
//inizializzazione parametri
//RSI
src = close
len = input(2, minval=1, title="RSILength")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - 100 / (1 + up / down)
//medie mobili
//soglie RSI
RSIthreshUP = input (90, title="Threshold RSI up")
RSIthreshDWN = input (10, title="Threshold RSI down")
//input ticker
tick=input(0.5,title="Ticker size",type=input.float)
filter=input(true,title="Trend Filter",type=input.bool)
plot(mmslow, color=color.white)
plot(mmfast, color=color.yellow)
if ConditionEntryS
strategy.entry("RSIShort", strategy.short)