Tutte le domande dei nuovi arrivati su MQL4 e MQL5, aiuto e discussione su algoritmi e codici - pagina 1889
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
Si prega di aiutare con il codice
fatto un indicatore
Nel tester funziona correttamente
Quando lo metto sul grafico non si visualizza correttamente
Non capisco perché
Si prega di aiutare con il codice
fatto un indicatore
Nel tester funziona correttamente
Quando lo metto sul grafico non viene visualizzato correttamente
Non riesco a capirne il motivo.
Hai usato il debugger per trovare la causa?
Per favore aiutatemi a scrivere il codice
Condizioni per l'indicatore:
Se il massimo (2) è maggiore del massimo precedente (1) e il minimo (2) è maggiore del minimo precedente (1), aspetta la situazione opposta (massimi 3 e 4) e (minimi 3 e 4). Al massimo tra i massimi (2 e 3), impostare il segno del massimo come un punto blu.
Se il massimo (4) è inferiore al massimo precedente (3) e il minimo (4) è inferiore al minimo precedente (3), aspetta la situazione opposta (massimi 5 e 6) e (minimi 5 e 6). Al minimo tra i massimi (4 e 5), il minimo è impostato come punto rosso.
Scusa, l'immagine non va bene.
Il codice stesso:
int Handle = FileOpen("2022.02.01 12-00",FILE_ANSI|FILE_WRITE|FILE_COMMON,'-'); //aprire per scrivere
FileWrite(Handle, "1", "643", "USDCAD","[11-1.30-0.70]");//scrivere il set di dati
FileSeek(Handle,0,SEEK_SET);//sostituito il puntatore all'inizio del file (penso che questo non sia necessario, ma comunque)
FileClose(Handle);//chiuso il file
Handle = FileOpen("2022.02.01 12-00",FILE_ANSI|FILE_SHARE_READ|FILE_COMMON,'-');//open for reading
Print(FileTell(Handle)," ",FileReadNumber(Handle)," ",FileReadNumber(Handle));
FileClose(Handle); //chiuso il file
La voce di registro deve contenere la posizione corrente del puntatore, uno spazio, il primo valore letto dal file (1), uno spazio, il secondo valore letto dal file (643). Invece, viene registrato quanto segue:
6 643.0 1.0
Cioè, per qualche ragione che non riesco a capire, il puntatore del file non è all'inizio del file, ma a sei byte da esso, al secondo separatore ("-"), mentre la lettura successiva è da destra a sinistra. I tentativi di spostare il puntatore all'inizio del file usando la funzione FileSeek non hanno avuto successo.
Il mio intelletto non è sufficiente per capirne la ragione. Per favore, spiega cos'è questo.
Per favore aiutatemi a scrivere il codice
Condizioni per l'indicatore:
Se il massimo (2) è maggiore del massimo precedente (1) e il minimo (2) è maggiore del minimo precedente (1), aspetta la situazione opposta (massimi 3 e 4) e (minimi 3 e 4). Al massimo tra i massimi (2 e 3), impostare il segno del massimo come un punto blu.
Se il massimo (4) è inferiore al massimo precedente (3) e il minimo (4) è inferiore al minimo precedente (3), aspetta la situazione opposta (massimi 5 e 6) e (minimi 5 e 6). Al minimo tra i massimi (4 e 5), il minimo è impostato come punto rosso.
Scusa, l'immagine non va bene.
Il codice stesso:
Non guardare avanti
Per favore, aiutatemi!
Non ricevo affatto quello che mi aspetto. Necessità di leggere il file di log
Buon pomeriggio a tutti. Ho un indicatore che disegna i livelli di Fibonacci. Ho bisogno che l'EA piazzi un altro EA con certe impostazioni su questo grafico quando il prezzo raggiunge il livello 61.8 su questa griglia Fibo e prema il pulsante per aprire un ordine.
Qui sotto c'è uno screenshot dell'indicatore e dell'EA con i suoi pulsanti. Non abbiamo il codice sorgente dell'Expert Advisor con i pulsanti. Un EA per tracciare il livello 61,8 sulla griglia Fibo non funzionerà nel tester; funzionerà sul conto demo e poi, se tutto va bene, questa combinazione potrà essere installata sul conto reale.
È davvero possibile farlo? Se è così, come implementarlo a parole, e poi nel codice? Per favore, spiegatelo in dettaglio e chiaramente.
Buon pomeriggio a tutti. Ho un indicatore che disegna i livelli di Fibonacci. Ho bisogno che l'EA piazzi un altro EA con certe impostazioni su questo grafico quando il prezzo raggiunge il livello 61.8 su questa griglia Fibo e prema il pulsante per aprire un ordine.
Qui sotto c'è uno screenshot dell'indicatore e dell'EA con i suoi pulsanti. Non abbiamo il codice sorgente dell'Expert Advisor con i pulsanti. Un EA per tracciare il livello 61,8 sulla griglia Fibo non funzionerà nel tester; funzionerà sul conto demo e poi, se tutto va bene, questa combinazione potrà essere installata sul conto reale.
È davvero possibile farlo? Se è così, come implementare a parole, e poi in codice? Per favore, spiegate come potete più dettagliatamente e chiaramente.
Ha una memoria di 24 ore?