Tutte le domande dei nuovi arrivati su MQL4 e MQL5, aiuto e discussione su algoritmi e codici - pagina 1292
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
Salve.
Sono un novellino, quindi non rimproveratemi troppo).
https://www.mql5.com/ru/articles/100
Questo articolo fornisce un esempio di un EA che dovrebbe piazzare un ordine di acquisto solo se c'è un segnale di acquisto e nessuna posizione long aperta. Allo stesso modo nel caso di condizioni di vendita - sell e nessuna posizione short aperta.
Durante il primo test, ci siamo presto resi conto che non solo una posizione era aperta, ma diverse posizioni. La domanda è perché?
Ho letto il codice dell'Expert Advisor e ho cercato di capire e trovare la ragione, ma tutto sembra ok.
Salve.
Sono un novellino, quindi non rimproveratemi troppo).
https://www.mql5.com/ru/articles/100Questo articolo fornisce un esempio di un EA che dovrebbe piazzare un ordine di acquisto solo se c'è un segnale di acquisto e nessuna posizione long aperta. Allo stesso modo nel caso di condizioni di vendita - sell e nessuna posizione short aperta.
Durante il primo test, ci siamo presto resi conto che non solo una posizione era aperta, ma diverse posizioni. La domanda è perché?
Ho letto il codice dell'Expert Advisor e ho cercato di capirlo e trovarne la ragione.
Prova a cambiare
if(Buy_opened)
a
Lo stesso per la vendita
Prova a sostituire
a
Allo stesso modo per la vendita
Non servirà. Leggere più spesso la documentazione.
"disegnare una linea di tendenza, nel futuro"
Da due punti su una linea, si può trovare il prezzo di un terzo punto arbitrario su quella linea, anche nel futuro (e viceversa).
Salve.
Si prega di prestare attenzione a"Chechako ".
Ho bisogno di segnalare errori nel codice, perché nel tester, l'EA non apre gli ordini...
Il compilatore non mostra alcun errore o avvertimento, lo stesso diario non mostra errori...
Salve.
Sono un novellino, quindi non rimproveratemi troppo).
https://www.mql5.com/ru/articles/100
Questo articolo fornisce un esempio di un EA che dovrebbe piazzare un ordine di acquisto solo se c'è un segnale di acquisto e nessuna posizione long aperta. Allo stesso modo nel caso di condizioni di vendita - sell e nessuna posizione short aperta.
Durante il primo test, ci siamo presto resi conto che non solo una posizione era aperta, ma diverse posizioni. La domanda è: perché?
Ho letto il codice dell'Expert Advisor e ho cercato di capirlo e trovarne la ragione.
Ho cercato di aiutare. Anch'io sono un novellino. Ora, per quanto riguarda la tua domanda. Diverse posizioni sono aperte perché il controllo per aprire una posizione è stato eseguito e il controllo è stato dimenticato per fermarsi. L'operatore return restituisce il controllo al programma chiamante (tratto da MQL5 Reference).
Dobbiamo aggiungere il ritorno al codice di Expert Advisor (evidenziato in giallo):
Inoltre, per evitare che il compilatore generi avvertimenti, si dovrebbe aggiungere un'altra condizione nelle condizioni di apertura delle posizioni Buy e Sell per controllare OrderSend(mrequest,mresult). Questa condizione è definita dall'operatore if e dovrebbe apparire così
Un'altra cosa dovrebbe essere presa in considerazione. A volte, quando si passa da un giorno di trading ad un altro alle 23:59:59, una posizione aperta si chiude e poi, alle 00:00:00, si apre una nuova posizione. Questo è il cosiddetto rollover close e rollover open, che dipende dal particolare forex dealer e dalle sue condizioni di trading. Cerca nel forum, ho delle informazioni a riguardo da qualche parte.
Saluti, Vladimir.
Ciao. Le persone hanno bisogno del tuo aiuto. Ho collegato due zigzag con parametri diversi in un indicatore (nessun errore o avviso) Il problema è che il secondo zigzag è disegnato in modo errato.
Ecco il codice stesso (MQL5)
Ciao a tutti. La gente ha bisogno del tuo aiuto. Ho combinato due zigzag con parametri diversi in un indicatore (nessun errore o avvertimento) Il problema è che 2 zigzag non sono disegnati correttamente.
Ecco il codice stesso (MQL5)
Funziona tutto - basta fissare alcune cifre in alto
Funziona tutto - aggiusta un po' i numeri in alto.
Grazie per l'aiuto. Un'altra cosa, perché uno zigzag si forma come al solito (massimo, minimo) e l'altro si forma solo al massimo.