fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Custom Code from MQL4 to MQL5

    Questions & Answers
    3
    4
    2252
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      eklonsousa last edited by

      How to make this code works for ex5 EAs?

      " double zz_temp_value = 0;

      var_zz_H0_ID = 0;
      var_zz_H1_ID = 0;
      var_zz_H2_ID = 0;
      var_zz_L0_ID = 0;
      var_zz_L1_ID = 0;
      var_zz_L2_ID = 0;

      for (int i = 0; i < zz_ID_interval; i++)
      {
      zz_temp_value = iCustom(Symbol(),zzTF,"ZigZag",zzDepth,zzDeviation,zzBackstep,0,i);
      if (zz_temp_value == var_zz_H0) var_zz_H0_ID = i;
      if (zz_temp_value == var_zz_H1) var_zz_H1_ID = i;
      if (zz_temp_value == var_zz_H2) var_zz_H2_ID = i;
      if (zz_temp_value == var_zz_L0) var_zz_L0_ID = i;
      if (zz_temp_value == var_zz_L1) var_zz_L1_ID = i;
      if (zz_temp_value == var_zz_L2) var_zz_L2_ID = i;
      }

      "

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        iCustom works in a very different way in MQL5. You can compare the definition of this function in the documentation of MQL4 and MQL5. But it is pain in the butt to make iCustom to work in MQL5 in a similar was as in MQL4.

        1 Reply Last reply Reply Quote 0
        • E
          eklonsousa last edited by

          Yes, man. It is very different. I'm using ZigZag to draw Fibonacci retracement correctly. For Mt4 it is working fine. For MT5 I can't even draw the fibo. With the same EA, but with some modifications.

          Btw, I'm using @miro1360 arcticle "ZigZag Advanced" as main engine.

          1 Reply Last reply Reply Quote 0
          • M
            miro1360 last edited by

            I suggest you to read all the comments too, they may contain an interesting reply:

            https://fxdreema.com/forum/post/20720

            Between trading and gambling is a very small gap, be careful.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post

            Online Users

            M
            B
            T
            S

            13
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors