Rejoindre la communauté
banner_forum
Devenez membre de la plus grande
communauté francophone sur le Forex
Partagez, échangez et apprenez en gagnant des crédits sur votre compte de trading

Erreur a corriger - EA 6 unités de temps differentes

  • lefeuvr3

    Bonjour
    J'utilise ce programme que j'ai légèrement modifié sur des unites de temps différentes
    Ces différents programmes sont très performants dans chaque unite de temps pris individuellement
    Je voudrais réunir sur un seul programmes toutes les unites de temps en utilisant la fonction || (ou) de telle manière que les trades se fassent en permanence dès qu'une configuration se présente dans une quelconque unite de temps
    J'ai fais de mon mieux mais je me retrouve avec 15 erreurs que je n'arrive pas a corriger ....et d'autre part je me demande si l'on ne peut pas faire plus simple comme programme
    Merci d'avance pour votre aide

    Code
    //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //| GAPS MTF | //| SFK Corp. | //+------------------------------------------------------------------+ #property copyright "SFK Corp." #property link "" //---- input parameters extern int min_gapsizePERIOD_M1 = 6; extern int min_gapsizePERIOD_M5 = 6; extern int min_gapsizePERIOD_M15 = 6; extern int min_gapsizePERIOD_M30 = 6; extern int min_gapsizePERIOD_H1 = 6; extern int min_gapsizePERIOD_H4 = 6; // extern double lotsize_gapPERIOD_M1 = 0.4; extern double lotsize_gapPERIOD_M5 = 0.4; extern double lotsize_gapPERIOD_M15 = 0.4; extern double lotsize_gapPERIOD_M30 = 0.4; extern double lotsize_gapPERIOD_H1 = 0.4; extern double lotsize_gapPERIOD_H4 = 0.4; //---- datetime order_time = 0; extern bool PERIOD_M1=true; extern bool PERIOD_M5=true; extern bool PERIOD_M15=true; extern bool PERIOD_M30=true; extern bool PERIOD_H1=true; extern bool PERIOD_H4=true; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //---- return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { // Defining the variables to decide. Print("order time", order_time); // double current_openprice = iOpen(Symbol(),PERIOD_M15, 0); // double previous_highprice = iHigh(Symbol(),PERIOD_M15, 1); // double previous_lowprice = iLow(Symbol(),PERIOD_M15, 1); // double point_gap = MarketInfo(Symbol(), MODE_POINT); // int spread_gap = MarketInfo(Symbol(), MODE_SPREAD); // datetime current_time = iTime(Symbol(),PERIOD_M15, 0); // catching the gap on sell upper gap if(iOpen(Symbol(), PERIOD_M1, 0) > iHigh(Symbol(), PERIOD_M1, 1) + (min_gapsizePERIOD_M1 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT)&& iTime(Symbol(), PERIOD_M1, 0) != order_time) ||(iOpen(Symbol(), PERIOD_M5, 0) > iHigh(Symbol(), PERIOD_M5, 1) + (min_gapsizePERIOD_M5 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT)&& iTime(Symbol(), PERIOD_M5, 0) != order_time) ||(iOpen(Symbol(), PERIOD_M15, 0) > iHigh(Symbol(), PERIOD_M15, 1) + (min_gapsizePERIOD_M15 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT)&& iTime(Symbol(), PERIOD_M15, 0) != order_time) ||(iOpen(Symbol(), PERIOD_M30, 0) > iHigh(Symbol(), PERIOD_M30, 1) + (min_gapsizePERIOD_M30 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT)&& iTime(Symbol(), PERIOD_M30, 0) != order_time) ||(iOpen(Symbol(), PERIOD_H1 ,0) > iHigh(Symbol(), PERIOD_H1, 1) + (min_gapsizePERIOD_H1 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT)&& iTime(Symbol(), PERIOD_H1, 0) != order_time) ||(iOpen(Symbol(), PERIOD_H4, 0) > iHigh(Symbol(), PERIOD_H4, 1) + (min_gapsizePERIOD_H4 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT)&& iTime(Symbol(), PERIOD_H4, 0) != order_time)) { int ticket = OrderSend(Symbol(), OP_SELL, lotsize_gapPERIOD_M1, Bid, 0, 0, iHigh(Symbol(), PERIOD_M1, 1) + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 4, 0, Red); order_time = iTime(Symbol(), PERIOD_M1, 0); Print("I am inside (sell) :-)", order_time); //---- //---- if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { int ticket = OrderSend(Symbol(), OP_SELL, lotsize_gapPERIOD_M5, Bid, 0, 0, iHigh(Symbol(), PERIOD_M5, 1) + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 4, 0, Red); order_time = iTime(Symbol(), PERIOD_M5, 0); Print("I am inside (sell) :-)", order_time); //---- if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { int ticket = OrderSend(Symbol(), OP_SELL, lotsize_gapPERIOD_M15, Bid, 0, 0, iHigh(Symbol(), PERIOD_M15, 1) + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 4, 0, Red); order_time = iTime(Symbol(), PERIOD_M15, 0); Print("I am inside (sell) :-)", order_time); //---- if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { int ticket = OrderSend(Symbol(), OP_SELL, lotsize_gapPERIOD_M30, Bid, 0, 0, iHigh(Symbol(), PERIOD_M30, 1) + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 4, 0, Red); order_time = iTime(Symbol(), PERIOD_M30, 0); Print("I am inside (sell) :-)", order_time); //---- if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { int ticket = OrderSend(Symbol(), OP_SELL, lotsize_gapPERIOD_H1, Bid, 0, 0, iHigh(Symbol(), PERIOD_H1, 1) + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 4, 0, Red); order_time = iTime(Symbol(), PERIOD_H1, 0); Print("I am inside (sell) :-)", order_time); //---- if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { int ticket = OrderSend(Symbol(), OP_SELL, lotsize_gapPERIOD_H4, Bid, 0, 0, iHigh(Symbol(), PERIOD_H4, 1) + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 4, 0, Red); order_time = iTime(Symbol(), PERIOD_H4, 0); Print("I am inside (sell) :-)", order_time); //---- if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } //catching the gap on buy down gap if(iOpen(Symbol(), PERIOD_M1, 0) < iLow(Symbol(), PERIOD_M1, 1) - (min_gapsizePERIOD_M1 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT)&& ||iTime(Symbol(), PERIOD_M1, 0) != order_time) (iOpen(Symbol(), PERIOD_M5, 0) < iLow(Symbol(), PERIOD_M5, 1) - (min_gapsizePERIOD_M5 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT)&& || iTime(Symbol(), PERIOD_M5, 0) != order_time) (iOpen(Symbol(), PERIOD_M15, 0) < iLow(Symbol(), PERIOD_M15, 1) - (min_gapsizePERIOD_M15 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT)&& || iTime(Symbol(), PERIOD_M15, 0) != order_time) (iOpen(Symbol(), PERIOD_M30, 0) < iLow(Symbol(), PERIOD_M30, 1) - (min_gapsizePERIOD_M30 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT)&& || iTime(Symbol(), PERIOD_M30, 0) != order_time) (iOpen(Symbol(), PERIOD_H1, 0) < iLow(Symbol(), PERIOD_H1, 1) - (min_gapsizePERIOD_H1 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT)&& || iTime(Symbol(), PERIOD_H1, 0) != order_time) (iOpen(Symbol(), PERIOD_H4, 0) < iLow(Symbol(), PERIOD_H4, 1) - (min_gapsizePERIOD_H4 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT)&& || iTime(Symbol(), PERIOD_H4, 0) != order_time)) // if(current_openprice < previous_lowprice - (min_gapsize + spread_gap)*point_gap && // current_time != order_time) { ticket = OrderSend(Symbol(), OP_BUY, lotsize_gapPERIOD_M1, Ask, 0, 0, iLow(Symbol(), PERIOD_M1, 1) - MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 5, 0, Green); order_time = iTime(Symbol(), PERIOD_M1, 0); Print("I am inside (buy) :-)", order_time); if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_BUY, lotsize_gapPERIOD_M5, Ask, 0, 0, iLow(Symbol(), PERIOD_M5, 1) - MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 5, 0, Green); order_time = iTime(Symbol(), PERIOD_M5, 0); Print("I am inside (buy) :-)", order_time); if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_BUY, lotsize_gapPERIOD_M15, Ask, 0, 0, iLow(Symbol(), PERIOD_M15, 1) - MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 5, 0, Green); order_time = iTime(Symbol(), PERIOD_M15, 0); Print("I am inside (buy) :-)", order_time); if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_BUY, lotsize_gapPERIOD_M30, Ask, 0, 0, iLow(Symbol(), PERIOD_M30, 1) - MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 5, 0, Green); order_time = iTime(Symbol(), PERIOD_M30, 0); Print("I am inside (buy) :-)", order_time); if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_BUY, lotsize_gapPERIOD_H1, Ask, 0, 0, iLow(Symbol(), PERIOD_H1, 1) - MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 5, 0, Green); order_time = iTime(Symbol(), PERIOD_H1, 0); Print("I am inside (buy) :-)", order_time); if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_BUY, lotsize_gapPERIOD_H4, Ask, 0, 0, iLow(Symbol(), PERIOD_H4, 1) - MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 5, 0, Green); order_time = iTime(Symbol(), PERIOD_H4, 0); Print("I am inside (buy) :-)", order_time); if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } //---- return(0); } //+------------------------------------------------------------------+ [[[[Voici le programme original sur une unite de temps 1 minute sur EURUSD]]]] //+------------------------------------------------------------------+ //|Gap 1 minutes //| //+------------------------------------------------------------------+ #property copyright "QPG Gap 1 minutes." #property link "" //---- input parameters extern int min_gapsize = 6; extern double lotsize_gap = 0.01; //---- datetime order_time = 0; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //---- return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { // Defining the variables to decide. Print("order time", order_time); double current_openprice = iOpen(Symbol(),PERIOD_M1, 0); double previous_highprice = iHigh(Symbol(),PERIOD_M1, 1); double previous_lowprice = iLow(Symbol(),PERIOD_M1, 1); double point_gap = MarketInfo(Symbol(), MODE_POINT); int spread_gap = MarketInfo(Symbol(), MODE_SPREAD); datetime current_time = iTime(Symbol(),PERIOD_M1, 0); // catching the gap on sell upper gap if(current_openprice > previous_highprice + (min_gapsize + spread_gap)*point_gap && current_time != order_time) { int ticket = OrderSend(Symbol(), OP_SELL, lotsize_gap, Bid, 0, 0, previous_highprice + spread_gap*point_gap, "", 4, 0, Red); order_time = iTime(Symbol(),PERIOD_M1, 0); Print("I am inside (sell) :-)", order_time); //---- if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } //catching the gap on buy down gap if(current_openprice < previous_lowprice - (min_gapsize + spread_gap)*point_gap && current_time != order_time) { ticket = OrderSend(Symbol(), OP_BUY, lotsize_gap, Ask, 0, 0, previous_lowprice - spread_gap*point_gap, "", 5, 0, Green); order_time = iTime(Symbol(),PERIOD_M1, 0); Print("I am inside (buy) :-)", order_time); if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } //---- return(0); } //+------------------------------------------------------------------+
    Modifié le 2018-07-03 15:00:06 par AliX
    lefeuvr3 a joint une image
    gaps-sur-eurusd-sur-6-unites-de-temps-differentes-10876
  • lefeuvr3

    J'ai reussi a corriger 13 erreurs ....il m'en reste 2
  • kaliloup

    Bonjour, je suis vraiment débordé de taf en ce moment et pas encore rentré de vacance, mais si vous ne trouvez pas de solutions (malgré que je constate que vous gérez un peu les erreurs vous même), je jetterais un coup d’œil quand j'aurais un moment.
  • kaliloup

    Bonjour, j'ai corrigé tes erreurs mais n'ai pas testé ton EA.

    Code
    //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //| GAPS MTF | //| SFK Corp. | //+------------------------------------------------------------------+ #property copyright "SFK Corp." #property link "" //---- input parameters extern int min_gapsizePERIOD_M1 = 6; extern int min_gapsizePERIOD_M5 = 6; extern int min_gapsizePERIOD_M15 = 6; extern int min_gapsizePERIOD_M30 = 6; extern int min_gapsizePERIOD_H1 = 6; extern int min_gapsizePERIOD_H4 = 6; // extern double lotsize_gapPERIOD_M1 = 0.4; extern double lotsize_gapPERIOD_M5 = 0.4; extern double lotsize_gapPERIOD_M15 = 0.4; extern double lotsize_gapPERIOD_M30 = 0.4; extern double lotsize_gapPERIOD_H1 = 0.4; extern double lotsize_gapPERIOD_H4 = 0.4; //---- datetime order_time = 0; extern bool PERIOD_M1=true; extern bool PERIOD_M5=true; extern bool PERIOD_M15=true; extern bool PERIOD_M30=true; extern bool PERIOD_H1=true; extern bool PERIOD_H4=true; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //---- return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { // Defining the variables to decide. Print("order time", order_time); // double current_openprice = iOpen(Symbol(),PERIOD_M15, 0); // double previous_highprice = iHigh(Symbol(),PERIOD_M15, 1); // double previous_lowprice = iLow(Symbol(),PERIOD_M15, 1); // double point_gap = MarketInfo(Symbol(), MODE_POINT); // int spread_gap = MarketInfo(Symbol(), MODE_SPREAD); // datetime current_time = iTime(Symbol(),PERIOD_M15, 0); // catching the gap on sell upper gap if((iOpen(Symbol(), PERIOD_M1, 0) > iHigh(Symbol(), PERIOD_M1, 1) + (min_gapsizePERIOD_M1 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT))&& iTime(Symbol(), PERIOD_M1, 0) != order_time) ||(iOpen(Symbol(), PERIOD_M5, 0) > iHigh(Symbol(), PERIOD_M5, 1) + (min_gapsizePERIOD_M5 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT))&& iTime(Symbol(), PERIOD_M5, 0) != order_time) ||(iOpen(Symbol(), PERIOD_M15, 0) > iHigh(Symbol(), PERIOD_M15, 1) + (min_gapsizePERIOD_M15 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT))&& iTime(Symbol(), PERIOD_M15, 0) != order_time) ||(iOpen(Symbol(), PERIOD_M30, 0) > iHigh(Symbol(), PERIOD_M30, 1) + (min_gapsizePERIOD_M30 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT))&& iTime(Symbol(), PERIOD_M30, 0) != order_time) ||(iOpen(Symbol(), PERIOD_H1 ,0) > iHigh(Symbol(), PERIOD_H1, 1) + (min_gapsizePERIOD_H1 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT))&& iTime(Symbol(), PERIOD_H1, 0) != order_time) ||(iOpen(Symbol(), PERIOD_H4, 0) > iHigh(Symbol(), PERIOD_H4, 1) + (min_gapsizePERIOD_H4 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT))&& iTime(Symbol(), PERIOD_H4, 0) != order_time)) { int ticket = OrderSend(Symbol(), OP_SELL, lotsize_gapPERIOD_M1, Bid, 0, 0, iHigh(Symbol(), PERIOD_M1, 1) + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 4, 0, Red); order_time = iTime(Symbol(), PERIOD_M1, 0); Print("I am inside (sell) :-)", order_time); //---- //---- if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_SELL, lotsize_gapPERIOD_M5, Bid, 0, 0, iHigh(Symbol(), PERIOD_M5, 1) + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 4, 0, Red); order_time = iTime(Symbol(), PERIOD_M5, 0); Print("I am inside (sell) :-)", order_time); //---- if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_SELL, lotsize_gapPERIOD_M15, Bid, 0, 0, iHigh(Symbol(), PERIOD_M15, 1) + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 4, 0, Red); order_time = iTime(Symbol(), PERIOD_M15, 0); Print("I am inside (sell) :-)", order_time); //---- if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_SELL, lotsize_gapPERIOD_M30, Bid, 0, 0, iHigh(Symbol(), PERIOD_M30, 1) + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 4, 0, Red); order_time = iTime(Symbol(), PERIOD_M30, 0); Print("I am inside (sell) :-)", order_time); //---- if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_SELL, lotsize_gapPERIOD_H1, Bid, 0, 0, iHigh(Symbol(), PERIOD_H1, 1) + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 4, 0, Red); order_time = iTime(Symbol(), PERIOD_H1, 0); Print("I am inside (sell) :-)", order_time); //---- if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_SELL, lotsize_gapPERIOD_H4, Bid, 0, 0, iHigh(Symbol(), PERIOD_H4, 1) + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 4, 0, Red); order_time = iTime(Symbol(), PERIOD_H4, 0); Print("I am inside (sell) :-)", order_time); //---- if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } //catching the gap on buy down gap if((iOpen(Symbol(), PERIOD_M1, 0) < iLow(Symbol(), PERIOD_M1, 1) - (min_gapsizePERIOD_M1 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT))&& iTime(Symbol(), PERIOD_M1, 0) != order_time) ||(iOpen(Symbol(), PERIOD_M5, 0) < iLow(Symbol(), PERIOD_M5, 1) - (min_gapsizePERIOD_M5 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT))&& iTime(Symbol(), PERIOD_M5, 0) != order_time) ||(iOpen(Symbol(), PERIOD_M15, 0) < iLow(Symbol(), PERIOD_M15, 1) - (min_gapsizePERIOD_M15 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT))&& iTime(Symbol(), PERIOD_M15, 0) != order_time) ||(iOpen(Symbol(), PERIOD_M30, 0) < iLow(Symbol(), PERIOD_M30, 1) - (min_gapsizePERIOD_M30 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT))&& iTime(Symbol(), PERIOD_M30, 0) != order_time) ||(iOpen(Symbol(), PERIOD_H1, 0) < iLow(Symbol(), PERIOD_H1, 1) - (min_gapsizePERIOD_H1 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT))&& iTime(Symbol(), PERIOD_H1, 0) != order_time) ||(iOpen(Symbol(), PERIOD_H4, 0) < iLow(Symbol(), PERIOD_H4, 1) - (min_gapsizePERIOD_H4 + MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT))&& iTime(Symbol(), PERIOD_H4, 0) != order_time)) // if(current_openprice < previous_lowprice - (min_gapsize + spread_gap)*point_gap && // current_time != order_time) { ticket = OrderSend(Symbol(), OP_BUY, lotsize_gapPERIOD_M1, Ask, 0, 0, iLow(Symbol(), PERIOD_M1, 1) - MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 5, 0, Green); order_time = iTime(Symbol(), PERIOD_M1, 0); Print("I am inside (buy) :-)", order_time); if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_BUY, lotsize_gapPERIOD_M5, Ask, 0, 0, iLow(Symbol(), PERIOD_M5, 1) - MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 5, 0, Green); order_time = iTime(Symbol(), PERIOD_M5, 0); Print("I am inside (buy) :-)", order_time); if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_BUY, lotsize_gapPERIOD_M15, Ask, 0, 0, iLow(Symbol(), PERIOD_M15, 1) - MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 5, 0, Green); order_time = iTime(Symbol(), PERIOD_M15, 0); Print("I am inside (buy) :-)", order_time); if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_BUY, lotsize_gapPERIOD_M30, Ask, 0, 0, iLow(Symbol(), PERIOD_M30, 1) - MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 5, 0, Green); order_time = iTime(Symbol(), PERIOD_M30, 0); Print("I am inside (buy) :-)", order_time); if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_BUY, lotsize_gapPERIOD_H1, Ask, 0, 0, iLow(Symbol(), PERIOD_H1, 1) - MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 5, 0, Green); order_time = iTime(Symbol(), PERIOD_H1, 0); Print("I am inside (buy) :-)", order_time); if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } { ticket = OrderSend(Symbol(), OP_BUY, lotsize_gapPERIOD_H4, Ask, 0, 0, iLow(Symbol(), PERIOD_H4, 1) - MarketInfo(Symbol(), MODE_SPREAD)*MarketInfo(Symbol(), MODE_POINT), "", 5, 0, Green); order_time = iTime(Symbol(), PERIOD_H4, 0); Print("I am inside (buy) :-)", order_time); if(ticket < 0) { Print("OrderSend failed with error #", GetLastError()); } } //---- return(0); } //+------------------------------------------------------------------+
    Modifié le 2018-07-10 15:45:58 par AliX
  • kaliloup

    Bonjour, j'ai regardais votre EA d'un peu plus près et ai constaté quelques erreurs (pas dans la compilation mais dans le fonctionnement, notamment du au take profit, erreur 130), de plus sans stop loss votre EA reste très risqué je pense. Si vous êtes toujours à la recherche de son bon fonctionnement faites moi signe.
  • lefeuvr3 — en réponse à kaliloup dans son message #111498

    Kaliloup merci beaucoup pour votre intervention bien utile