Forums › ProRealTime forum Italiano › Supporto ProOrder › Ottimizzazione dei Backtest › Reply To: Ottimizzazione dei Backtest
12/22/2025 at 2:21 PM
#254715
Dunque ho rivisto il codice originale di Ivan per farne uno script facilmente esportabile e incollabile all’inizio di ogni ProOrder.
Lo allego qui sotto.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
///////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Backtest filtering and optimizing script // // Scope : optimize the Backtest time, excluding or jumping over the combination that are not useful // for the Backtest. Example: if you are using the cross of 2 or more MA to detect order input or // exit, for sure, you have some not useful combinations like: // - MA1=MA2 // - FastMA>SlowMA // - a minimum distance from the periods of the MA // so, you can exclude this combination from the backtest. // // Usage : include and adapt this script to your ProOrder code, inserting it at the beginning // ///////////////////////////////////////////////////////////////////////////////////////////////////////////// // Detecting and exclude combinations C1=MAFAst>=MASlow C2=MASlow<MAFast+5 C3=Timestart>=TimeStop C4=TimeStop<TimeStart+6 //adding other conditions if necessary, including them into the if test if C1 and C2 and C3 and C4 then Quit endif // End script |