fxDreema

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

    Martingale over all pairs

    Questions & Answers
    4
    10
    2997
    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
      EAbaer last edited by

      Hello! I would like to use the martingale option over all pairs the EA is attached.

      Example:

      1. Trade: EURUSD 1 Lot Buy --> closed in loss
      2. Trade: USDJPY 2 Lot Sell --> closed in loss

      .... and so on.

      I think this is not possible with the martingale option in Buy/Sell block?

      Thank you very much.

      M 1 Reply Last reply Reply Quote 0
      • M
        moreirajbn @EAbaer last edited by

        @eabaer

        You can create a variable that will determine lot size, then use the block "check profit (last closed)" to modify the variable based on the outcome of the last trade. Modify to lot*2 if loss, and back to initial lot size if profit. You can then use the same lot size variable to buy/sell both EURUSD and USDJPY (you can choose the symbol and lot size within the buy/sell block)

        Search the forum for "martingale" and you'll find a tutorial on how to handle custom configurations..

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

          Thank you very much. So it is by design that the martingale Option in BUY/SELL block only works for the same pair?

          Should i use something like this: http://fxdreema.com/forum/topic/5937/tutorial-custom-martingale-1 ?

          There are one more problem:

          On a new account with no trades: how can i use „check profit (last closed)?

          Thank you!

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

            I would make another variable (:D) that just counts the trades opened. Then you could put first condition like "tradecount == 0" -> if true, use default settings,
            -> if false, "check profit" etc.

            Need small help? Tag me in your post
            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

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

              Good idea. Thank you very much.

              Do someone has a solution how to prevent 2 or more trades at the same time with many pairs, if every EA has „no trade“ block?

              1 Reply Last reply Reply Quote 0
              • E
                EAbaer @moreirajbn last edited by

                @moreirajbn

                But how can I solve the problem of increasing lot size at different pairs?

                EURUSD —> 1 Lot —> SL
                USDJPY —> 2 Lot —> SL (this will work)
                GBPUSD —> 4 Lot (how can this ES „know“ that there has to be 4 and not only 2 Lot?)

                Thank you.

                M 1 Reply Last reply Reply Quote 0
                • M
                  moreirajbn @EAbaer last edited by moreirajbn

                  @eabaer

                  In summary: the stop loss in ANY pair must modify the variable that defines lot size for all pairs.

                  • Create a variable called "LotSize"
                  • Use block "modify variable" to change LotSize to LotSize*2 every time a position in any pair is closed by SL (use the pink blocks)
                  • Use another "modify variable" block to change LotSize to initial lot size every time a position in any pair is closed by TP (use the pink blocks)
                  • Use the same LotSize variable to define lot size in the Buy/Sell blocks you're using for each pair.

                  Of course there are details that may be specific to your trading logic.... but the logic is above.

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

                    Thank you very much. But i think i could use global variables instead, too?

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

                      In the same EA, Martingale works for the same pair, yes. You can have let's say one Buy and one Sell blocks (or more than two blocks, it doesn't matter) working on the same pair, and those blocks will work "together". Basically, before going to create a new trade, the lot size is calculated from the previously closed trade with the same Symbol and magic number (or Group #). So if you have another block for another Symbol, then it works on a different Martingale... instance.

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

                        @fxDreema
                        Thank you very much.

                        What do you mean with "So if you have another block for another Symbol, then it works on a different Martingale"?

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

                        Online Users

                        E
                        E
                        O
                        O
                        D
                        F
                        K
                        C
                        E
                        M

                        24
                        Online

                        146.6k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors