Questo dovrebbe essere tenuto a mente quando si valuta la misurazione delle azioni una tantum attraverso questo benchmark.
Un modo più accurato di misurare:
voidOnTick()
{
MqlTick Tick;
ulong gstart=GetMicrosecondCount();
int count=10000;
for(int i=0; i<count; i++)
{
SymbolInfoTick(_Symbol, Tick);
}
ulong gend=GetMicrosecondCount()-gstart;
Print(count," iterations, total time ", DoubleToString(gend/1000.0,3)," ms; avr time: ",DoubleToString(gend/1000.0/count,3)," ms");
}
20 grafici.
Costruire 2656.
2020.10.2010:55:12.725SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 10.031 ms; avr time: 0.001 ms
2020.10.2010:55:12.726SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 10.799 ms; avr time: 0.001 ms
2020.10.2010:55:12.726SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 11.080 ms; avr time: 0.001 ms
2020.10.2010:55:12.727SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 11.181 ms; avr time: 0.001 ms
2020.10.2010:55:12.727SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 11.158 ms; avr time: 0.001 ms
2020.10.2010:55:12.727SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 11.202 ms; avr time: 0.001 ms
2020.10.2010:55:12.727SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 11.206 ms; avr time: 0.001 ms
2020.10.2010:55:13.030SymbolInfoTick (GBPCHF,H1) 10000 iterations, total time 0.433 ms; avr time: 0.000 ms
2020.10.2010:55:13.528SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 6.344 ms; avr time: 0.001 ms
2020.10.2010:55:13.530SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 8.253 ms; avr time: 0.001 ms
2020.10.2010:55:13.532SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 9.745 ms; avr time: 0.001 ms
2020.10.2010:55:13.532SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 9.873 ms; avr time: 0.001 ms
2020.10.2010:55:13.532SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 10.392 ms; avr time: 0.001 ms
2020.10.2010:55:13.532SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 10.201 ms; avr time: 0.001 ms
2020.10.2010:55:13.532SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 10.020 ms; avr time: 0.001 ms
2020.10.2010:55:13.532SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 10.388 ms; avr time: 0.001 ms
2020.10.2010:55:14.439SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 11.488 ms; avr time: 0.001 ms
2020.10.2010:55:14.439SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 12.251 ms; avr time: 0.001 ms
2020.10.2010:55:14.439SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 12.257 ms; avr time: 0.001 ms
2020.10.2010:55:14.440SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 12.495 ms; avr time: 0.001 ms
2020.10.2010:55:14.440SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 12.624 ms; avr time: 0.001 ms
2020.10.2010:55:14.440SymbolInfoTick (AUDUSD,M15) 10000 iterations, total time 12.592 ms; avr time: 0.001 ms
A volte la misurazione stessa è lenta, cioè ::GetMicrosecondCount().
Un semplice esempio:
20 grafici.
GetLastError() sta solo leggendo una cella di memoria nel nat. In realtà circa costo zero.
Grazie, capisco. Ma forse considerare ancora l'introduzione di variabili predefinite? Leggere una variabile sarebbe probabilmente più veloce che chiamare una funzione e riempire una struttura.
Consenti l'uso dei cookie per accedere al sito MQL5.com.
Abilita le impostazioni necessarie nel browser, altrimenti non sarà possibile accedere.
Hai effettuato l'accesso. L'autenticazione a due fattori è stata disattivata. Configurala di nuovo e scansiona un nuovo codice QR, oppure continua con l'autenticazione a due fattori disattivata.
La ragione della frenata di SymbolInfoTick sembra essere la gestione parallela.
Risultato (inAmount = 15).
> 100 ms per l'esecuzione di SymbolInfoTick. È chiaro che il codice è autocostruito. Ma mostra il motivo per cui rallenta sui soliti Expert Advisors.
Forum sul trading, sistemi di trading automatico e test di strategia
MT5 e la velocità in azione
Romano, 2020.10.14 04:54
Le variabili predefinite, per il tick corrente, sarebbero meglio.
Il risultato (inAmount = 15).
L'HFT non può essere costruito con tali ritardi.
Non sarebbe meglio togliere il tiki dal vetro?
Non l'hai misurato?
Z.u.s. o meglio ancora FIX it ))
È meglio non identificare un nuovo tick attraverso le barre.
Risultato.
Le barre sono in ritardo di secondi rispetto allo stato attuale! Ciao amanti delle barre e degli indicatori.
È estremamente difficile chiamarlo un autoscatto.
Risultato (inAmount = 15).
Come si fa?
20 grafici.
Costruire 2656.
Ahh, c'erano 1000 domande lì?
Solo che non sono al computer per controllare.
fxsaber, e davvero perché ci sarebbero 1000 richieste per il tick corrente?
Anton, ma è ancora scivolato 19 mcs.
Come percentuale del resto, è 850%
Roman:
Anton, ma è ancora scivolato 19 mcs.
Come percentuale del resto, è l'850%.
A volte la misurazione stessa è lenta, cioè ::GetMicrosecondCount().
Un semplice esempio:
20 grafici.
GetLastError() sta solo leggendo una cella di memoria nel nat. In realtà circa costo zero.
Se avete ancora dei dubbi, potete farlo in questo modo:
Questo dovrebbe essere tenuto a mente quando si valuta la misurazione delle azioni una tantum attraverso questo benchmark.
Un modo più accurato di misurare:
20 grafici.
Costruire 2656.
A volte la misurazione stessa è lenta, cioè ::GetMicrosecondCount().
Un semplice esempio:
20 grafici.
GetLastError() sta solo leggendo una cella di memoria nel nat. In realtà circa costo zero.
Grazie, capisco.
Ma forse considerare ancora l'introduzione di variabili predefinite?
Leggere una variabile sarebbe probabilmente più veloce che chiamare una funzione e riempire una struttura.
Un modo più accurato di misurare:
Temperatura media dell'ospedale.