// =================================== // STRATEGIA RSI MULTI-TIMEFRAME BeQuant Bootcamp 19 Novembre 2025 // =================================== // // Quant Trader Academy - academy.quantaste.com // // Come impostare i dati in MultiCharts / TradeStation: // data1 = S&P 500 a 15 minuti (timeframe principale) // data2 = S&P 500 a 30 minuti // data3 = S&P 500 a 60 minuti // // Il codice va applicato al grafico con i tre data feed gia' caricati, // altrimenti RSI_30m e RSI_60m non trovano la serie e la strategia non compila. // // Stop loss e take profit sono in dollari sul future grande: sul micro // dividi per dieci, sui CFD dipende dal tuo broker. Controlla il valore // del punto prima di mandarla in esecuzione. // // Questa strategia e' materiale didattico. Non e' un consiglio finanziario // e non e' pronta per il conto reale cosi' com'e': va testata, validata e // dimensionata sul tuo capitale. // =================================== inputs: RSIPeriod(14), // Periodo RSI RSIOversold(30), // Livello ipervenduto TimeExitBars(230), // Barre per uscita temporale TakeProfit(2800), // Take Profit in dollari StopLoss(2500); // Stop Loss in dollari variables: RSI_Main(0), // RSI timeframe principale RSI_30m(0), // RSI 30 minuti RSI_60m(0), // RSI 60 minuti PrevDayBearish(false), // Candela giornaliera precedente ribassista AllRSIBelowLevel(false); // Convergenza RSI // =================================== // CALCOLO INDICATORI // =================================== // RSI sui tre timeframes RSI_Main = RSI(Close of data1, RSIPeriod); RSI_30m = RSI(Close of data2, RSIPeriod); RSI_60m = RSI(Close of data3, RSIPeriod); // Verifica candela giornaliera precedente ribassista PrevDayBearish = CloseD(1) < OpenD(1); // Convergenza: tutti e 3 gli RSI sotto livello 30 AllRSIBelowLevel = RSI_Main < RSIOversold and RSI_30m < RSIOversold and RSI_60m < RSIOversold; // =================================== // RISK MANAGEMENT // =================================== SetStopLoss(StopLoss); SetProfitTarget(TakeProfit); // =================================== // LOGICA DI INGRESSO - SOLO LONG // =================================== if MarketPosition = 0 then begin if AllRSIBelowLevel and PrevDayBearish then begin Buy("RSI_Long") 1 Contract next bar at market; end; end; // =================================== // LOGICA DI USCITA TEMPORALE // =================================== if MarketPosition = 1 then begin if BarsSinceEntry >= TimeExitBars then begin Sell("TimeExit") next bar at market; end; end;