fxDreema

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

    Same EA in MQL5 and MQL4

    Questions & Answers
    1
    5
    1761
    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.
    • ekanters
      ekanters last edited by

      I created my MQL 4 EA in MQL 5. I didn't convert anything, I just did the (hard work) all over in MQL5. For some reason the MQL5 EA will not Terminate. 2 pictures below for clarification. Settings in both EA's are the same. Do I need to understand something more about MQL 5???

      0_1556473277789_MQ5.jpg
      0_1556473303752_MQ4.jpg

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

        Update with journal. Looks like it starts selling again before the function TERMINATE on trade is called. When selling again it means a trade is in play and the terminate function can't execute. Again its the same EA as in MT4
        0_1556876476905_wrong.jpg which operates perfectly.

        ekanters 1 Reply Last reply Reply Quote 0
        • ekanters
          ekanters @ekanters last edited by

          Below the input fields. Partial closes not visible are 0.4>0.2>0.1 and 0.1 at full target. This all works perfect except terminate on trade.
          0_1556877261158_input.jpg

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

            Error is clear but no Idea how to solve this. The EA works good until full target gets hit. At full target the EA doesn't close the last 0.1 lot size of each trade and because of that the EA cannot Terminate. (small note: After hitting first target no more trades are allowed)
            0_1557058147517_MQ5extra.jpg

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

              So I need to get used to MQ5 tester because just saw in History all trades did close which is not visible in operations. But that still doesn't explain why the EA does not terminate with "ON TRADE" settings.

              0_1557061874402_fill.jpg

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

              Online Users

              A
              L
              S

              20
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors