BACKTESTING MOLTO LENTO (ASC TREND)
- This topic has 3 replies, 4 voices, and was last updated 2 years ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
Forums › ProRealTime forum Italiano › Supporto ProOrder › BACKTESTING MOLTO LENTO (ASC TREND)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
// US 500 1€ TF 2 MINUTI 15K 1 MESE DEFPARAM CumulateOrders = false Defparam Flatbefore=080000 Defparam Flatafter=220000 // variabile M da 1 a 100 passo 1 //ONCE M = 78.0 MHull = average[ M ,7](close) Bullish = MHull > MHull[1] and MHULL[1] < MHULL[2] Bearish = MHull < MHull[1] and MHULL[1] > MHULL[2] MyAdx= Adx[14] >= 20 ONCE Segnale = 0 Segnale = CALL "PRC_ASCTrend v2"[3, 300] IF Segnale = 0 THEN Segnale = Segnale[1] ENDIF IF Segnale <> Segnale[1] THEN IF Segnale = 1 and MyAdx and Bullish THEN BUY 1 Contract at Market ELSIF Segnale = -1 and MyAdx and Bearish THEN SELLSHORT 1 Contract at Market ENDIF ENDIF set stop ploss 20 set target pprofit 20 |
Ciao Roberto
si puo’ rendere piu’ veloce il backtesting del TS indicato?
Risulta molto lento con qualsiasi strumento anche con uno storico
ridotto di 15k a 2 minuti e una variabile M da 1 a 100 passo 1 da ottimizzare;
con 200k è tutto bloccato.
Grazie
Perché l’indicatore fa molti calcoli ripetutamente usando array e cicli. Non è possibile farci niente.
Forse l’unico tentativo di miglioramento (ma di poco, credo) sia quello d’inserire il codice dell’indicatore direttamente nella tua strategia, in modo da evitare l’istruzione CALL.
Roberto,
Comunque provandolo in demo , viene respinto con motivazione “array non trovato”
Dovresti usare questa versione di ASCTrend compatibile con ProOrder: https://www.prorealcode.com/topic/strategie-avec-indicateur-asctrand/#post-159634 (leggi l'intero argomento).