ottimizzazione only long giorni settimana
Forums › ProRealTime forum Italiano › Supporto ProOrder › ottimizzazione only long giorni settimana
- This topic has 37 replies, 5 voices, and was last updated 1 month ago by
phoentzs.
-
-
11/08/2025 at 12:31 PM #253416
Non capisco perchè non funziona come mi aspetto il codice con ottimizzazione.
11/08/2025 at 4:35 PM #253417L’unico che può darti una risposta sei tu stesso, a meno che non posti il codice completo e funzionante (sia testo che il file ITF, se possibile) dicendo che ottimizzazioni vuoi fare e dove, secondo te, non funzionano.
1 user thanked author for this post.
11/09/2025 at 1:52 PM #253419hai perfettamente ragione, non riuscivo ad allegare un file ne ad inserire il codice
DEFPARAM CumulateOrders=False
//OTTIMIZZAZIONE:
//DOE da 1 a 5
//Step 1// Si compra il giorno
// 1=lunedì 2=martedì 3=mercoledì 4=giovedìIF NOT ONMARKET and DayOfWeek=DOE then
BUY 1 CONTRACT AT MARKET
ENDIF// Si vende il gg successivo
IF LONGONMARKET and (DayOfWeek >=DOE+1) and (Day>Day[1]) then
SELL 1 CONTRACT AT MARKET
ENDIF11/09/2025 at 3:01 PM #253421Ciao,
Quando ottimizzi il codice con la variabile DOE, ottieni (solo) quattro risultati:
uno per quando hai comprato di lunedì e gli altri per quando hai comprato di martedì, mercoledì o giovedì…
Ora puoi vedere qual è il giorno ottimale, nel periodo considerato, per comprare…
2 users thanked author for this post.
11/09/2025 at 4:50 PM #253428e per avere il 5° risultato, comprando il venerdì come si può fare?
11/09/2025 at 5:00 PM #25342911/09/2025 at 6:48 PM #253433se guardi il mio codice ottimizza già come scrivi tu. l’errore è un altro
11/09/2025 at 6:56 PM #25343411/09/2025 at 7:52 PM #253436Nel tuo screen, che non avevo visto, l’ottimizzazione per il valore 5 è vuoto.
11/09/2025 at 7:57 PM #253438Il fatto che la posizione aperta il venerdì non venga venduta non dipende dall’ottimizzazione, ma dal codice…
Nel codice è indicato che una posizione aperta il venerdì deve essere chiusa il giorno successivo, ma il giorno successivo è sabato (mercato chiuso), quindi la posizione non può essere chiusa…
Puoi modificare facilmente il codice in questo modo:
Day Of Week Opt12345678910111213141516171819DEFPARAM CumulateOrders=False//OPTIMIZATION://DOE 1 to 5//Step 1// You buy on the day// 1=Monday 2=Tuesday 3=Wednesday 4=ThursdayIF NOT ONMARKET and DayOfWeek=DOE thenBUY 1 CONTRACT AT MARKETENDIF// It will be sold the following dayIf LongOnMarket and DOE=5 and DayOfWeek=1 thenSell 1 contract at MarketElsIf LONGONMARKET and (DayOfWeek >=DOE+1) and (Day>Day[1]) thenSELL 1 CONTRACT AT MARKETENDIF2 users thanked author for this post.
11/10/2025 at 8:04 AM #253449Su che TIME FRAME lo fai girare? A me su TF giornaliero continua a dare 0 il lunedì.
11/10/2025 at 9:29 AM #253458Puoi utilizzare qualsiasi timeframe “intraday”…
1 user thanked author for this post.
11/10/2025 at 10:30 AM #253464OK ma vorrei capire qual è il motivo che non lo fa funzionare sul daily. Ho uno storico ridotto se scendo in intraday senza versione premium.
11/10/2025 at 10:36 AM #253467tra l’altro c’è qualcosa che non funziona neanche in intraday se guardo il numero di trade che dovrebbe essere più o meno simile nei gg della settimana
11/10/2025 at 11:42 AM #253476 -
AuthorPosts
Find exclusive trading pro-tools on