Dans le code à la ligne 1481, position du curseur 14 - cherchez une erreur.
Voilà, j'ai fait une erreur.
{
//---
for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions
if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
{
if((PositionGetDouble(POSITION_PROFIT)/PositionGetDouble(POSITION_VOLUME)/
SymbolInfoDouble(Symbol(),SYMBOL_TRADE_TICK_VALUE))/n<-InStopLoss)
ClosePosition(m_position.Symbol()); // close a position by the specified symbo
}
}
Je l'ai corrigé comme suit - je n'ai pas encore vérifié cette fonction, mais elle est censée fonctionner.
{
//---for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positionsif(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
{
if(m_position.Commission()+m_position.Swap()+m_position.Profit()/n<-InStopLoss)
ClosePosition(m_position.Symbol()); // close a position by the specified symbo
}
}
Encore une fois - Merci beaucoup ! Santé ! et Bonne continuation !
{
//---
for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions
if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
{
if((PositionGetDouble(POSITION_PROFIT)/PositionGetDouble(POSITION_VOLUME)/
SymbolInfoDouble(Symbol(),SYMBOL_TRADE_TICK_VALUE))/n<-InStopLoss)
ClosePosition(m_position.Symbol()); // close a position by the specified symbo
}
}
Je l'ai arrangé comme ça - je ne l'ai pas encore vérifié - mais c'est censé fonctionner.
{
//---for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positionsif(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
{
if(m_position.Commission()+m_position.Swap()+m_position.Profit()/n<-InStopLoss)
ClosePosition(m_position.Symbol()); // close a position by the specified symbo
}
}
Je devrais le laisser - là où j'ai merdé. - il fonctionne ! et comme je voulais corriger, ne fonctionne pas et /n et supprimé et avec elle. ne fonctionne pas .
La raison est le compte GLD lui-même. J'ai ouvert un compte en USD dans le même terminal et tout fonctionne.
Si vous n'avez pas de compte, veuillez vous inscrire
Autorisez l'utilisation de cookies pour vous connecter au site Web MQL5.com.
Veuillez activer les paramètres nécessaires dans votre navigateur, sinon vous ne pourrez pas vous connecter.
Vous êtes connecté. L'authentification à deux facteurs a été désactivée. Configurez-la à nouveau et scannez un nouveau code QR, ou continuez avec l'authentification à deux facteurs désactivée.
Vous avez aimé ?
J'ai besoin de le voir en action
pas pour moi, pour lui
Je pense qu'il n'y a pas assez de séparation, de limite d'arrêt et de profit pour les lignes horizontales, qui sont définies automatiquement.
c'est plus 4 lignes supplémentaires - et non ! 8
Je pense qu'il n'y a pas assez de séparation, de limite d'arrêt et de profit pour les lignes horizontales, qui sont définies automatiquement.
c'est plus 4 lignes supplémentaires - et non ! 8
#property version "1.11"
définit une ligne horizontale de StopLoss et si le prix évolue dans la bonne direction, la position est fermée.
les lignes jaunes sont StopLoss et chalut en même temps
il ne peut pas être égal à zéro - il sera fermé immédiatement. vous devez définir combien de pips vous souhaitez que la position soit fermée.
vous devez définir combien de pips vous voulez que la position soit fermée.
Je reçois cette erreur et le conseiller expert est supprimé lorsque j'ouvre une position. Le compte est 500 GLD.
Je n'arrive pas encore à comprendre.
Je reçois cette erreur et le conseiller expert est supprimé lorsque j'ouvre une position. Le compte est 500 GLD.
Je n'arrive pas encore à comprendre.
Merde ! et il n'y a aucune information dans la recherche. Quelqu'un peut-il me dire quelle est l'erreur ?
2019.10.28 10:21:58.667 Votre intelligence (USDJPY,H1) divide zéro dans 'Votre intelligence.mq5' (1481,14)
Je reçois cette erreur et le conseiller expert est supprimé lorsque j'ouvre une position. Le compte est 500 GLD.
Je n'arrive pas encore à comprendre.
Dans le code, ligne 1481, position 14 - cherchez une erreur.
Dans le code, ligne 1481, position 14 - cherchez une erreur.
Merci beaucoup ! Je pense avoir trouvé la raison. Merci pour le conseil ! !!
Dans le code à la ligne 1481, position du curseur 14 - cherchez une erreur.
Voilà, j'ai fait une erreur.
{ //--- for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties { if((PositionGetDouble(POSITION_PROFIT)/PositionGetDouble(POSITION_VOLUME)/ SymbolInfoDouble(Symbol(),SYMBOL_TRADE_TICK_VALUE))/n<-InStopLoss) ClosePosition(m_position.Symbol()); // close a position by the specified symbo } }Je l'ai corrigé comme suit - je n'ai pas encore vérifié cette fonction, mais elle est censée fonctionner.
{ //--- for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties { if(m_position.Commission()+m_position.Swap()+m_position.Profit()/n<-InStopLoss) ClosePosition(m_position.Symbol()); // close a position by the specified symbo } }Encore une fois - Merci beaucoup ! Santé ! et Bonne continuation !
maintenant remarqué - dans le terminal où - compte GLD
le bénéfice ne change pas après l'ouverture d'une position - car il affiche 8 pips et ne change pas
le prix bouge sur le graphique - c'est peut-être pour cela que j'ai eu une erreur
ici - j'ai fait une erreur.
{ //--- for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties { if((PositionGetDouble(POSITION_PROFIT)/PositionGetDouble(POSITION_VOLUME)/ SymbolInfoDouble(Symbol(),SYMBOL_TRADE_TICK_VALUE))/n<-InStopLoss) ClosePosition(m_position.Symbol()); // close a position by the specified symbo } }Je l'ai arrangé comme ça - je ne l'ai pas encore vérifié - mais c'est censé fonctionner.
{ //--- for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties { if(m_position.Commission()+m_position.Swap()+m_position.Profit()/n<-InStopLoss) ClosePosition(m_position.Symbol()); // close a position by the specified symbo } }Je devrais le laisser - là où j'ai merdé. - il fonctionne ! et comme je voulais corriger, ne fonctionne pas et /n et supprimé et avec elle. ne fonctionne pas .
La raison est le compte GLD lui-même. J'ai ouvert un compte en USD dans le même terminal et tout fonctionne.