Indicatore SthocasticRSI
# Assign the indicator values to the PLOTx variables like in the following example:
INPUTS: @periods(14),@lineamin(30),@lineamax(74)
SET RSIL = MIN(RSI(CLOSE, @periods), @periods)
SET RSIH = MAX(RSI(CLOSE, @periods), @periods)
set DIFF = MAX(RSI(CLOSE, @periods), @periods)-MIN(RSI(CLOSE, @periods), @periods)
SET SthocasticRSI = ((RSI(CLOSE, @periods)-RSIL)/DIFF)*100
set plot1 = SthocasticRSI
set plot2 = @lineamin
set plot3 = @lineamax
#nuove righe aggiunte per test
SET cond1 = (SthocasticRSI > @lineamin) AND (REF(SthocasticRSI, 1) < @lineamin)
SET cond2 = (SthocasticRSI < @lineamax) AND (REF(SthocasticRSI, 1) > @lineamax)
SET prova1 = cond1 * 100
SET prova2 = cond2 * 100
SET PLOT4 = prova1
SET PLOT5 = prova2
#fine righe aggiunte per test
SthocasticRSI signal
Buy
INPUTS: @periods(14),@valmin(30),@valmax(74)
SET REQUIRED_BARS = 50
SET SRSI = SthocasticRSI(@periods)
CROSSOVER(SRSI, @valmin)
sell
SET SRSI = SthocasticRSI(@periods)
CROSSOVER(@valmax,SRSI)
Se metti il signal in Backtest dovresti ottenere il grafico che ho postato prima!
titolo ATLANTIA TF 1 ora