fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. azazelio
    A
    • Profile
    • Following 1
    • Followers 0
    • Topics 2
    • Posts 14
    • Best 1
    • Controversial 0
    • Groups 0

    azazelio

    @azazelio

    1
    Reputation
    780
    Profile views
    14
    Posts
    0
    Followers
    1
    Following
    Joined Last Online

    azazelio Unfollow Follow

    Best posts made by azazelio

    • RE: 'attrTicketChild' - function not defined; Check profit (money) doesn't work as intended

      Hi there

      I got the same error attrTicketChild.

      I fixed changing these 2 lines:
      || (ClosePartialMode == 1 /*&& e_attrTicket() == attrTicketParent(e_attrTicket()) /&& e_attrTicket() == attrTicketChild(e_attrTicket())) // fully closed
      || (ClosePartialMode == 2 /
      && e_attrTicket() == attrTicketParent(e_attrTicket()) */&& e_attrTicket() != attrTicketChild(e_attrTicket())) // partially closed

      to these 2:
      || (ClosePartialMode == 1 && e_attrTicket() == attrTicketParent(e_attrTicket()) && e_attrTicket() == attrTicketChild(e_attrTicket())) // fully closed
      || (ClosePartialMode == 2 && e_attrTicket() == attrTicketParent(e_attrTicket()) && e_attrTicket() != attrTicketChild(e_attrTicket())) // partially closed

      And adding the function between attrTicket() and attrTicketParent()

      int attrTicketChild(int ticket)
      {
      int pos, total, retval=0;

      if (!OrderSelect(ticket,SELECT_BY_TICKET)) {retval=ticket;}

      /*
      //-- check if trade is added to volume ----------------------------
      if (retval==0) {
      int p_pos=StringFind(attrComment(), "[p=");
      if (p_pos >= 0) {
      string ptag=StringSubstr(attrComment(),p_pos);
      ptag=StringSubstr(ptag,0,StringFind(ptag,"]")+1);
      retval=StrToInteger(StringSubstr(ptag,3,-1));
      }
      }
      */
      double OP = 0;
      datetime OT = 0;
      string S = "";
      int M = 0;
      int T = 0;
      double L = 0;
      int D = 0;

      //-- check if trade is partially closed (in trades) ---------------
      if (retval==0) {
      OP = OrderOpenPrice();
      OT = OrderOpenTime();
      S = OrderSymbol();
      M = OrderMagicNumber();
      T = OrderType();
      L = OrderLots();
      D = (int)MarketInfo(S,MODE_DIGITS);

      total=OrdersTotal();
      for (pos=total-1; pos>=0; pos--) {
      if (OrderSelect(pos,SELECT_BY_POS,MODE_TRADES))
      {
      if (OrderOpenTime()<OT) {
      break;
      }
      if (
      OrderTicket()!=ticket
      && (OrderSymbol()==S)
      && (OrderMagicNumber()==M)
      && (OrderType()==T)
      && (NormalizeDouble(OrderOpenPrice(),D)==NormalizeDouble(OP,D))
      && (OrderOpenTime()==OT)
      )
      {
      retval=OrderTicket();
      break;
      }
      }
      }
      }
      //-- still nothing found - search in history trades now -----------
      if (retval==0) {
      total=OrdersHistoryTotal();
      for (pos=total-1; pos>=0; pos--) {
      if (OrderSelect(pos,SELECT_BY_POS,MODE_HISTORY))
      {
      if (OrderOpenTime()<OT) {
      break;
      }
      if (
      OrderTicket()!=ticket
      && (OrderSymbol()==S)
      && (OrderMagicNumber()==M)
      && (OrderType()==T)
      && (NormalizeDouble(OrderOpenPrice(),D)==NormalizeDouble(OP,D))
      && (OrderOpenTime()==OT)
      )
      {
      retval=OrderTicket();
      break;
      }
      }
      }
      }

      if (retval<ticket) {retval=0;}

      if (!OrderSelect(ticket,SELECT_BY_TICKET)) {return ticket;}
      if (retval>0) {
      return(retval);
      }
      else {
      return(ticket);
      }
      }

      After that, you can compile with no problems.
      Hope that helps

      Thanks

      posted in Bug Reports
      A
      azazelio

    Latest posts made by azazelio

    • RE: 'attrTicketChild' - function not defined; Check profit (money) doesn't work as intended

      Hi there

      I got the same error attrTicketChild.

      I fixed changing these 2 lines:
      || (ClosePartialMode == 1 /*&& e_attrTicket() == attrTicketParent(e_attrTicket()) /&& e_attrTicket() == attrTicketChild(e_attrTicket())) // fully closed
      || (ClosePartialMode == 2 /
      && e_attrTicket() == attrTicketParent(e_attrTicket()) */&& e_attrTicket() != attrTicketChild(e_attrTicket())) // partially closed

      to these 2:
      || (ClosePartialMode == 1 && e_attrTicket() == attrTicketParent(e_attrTicket()) && e_attrTicket() == attrTicketChild(e_attrTicket())) // fully closed
      || (ClosePartialMode == 2 && e_attrTicket() == attrTicketParent(e_attrTicket()) && e_attrTicket() != attrTicketChild(e_attrTicket())) // partially closed

      And adding the function between attrTicket() and attrTicketParent()

      int attrTicketChild(int ticket)
      {
      int pos, total, retval=0;

      if (!OrderSelect(ticket,SELECT_BY_TICKET)) {retval=ticket;}

      /*
      //-- check if trade is added to volume ----------------------------
      if (retval==0) {
      int p_pos=StringFind(attrComment(), "[p=");
      if (p_pos >= 0) {
      string ptag=StringSubstr(attrComment(),p_pos);
      ptag=StringSubstr(ptag,0,StringFind(ptag,"]")+1);
      retval=StrToInteger(StringSubstr(ptag,3,-1));
      }
      }
      */
      double OP = 0;
      datetime OT = 0;
      string S = "";
      int M = 0;
      int T = 0;
      double L = 0;
      int D = 0;

      //-- check if trade is partially closed (in trades) ---------------
      if (retval==0) {
      OP = OrderOpenPrice();
      OT = OrderOpenTime();
      S = OrderSymbol();
      M = OrderMagicNumber();
      T = OrderType();
      L = OrderLots();
      D = (int)MarketInfo(S,MODE_DIGITS);

      total=OrdersTotal();
      for (pos=total-1; pos>=0; pos--) {
      if (OrderSelect(pos,SELECT_BY_POS,MODE_TRADES))
      {
      if (OrderOpenTime()<OT) {
      break;
      }
      if (
      OrderTicket()!=ticket
      && (OrderSymbol()==S)
      && (OrderMagicNumber()==M)
      && (OrderType()==T)
      && (NormalizeDouble(OrderOpenPrice(),D)==NormalizeDouble(OP,D))
      && (OrderOpenTime()==OT)
      )
      {
      retval=OrderTicket();
      break;
      }
      }
      }
      }
      //-- still nothing found - search in history trades now -----------
      if (retval==0) {
      total=OrdersHistoryTotal();
      for (pos=total-1; pos>=0; pos--) {
      if (OrderSelect(pos,SELECT_BY_POS,MODE_HISTORY))
      {
      if (OrderOpenTime()<OT) {
      break;
      }
      if (
      OrderTicket()!=ticket
      && (OrderSymbol()==S)
      && (OrderMagicNumber()==M)
      && (OrderType()==T)
      && (NormalizeDouble(OrderOpenPrice(),D)==NormalizeDouble(OP,D))
      && (OrderOpenTime()==OT)
      )
      {
      retval=OrderTicket();
      break;
      }
      }
      }
      }

      if (retval<ticket) {retval=0;}

      if (!OrderSelect(ticket,SELECT_BY_TICKET)) {return ticket;}
      if (retval>0) {
      return(retval);
      }
      else {
      return(ticket);
      }
      }

      After that, you can compile with no problems.
      Hope that helps

      Thanks

      posted in Bug Reports
      A
      azazelio
    • RE: Compiling error

      @miro1360 Hi Miro, I reckon its not in any block, its part of the general code, in my case, over the 800 line.
      Hope this help

      Thanks

      posted in Bug Reports
      A
      azazelio
    • RE: Compiling error

      Hi there

      Just look for "SymbolMode,Symbol" in any text editor or metaeditor and change it to "MarketMode,Market", should be more or less the same as me.

      Then compile it in metaeditor and voila!

      Thanks

      posted in Bug Reports
      A
      azazelio
    • RE: Compiling error

      Hi all

      The solution is change "SymbolMode,Symbol" to "Marketmode,Market"

      Thanks

      0_1520962812491_2541c33a-c449-4fff-bc95-42e5ffbbd23b-image.png

      posted in Bug Reports
      A
      azazelio
    • Compiling error

      Hi all

      Im having this error trying to export to ex4
      'SymbolMode' - undeclared identifier 'Symbol' - undeclared identifier.

      I've exported this EA last friday with no problems.

      Any idea what is wrong?

      TA

      0_1520930947060_c9f8ea8c-7dfe-4588-8743-dcead7566c92-image.png
      0_1520930965949_47fb9551-21e4-4a6d-92f3-4216d617e977-image.png

      posted in Bug Reports
      A
      azazelio
    • RE: UPDATE time, write here if you have problems!

      Very frustrating
      I had achieved everything works again, and since half an hour nothing is working.

      Still thinking there are something wrong with variables (could be globals, constanst o local, dont know, I use all of them)
      Still not printing nothing on the screen (draw text, etc..).

      Thanks

      posted in Questions & Answers
      A
      azazelio
    • RE: UPDATE time, write here if you have problems!

      @fxDreema I forgot this one

      https://fxdreema.com/shared/BepY4KRZ

      "Draw text" blocks seems not working either

      Thanks

      posted in Questions & Answers
      A
      azazelio
    • RE: UPDATE time, write here if you have problems!

      @fxDreema Have you tried with the righ example... the block works fine... it doesnt works when you add more than one group orders. Please run the right one with ordersgroup "1,2,3,4" etc

      https://fxdreema.com/shared/ng9BTg5Kb

      Thanks

      posted in Questions & Answers
      A
      azazelio
    • RE: UPDATE time, write here if you have problems!

      Hi all

      I think i have found my "bug"

      Please have a look to this screen shot.
      I believe the groups fields should be "and/or " condition and not only "and".
      Thanks

      https://fxdreema.com/shared/t6b5eWHRd
      0_1503217331450_upload-fef0e3ad-ccdf-4ca9-9408-3ef4a3f1bf73

      posted in Questions & Answers
      A
      azazelio
    • RE: how use true or false ?

      Maybe?

      0_1499553823631_upload-71435e77-ccdd-472c-9bcb-1ae1946b7485
      0_1499553792151_upload-ed0da8da-508e-4ec9-a1ed-4cc99ed4e851

      posted in Questions & Answers
      A
      azazelio