Ti stai perdendo delle opportunità di trading:
- App di trading gratuite
- Oltre 8.000 segnali per il copy trading
- Notizie economiche per esplorare i mercati finanziari
Registrazione
Accedi
Accetti la politica del sito e le condizioni d’uso
Se non hai un account, registrati
Codice alternativo:
Codice alternativo:
se(indice>0 || indice>8) ritorna (-1);
Forse if(index < 0 || ...) ...; ?
La seconda versione del codice è davvero migliore... e più bella
--
È vero... quando è più difficile mantenere un codice ottimizzato per le dimensioni che uno sfocato.
cioè, scritto in modo più ampio è a volte più facile da mantenere...
--
In SQL è al contrario... ottimizzazione del codice
metterlo in una singola query fa addirittura male
quello che è interessante ...
per esempio il codice SQL di una query complessa è più difficile da leggere di alcune query SQL successive
e per quanto strano possa sembrare, la performance di tre query semplici è spesso migliore di quella di una query complessa (apparentemente ottimizzata)
La logica di coloro che scrivono complesse query SQL... soffre... solo perché...
1 - scomodo da mantenere
2-lento lavoro
--
non si applicano al tuo codice
questo è solo per esperienza...
Ecco qualcosa che mi è piaciuto molto... Preso dal thread di Igor Kim, il suo primo codice:
... e il suo secondo:
Com'è? Mi ha fatto piacere personalmente... :))Fatto un indicatore. Ma quando ZZCount>1 il terminale si blocca. Sembra che non ci siano errori.
Forse qualcuno troverà la causa?
Anche tu puoi essere un vecchio.
Grazie mille!
A volte è necessario ordinare i dati in MQL4 senza toccare i dati stessi. Non ci sono puntatori in MQL4, e non ci sono nemmeno strutture.
Ecco un esempio di uno script che ordina i dati secondo diversi parametri attraverso l'emulazione di puntatori. Forse qualcuno troverà utile questo approccio e la funzione di ordinamento.
Il risultato del lavoro: