ProOrder che non danno stessi risultati
Forums › ProRealTime forum Italiano › Supporto ProOrder › ProOrder che non danno stessi risultati
- This topic has 12 replies, 4 voices, and was last updated 1 week ago by
Alessandro Furlani.
-
-
12/03/2025 at 11:46 AM #254201
Buongiorno, vi sottopongo il rompicapo della settimana.
Ho 2 ProOrder con codice leggermente differente ma che esegue esattamente le stesse istruzioni con lo stesso setup. In pratica uno è l’evoluzione dell’altro ma con un determinato setup, cioè AutoReverse=0 deve funzionare come il suo predecessore. Invece no i risultati sono completamente diversi come potete vedere nello screesnhot allegato.
Mi potete spiegare come mai ?
Grazie
12/03/2025 at 11:53 AM #254205Un sistema ha la funzione “Tick by Tick” abilitata e l’altro sistema no?
Oppure, più probabilmente…
Un sistema ha un valore per lo Spread impostato nel motore di backtest e l’altro sistema ha un valore pari a 0 per lo Spread?
12/03/2025 at 12:09 PM #254206Allora, effettivamente uno aveva le commissioni settate e l’altro no. Ora sono esattamente uguali, e comunque il risultato è diverso.
12/03/2025 at 1:07 PM #254209Inserisci entrambe le versioni del codice nel diffchecker al link qui sotto… per essere sicuro al 100% che i due codici siano identici.
Confronta il testo e trova le differenze online o offline – Diffchecker
12/03/2025 at 2:29 PM #254214come ho detto i due codici non sono esattamente identici, ma con l’opzione AutoReverse=0, devono fare esattamente la stessa cosa, cosa che non accade
12/03/2025 at 2:46 PM #254215devono fare esattamente la stessa cosa, cosa che non accade
Rendi i 2 codici “esattamente” uguali per ottenere lo stesso risultato.
Quindi inverti una modifica alla volta su un solo codice finché non vedi una differenza nel risultato… dovresti essere vicino al problema?
12/03/2025 at 3:35 PM #254216Grazie ma fin qui ci arrivavo anch’io, è una normale procedure di bug detecting, chiedevo sul forum perchè, dato che il codice è semplice, se c’è qualche regola che non ho rispettato o qualche comportamento che non conosco del codice, qualcuno più esperto se ne accorge subito.
Saluti
12/03/2025 at 3:54 PM #254218Ci sono molti blocchi di codice (ripetuti) che sono diversi tra Code1 e Code2… vedi le evidenziazioni verdi a sinistra dell’allegato. Lo saprai.
I “Coding Wizards” potrebbero notare qualcosa se pubblicassi il codice (sono molto impegnati e potrebbero non riuscire a scaricare e aprire i file .itf nell’editor di codice, ecc.).
1 user thanked author for this post.
12/03/2025 at 4:02 PM #25422012/03/2025 at 5:58 PM #254223cosa intendi scusa, le variabili sono esattamente le stesse. Il codice non può essere esattamente uguale perchè, come dicevo il Maximus3.2AV è una evoluzione e quindi ha delle funzioni in più.
Mi chiarisci meglio cosa intendi ?
Pubblico il codice qui sotto, l’avevo allegato perchè pensavo di fare meglio.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120//-------------------------------------------------------------------------// Codice principale : Maximus3.0//-------------------------------------------------------------------------// MAXIMUS ======// Creado Por TradingenelIbex35 para Prorealcode// Version 3.0 Lite// periodo de Prueba NASDAQ Composite index date 010109 hasta hoy//Defparam CUMULATEORDERS = TRUE//Defparam NOCASHUPDATE = TRUE//////////Filtro =180//Sloss = 10 // %//SProfit = 85 // %//ONCE Filtro = 40.0//ONCE LongTrade = 1.0//ONCE MaxLot = 5.0//ONCE MinLot = 1.0//ONCE SProfit = 10.0//ONCE ShortTrade = 1.0//ONCE Sloss = 1.0//ONCE Switch = 1.0X = 0Y = 1Z = 2//////==== CONTRATOS A NEGOCIAR =========//Xhares = MinLot//// ====== Numero Maximo de contratos a negociar ============//NLshares = MaxLotNSshares = MaxLot////// ========== CODIGO ===================//HULL = weightedaverage[filtro](close)//Long tradingif LongTrade = 1 thenIF BarIndex>LastOrderBar and close[x] crosses over highest[6](high[1]) and hull[y] > hull[z] and COUNTOFLONGSHARES < NLshares THENbuy Xhares CONTRACTS AT MARKETSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses over highest[20](high[1]) and hull[y] > hull[z] and COUNTOFLONGSHARES < NLshares THENbuy Xhares CONTRACTS AT MARKETSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses over highest[50](high[1]) and hull[y] > hull[z] and COUNTOFLONGSHARES < NLshares THENbuy Xhares CONTRACTS AT MARKETSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses over highest[100](high[1]) and hull[y] > hull[z] and COUNTOFLONGSHARES < NLshares THENbuy Xhares CONTRACTS AT MARKETSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses over highest[200](high[1]) and hull[y] > hull[z] and COUNTOFLONGSHARES < NLshares THENbuy Xhares CONTRACTS AT MARKETSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFendif// Short tradingif ShortTrade = 1 thenIF BarIndex>LastOrderBar and close[x] crosses under highest[6](high[1]) and hull[y] < hull[z] and COUNTOFSHORTSHARES < NSshares THENSellShort Xhares CONTRACTS AT MARKETSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses under highest[20](high[1]) and hull[y] < hull[z] and COUNTOFSHORTSHARES < NSshares THENSellShort Xhares CONTRACTS AT MARKETSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses under highest[50](high[1]) and hull[y] < hull[z] and COUNTOFSHORTSHARES < NSshares THENSellShort Xhares CONTRACTS AT MARKETSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses under highest[100](high[1]) and hull[y] < hull[z] and COUNTOFSHORTSHARES < NSshares THENSellShort Xhares CONTRACTS AT MARKETSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses over highest[200](high[1]) and hull[y] < hull[z] and COUNTOFSHORTSHARES < NSshares THENSellShort Xhares CONTRACTS AT MARKETSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFendif123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189////////////////////////////////////////////////////////////////////////////////////////////////////////// MAXIMUS 3.2 AV Author: Alessandro Furlani// File: Maximus3.2AV email: alex.furlani@gmail.com//// Note: Maximus 3.2 AV is inspirated by the draft free code of Maximus 3.0 lite, published on// ProRealCode web site so, first thanks to the author who was able to inspire me.// This improved version, was completed with the short section not present on the original code// and tuned for a more efficient behaviour.// This version is extremely effective on H1 timeframe but wioth an high drawdown so, to adjust// the robot to different needs, i have made some changes to adapt the robot to more fast// timeframe.// At the moment the robot is giving us good results on M5 timeframe with acceptable drawdown// but timeframe of 10m or 15m should be considered to tune.////////////////////////////////////////////////////////////////////////////////////////////////////////Defparam CUMULATEORDERS = TRUE//Defparam NOCASHUPDATE = TRUEX = 0Y = 1Z = 2Xhares = MinLot// Setup IndicatorsHULL = weightedaverage[Filtro](close)if AutoReverse = 1 thenARHULL = weightedaverage[ARFiltro](close)if ARHULL[y]>ARHULL[z] thenTrend=1elseTrend=0endifendif//Long tradingif LongTrade = 1 thenIF BarIndex>LastOrderBar and close[x] crosses over highest[6](high[1]) and hull[y] > hull[z] thenif AutoReverse=0 and COUNTOFLONGSHARES < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=0 and CountofShortShares < MaxLot thensellshort Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=1 and CountofLongShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=2 and CountofShortShares < MaxLot thensellshort Xhares CONTRACTS AT MARKETendifSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses over highest[20](high[1]) and hull[y] > hull[z] thenif AutoReverse=0 and COUNTOFLONGSHARES < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=0 and CountofShortShares < MaxLot thensellshort Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=1 and CountofLongShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=2 and CountofShortShares < MaxLot thensellshort Xhares CONTRACTS AT MARKETendifSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses over highest[50](high[1]) and hull[y] > hull[z] thenif AutoReverse=0 and COUNTOFLONGSHARES < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=0 and CountofShortShares < MaxLot thensellshort Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=1 and CountofLongShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=2 and CountofShortShares < MaxLot thensellshort Xhares CONTRACTS AT MARKETendifSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses over highest[100](high[1]) and hull[y] > hull[z] thenif AutoReverse=0 and COUNTOFLONGSHARES < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=0 and CountofShortShares < MaxLot thensellshort Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=1 and CountofLongShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=2 and CountofShortShares < MaxLot thensellshort Xhares CONTRACTS AT MARKETendifSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses over highest[200](high[1]) and hull[y] > hull[z] thenif AutoReverse=0 and COUNTOFLONGSHARES < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=0 and CountofShortShares < MaxLot thensellshort Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=1 and CountofLongShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=2 and CountofShortShares < MaxLot thensellshort Xhares CONTRACTS AT MARKETendifSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFendif// Short tradingif ShortTrade = 1 thenIF BarIndex>LastOrderBar and close[x] crosses under highest[6](high[1]) and hull[y] < hull[z] thenif AutoReverse=0 and COUNTOFSHORTSHARES < MaxLot thenSellShort Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=1 and CountofLONGShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=0 and CountofShortShares < MaxLot thenSellShort Xhares CONTRACTS AT MARKETelsif AutoReverse=2 and CountofLONGShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETendifSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses under highest[20](high[1]) and hull[y] < hull[z] thenif AutoReverse=0 and COUNTOFSHORTSHARES < MaxLot thenSellShort Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=1 and CountofLONGShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=0 and CountofShortShares < MaxLot thenSellShort Xhares CONTRACTS AT MARKETelsif AutoReverse=2 and CountofLONGShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETendifSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses under highest[50](high[1]) and hull[y] < hull[z] thenif AutoReverse=0 and COUNTOFSHORTSHARES < MaxLot thenSellShort Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=1 and CountofLONGShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=0 and CountofShortShares < MaxLot thenSellShort Xhares CONTRACTS AT MARKETelsif AutoReverse=2 and CountofLONGShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETendifSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses under highest[100](high[1]) and hull[y] < hull[z] thenif AutoReverse=0 and COUNTOFSHORTSHARES < MaxLot thenSellShort Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=1 and CountofLONGShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=0 and CountofShortShares < MaxLot thenSellShort Xhares CONTRACTS AT MARKETelsif AutoReverse=2 and CountofLONGShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETendifSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFIF BarIndex>LastOrderBar and close[x] crosses under highest[200](high[1]) and hull[y] < hull[z] thenif AutoReverse=0 and COUNTOFSHORTSHARES < MaxLot thenSellShort Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=1 and CountofLONGShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETelsif AutoReverse=1 and Trend=0 and CountofShortShares < MaxLot thenSellShort Xhares CONTRACTS AT MARKETelsif AutoReverse=2 and CountofLONGShares < MaxLot thenbuy Xhares CONTRACTS AT MARKETendifSET STOP %LOSS slossSET TARGET %PROFIT sprofitLastOrderBar=BarIndexENDIFendif12/03/2025 at 8:05 PM #25422812/03/2025 at 9:27 PM #254230In Maximus 3.0 alla riga 114 è indicato “Crosses Over”, mentre dovrebbe essere “Crosses Under”…
In Maximus 3.2 AV invece è già presente “Crosses Under”…
Una volta corretto questo en, utilizzando gli stessi parametri, i due codici producono esattamente lo stesso risultato…
1 user thanked author for this post.
12/03/2025 at 11:14 PM #254233Ti ringrazio questa è la risposta giusta, non sò come ma mi è sfuggito
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on 