De bonnes personnes, de l'aide avec des conseils. Lors du test d'un EA, les transactions ne s'ouvrent pas dans le journal, erreur 3 : mauvais paramètres. Qu'est-ce que j'ai fait de mal avec les fonctions personnalisées ?
ticket=OrderSend(Symbol(),OP_SELLSTOP,Lots,Prices_install(),3,0,0,NULL,MAGICNUMBER,0,clrGreen);
if(ticket>0)//проверка открытия позиции
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))
Print("SELL ордер открыт:",OrderOpenPrice());
}
elsePrint("Ошибка открытия ордера SELL:",GetLastError());
}
return;
}
}
//+---------------------------------------------------------------------------+//| Условия модификации ордеров |//+---------------------------------------------------------------------------+if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))
{
//--- длинная позиция открытаswitch(OrderType())
{
case OP_BUYSTOP:
if(NormalizeDouble(OrderOpenPrice()-Prices_install(),Digits)>0 && NormalizeDouble(Prices_install()-Bid,Digits)>0)
{
if(OrderModify(ticket,Prices_install(),0,0,0,clrBlue))
Print("Цена Price_BUY ордера успешно модифицирована.");
elsePrint("Ошибка модификации ордера BUYStop. Код ошибки=",GetLastError());
}
elsePrint("Цена модификации выше цены ордера");
break;
case OP_SELLSTOP:
if(NormalizeDouble(Prices_install()-OrderOpenPrice(),Digits)>0 && NormalizeDouble(Ask-Prices_install(),Digits)>0)
{
if(OrderModify(ticket,Prices_install(),0,0,0,clrGreen))
Print("Цена Price_SELL ордера успешно модифицирована.");
elsePrint("Ошибка модификации ордера SELLStop. Код ошибки=",GetLastError());
}
elsePrint("Цена модификации выше цены ордера");
break;
case OP_BUY:
if(NormalizeDouble(StopLosse_install()-OrderStopLoss(),Digits)>0 && NormalizeDouble(Ask-StopLosse_install(),Digits)>0)
{
if(OrderModify(ticket,OrderOpenPrice(),StopLosse_install(),0,0,clrBlue))
Print("Цена Price_BUY ордера успешно модифицирована.");
elsePrint("Ошибка модификации ордера BUY. Код ошибки=",GetLastError());
}
elsePrint("Цена модификации выше цены ордера");
break;
case OP_SELL:
if(NormalizeDouble(OrderStopLoss()-StopLosse_install(),Digits)>0 && NormalizeDouble(StopLosse_install()-Bid,Digits)>0)
{
if(OrderModify(ticket,OrderOpenPrice(),StopLosse_install(),0,0,clrGreen))
Print("Цена Price_SELL ордера успешно модифицирована.");
elsePrint("Ошибка модификации ордера SELL. Код ошибки=",GetLastError());
}
elsePrint("Цена модификации выше цены ордера");
break;
}
}
}
Sleep(5);
}
return;
}
//+------------------------------------------------------------------+double StopLosse_install()
{
double StopLoss=iSAR(NULL,PERIODs_short_term,Step,Maximum,1);
double StopLoss_install;
int StopLevel=(int)MarketInfo(Symbol(),MODE_STOPLEVEL); // Минимально допустимый уровень стоп-лосса/тейк-профита в пунктахint FreezeLevel=(int)MarketInfo(Symbol(),MODE_FREEZELEVEL);//Уровень заморозки ордеров в пунктахswitch(OrderType())
{
case0:
if(Bid-StopLoss>FreezeLevel)
{
if(Bid-StopLoss>=StopLevel)
StopLoss_install=NormalizeDouble(StopLoss,Digits);
if(Bid-StopLoss<StopLevel)
StopLoss_install=NormalizeDouble(StopLoss-StopLevel*MarketInfo(Symbol(),MODE_DIGITS),Digits);
}
elsePrint("Цена открытия ордера находится в дистанции заморозки:",GetLastError());
break;
case1:
if(StopLoss-Ask>FreezeLevel)
{
if(StopLoss-Ask>=StopLevel)
StopLoss_install=NormalizeDouble(StopLoss,Digits);
if(StopLoss-Ask<StopLevel)
StopLoss_install=NormalizeDouble(StopLoss+StopLevel*MarketInfo(Symbol(),MODE_DIGITS),Digits);
}
elsePrint("Цена открытия ордера находится в дистанции заморозки:",GetLastError());
break;
}
return(StopLoss_install);
}
//+------------------------------------------------------------------+double Prices_install()
{
double Price=iSAR(NULL,PERIODs_short_term,Step,Maximum,1);
double Price_install;
int StopLevel=(int)MarketInfo(Symbol(),MODE_STOPLEVEL); // Минимально допустимый уровень стоп-лосса/тейк-профита в пунктахint FreezeLevel=(int)MarketInfo(Symbol(),MODE_FREEZELEVEL);//Уровень заморозки ордеров в пунктахswitch(OrderType())
{
case4:
if(Price-Ask>FreezeLevel)
{
if(Price - Ask>=StopLevel)
Price_install=NormalizeDouble(Price,Digits);
if(Price - Ask<StopLevel)
Price_install=NormalizeDouble(Price+StopLevel*MarketInfo(Symbol(),MODE_DIGITS),Digits);
}
elsePrint("Цена открытия ордера находится в дистанции заморозки:",GetLastError());
break;
case5:
if(Bid-Price>FreezeLevel)
{
if(Bid-Price>=StopLevel)
Price_install=NormalizeDouble(Price,Digits);
if(Bid-Price<StopLevel)
Price_install=NormalizeDouble(Price+StopLevel*MarketInfo(Symbol(),MODE_DIGITS),Digits);
}
elsePrint("Цена открытия ордера находится в дистанции заморозки:",GetLastError());
break;
}
return(Price_install);
}
//+------------------------------------------------------------------+
Quelles sont les nuances de l'utilisation des boucles dans la prise de décisions de trading par l'Expert Advisor ? En gros, s'il y a 20 niveaux de support/résistance, l'EA fonctionnera-t-il correctement si nous vérifions tous les niveaux en utilisant pour ? Ou est-il préférable de prendre les plus proches et de le faire par le biais de si ?
Veuillez m'indiquer comment faire en sorte que sur mt4/5 les barres ne montrent pas les ouvertures. Laseule chose qu 'il montreest la fermeture de la barre.
Pouvez-vous me dire comment connecter les graphiques d'état ? Pour afficher un graphique du trading multidevises. Je l'ai vu quelque part depuis longtemps, mais je n'arrive pas à le trouver.
В настоящее время мультивалютных торговых систем, индикаторов и экспертов разработано огромное количество. Тем не менее, до сих пор создатели этого "огромного количества" сталкивались со специфическими для мультивалютных систем трудностями. С выпуском в свет терминала MetaTrader 5 и языка программирования MQL5 появилась возможность реализации...
De bonnes personnes, de l'aide avec des conseils. Lors du test d'un EA, les transactions ne s'ouvrent pas dans le journal, erreur 3 : mauvais paramètres. Qu'est-ce que j'ai fait de mal avec les fonctions personnalisées ?
Bonjour, aide sur le parabolique s'il vous plaît ! Je veux faire de la logique avec le conseiller expert comme indiqué sur l'image :
J'écris le code comme ceci :
Voyez si j'ai fait des erreurs, parce que ça plante ..... Merci beaucoup !
Quel type de dépôt dois-je avoir pour faire un bénéfice de 100 dollars par jour ?
100 livres par jour et n'avoir aucune perte ?
De quel type de dépôt aurais-je besoin pour faire un bénéfice de 100 $ par jour ?
Déposez 10 $ ! Obtenez 1000% par jour et retirez un bénéfice de 100$ par jour !
Comment ouvrir un compte de démonstration avec mon nom d'utilisateur et mon mot de passe d'investisseur sur MT4 ?
Un serveur est toujours nécessaire
Veuillez m'indiquer comment faire en sorte que sur mt4/5 les barres ne montrent pas les ouvertures. Laseule chose qu 'il montreest la fermeture de la barre.