Discussione: Divergenze tra Strategy in Real e Backtest su TS
Visualizzazione Elencata
-
10-10-13, 09:33 #9
- Data Registrazione
- Oct 2009
- Messaggi
- 566
Ringrazio Thalos per aver sollevato questo aspetto e Tiziano per la risposta dato che anch'io ho trovato questo problema, ovvero la divergenza tra il backtest e il reale.
il codice è molto semplice:
buy scripts
# REQUIRED_BARS is used to adjust how many periods will be used to initialize calculations. Default value is 50 periods.
# Un-comment and edit the line below to set your own value.
# SET REQUIRED_BARS = 50
INPUTS: @periods(10), @trailAmount(100), @trailPercent(10), @stopLoss(400)
SET TRAILING_STOP = @trailAmount
SET TRAILING_PERCENT = @trailPercent
SET STOP_LOSS = @stopLoss
SET hh = HighestHighValue(@periods)
#SET ll = LowestLowValue(@periods)
HIGH = hh
sell scripts (di seguito)
#SET hh = HighestHighValue(@periods)
SET ll = LowestLowValue(@periods)
LOW = ll
(PS: utilizzo per i test un solo future sul CAC40 e sul Dax e il Tf = 5 minuti, quindi il problema del n. contratti non si pone, trattasi di 1 solo contratto).
Chiedo quindi aiuto per capire quale istruzione devo inserire (o come modificare lo script) perché in real time si comporti come nel backtest. Grazie.Ultima modifica di TFiutoT384; 10-10-13 alle 09:52