Vous manquez des opportunités de trading :
- Applications de trading gratuites
- Plus de 8 000 signaux à copier
- Actualités économiques pour explorer les marchés financiers
Inscription
Se connecter
Vous acceptez la politique du site Web et les conditions d'utilisation
Si vous n'avez pas de compte, veuillez vous inscrire
double perceptron()
{
double w1 = x1 - 100 ;
double w2 = x2 - 100 ;
double w3 = x3 - 100 ;
double w4 = x4 - 100 ;
double a1 = iCustom(NULL,0, "Custom CCI", 0) ;
double a2 = iCustom(NULL,0, "Custom CCI", 7)
double a3 = iCustom(NULL,0, "Custom CCI", 14);//il s'agit du CCI
double a4=iMA(NULL,0,21,0,0,0) ;//c'est l'indice de force
return(w1 * a1 + w2 * a2 + w3 * a3 + w4 * a4) ;
}
Bonjour, quelqu'un peut-il me dire si j'ai appelé correctement les indicateurs dans mon EA ?
double perceptron()
{
double w1 = x1 - 100 ;
double w2 = x2 - 100 ;
double w3 = x3 - 100 ;
double w4 = x4 - 100 ;
double a1 = iCustom(NULL,0, "Custom CCI", 0) ;
double a2 = iCustom(NULL,0, "Custom CCI", 7)
double a3 = iCustom(NULL,0, "Custom CCI", 14);//il s'agit du CCI
double a4=iMA(NULL,0,21,0,0,0) ;//c'est l'indice de force
return(w1 * a1 + w2 * a2 + w3 * a3 + w4 * a4) ;
}
non.
iCustom, comme toute autre fonction d 'appel d'indicateur, renvoie le handle de l'indicateur. Lisez la documentation.
Merci ! Alors comme ça ! ? double a2 = iCCI(NULL,0,7, 0) ;
double a4=iForce(NULL,0,21,0,0) ;
Le compilateur accepte également la version précédente.
Voir un exemple de notre indicateur personnalisé Alligator https://www.mql5.com/en/code/9
Voilà :
Merci ! Alors comme ça ! ? double a2 = iCCI(NULL,0,7, 0) ;
double a4=iForce(NULL,0,21,0,0) ;
Le compilateur sera également satisfait de la variante précédente.
Le compilateur est très bien. J'ai eu un tel fragment de code lors du portage d'un des 4 compilateurs induits :
Ça ressemblait à ça au 4 :
Je n'ai pas réussi à traduire ligne par ligne car iMAOnArray est absent de la version 5, et je ne veux pas utiliser l'include de la version bêta. Eh bien, au début, j'ai transféré 2*iMa.... je ne pouvais pas comprendre pourquoi la sortie s'avère être nulle. Je commençais à m'énerver. J'étais sur le point d'écrire au forum. Puis j'ai compris - mon habitude a pris le dessus. Le compilateur l'accepte car le handle retourné en 5 a le type de données Int (un nombre, en fait) et il peut être multiplié par 2. Mais la poignée de sortie est une question et cela ne fonctionnera pas de cette façon.
Je commence à essayer de migrer le système vers 5 et j'ai immédiatement des problèmes.
Compile avec 0 erreurs, mais le script ne fonctionne pas :-(Je commence à essayer un système de transfert vers un cinq et c'est un accrochage instantané.
Compile avec 0 erreurs, mais le script ne fonctionne pas :-(
Que voulez-vous dire par "script". A en juger par les fonctions dans le code, vous avez publié le code EA. Regardez la transition avec MQL4
Que voulez-vous dire par le nom "script". A en juger par les fonctions dans le code, vous avez publié le code EA. Regardez la transition avec MQL4
Oui, c'est un EA, textuel bien sûr. Je dois obtenir une réponse du serveur en utilisant wininet.dll.
Oui, exactement un conseiller, mot pour mot bien sûr. Je dois obtenir une réponse du serveur en utilisant wininet.dll.Essayez d'utiliser les versions Unicode de ces fonctions. MQL5 utilise l'encodage Unicode.
Essayez d'utiliser les versions Unicode de ces fonctions. MQL5 utilise Unicode.
Le fait est que lorsque je le compile pendant le débogage, il me renvoie à l'éditeur MQL sans même donner d'erreur. Et lorsque vous le tirez vers le graphique, il n'apparaît même pas sur celui-ci, c'est-à-dire que ni le débogage ni le lancement de l'EA ne donnent d'erreur nulle part.