fxDreema

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

    Martin gale system - Just started coding so all this is new to me

    Questions & Answers
    4
    7
    1265
    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.
    • C
      ChrisBiola last edited by

      When I export this EA to mt5 it only makes buy trade number one and it wont continue down the code with sell orders and so on.

      Im I doing this all wrong? all tips are much appreciated 😃

      Link to "EA":

      https://fxdreema.com/shared/389wylNre

      1 Reply Last reply Reply Quote 0
      • S
        SydneyFox last edited by

        Is it because you have Once a day block at the beginning? This block will only pass once each day so when the first Buy trade hits its stop loss it won't open a sell as the once a day block stops it from passing again?

        1 Reply Last reply Reply Quote 0
        • C
          ChrisBiola last edited by

          Thank you for reply, but the "one a day block" I just added to try out something new to get it to work.

          I have tried without many times, I used the block called "if position" and if that block was false it activated the "buy" block under.

          But it stops after the buy block, it doesnt activate "check how it was closed". If the initial "buy" block closed by Stop Loss the "check how it was closed" block shoud be activated and instant open a sell order.
          But this does not work.

          Do you have other alternatives that I can try ? 🙂

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

            I see common mistake that I tried to explain here - https://fxdreema.com/demo/mt4-wrong-closing-rule

            Maybe you want to use that option for custom sequence in the Money Management options. Try it with just "No trade -> Buy now" and see what happens.

            By the way the word is a whole word "Martingale". I think this is not a name of a person, it's something else - http://www.dictionary.com/browse/martingale

            1 Reply Last reply Reply Quote 0
            • C
              ChrisBiola last edited by

              I tried to just add "no trade - buy now" but still nothing happening after the first buy block.

              But I took a look at your explanation, and I think I understand a little more now.

              It seems like the problem is in the "check how it was closed" box. Like you explain, maybe it only checks one time and if conditions are not met that one time - nothing happens?

              Let me know if you have a easy solution to what im trying to code here 🙂

              Thank you and happy coding !

              1 Reply Last reply Reply Quote 0
              • I
                Implosion last edited by

                There is much easier ways to do that if you are still working on that.

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

                  Well, what I see in your projects is this:
                  0_1520882343867_56ad301b-126b-4849-a871-7e65e6fce618-image.png

                  I can imagine that there is a connection between both blocks, but they are under "on Init", which means that they run only once when the EA starts. Try them under "on Tick" 🙂

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

                  Online Users

                  H
                  G

                  9
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors