fxDreema

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

    How to limit "number" of trading symbols? if I drag EA into 28 pairs but want to limit only 4 pairs. ?

    Questions & Answers
    7
    12
    3953
    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.
    • J
      Jakkarin79 last edited by Jakkarin79

      How to limit "number" of trading symbols? if I drag EA into 28 pairs but want to limit only 4 pairs that activate it's condition first to trade. ?

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

        In other words, the 4 pairs can say if the ea trades or not?
        You will need global variables, so the eas can talk to each other

        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
        • S
          shafifie last edited by

          can kindly you show some example?

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

            Wow, what? I know that the way EAs can communicate is by those terminal variables that are called Global Variables in MetaTrader (click F3). Or maybe you can do it in the EA. remember that the trading blocks (No trade and others) can filter the trades by magic number (Group), symbol and type, but you can exclude some of them if you want.

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

              Hi fxdreema,

              Can this condition block limit pair traded at one time?

              https://fxdreema.com/shared/2ckslDrgd

              A bit difficult to test the idea due to backtest only allow one pair at one time.

              Thanks.

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

                This purple dot (on Trade) thing is only to be used under the "on Trade" event, it doesn't mean that there are trades from 5 markets out there. There is nothing actually to check how many pairs are traded at the moment and as long as I remember you are the first one to ask for such thing. Or at least this is what I think you are asking for, I'm not sure. But true, the Tester in MT4 is very limited with that 1 pair only.

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

                  Hi again fxDreema,

                  At least, you got what my idea it is.

                  In order to make you grasp my idea fully, let me explain more.

                  When the condition in my EA met, buy/sell trade will initiate.

                  Let say the idea only 4 symbols/pairs are allow to trade simultaneously.

                  For this situation, 4 symbols/pairs already initiate a trade. Doesn't matter how many trade(layer/volume added) in these pairs, as long as only 4 of these symbols/pairs were involved.

                  If the condition also met in the 5th symbol/pair, buy/sell trade will not initiate until one or more current symbols/pairs traded have reach Take Profit/closed trade. This is to maintain 4 symbols/pairs limitation.

                  This idea is very useful if account balance was limited.

                  Let say, my account balance can only withstand 4 symbols traded at one time (unrealized loss/floating amount).

                  I just imposed the condition to trade only 4 symbols at one time.

                  So, with this idea we can limit any numbers of symbols to be traded at one time depending on account balance.

                  This is due to known fact 😝, we don't know which symbols will initiate trade first. As the EA will be attach to maybe 28 symbols/pairs chart or more.

                  If you can implement this idea, I'm sure our EA will be more flexible with any account balance.

                  Thanks.

                  1 Reply Last reply Reply Quote 0
                  • P
                    primecapitalvn @Jakkarin79 last edited by

                    @jakkarin79 UP
                    anyone know how to do this?

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

                      I am creating an EA on fxdreema and I would like some help to limit trades per currency. I intend to trade eurcad, eurusd, nzdusd, usdcad, usdjpy and euraud but I want to trade no more than one usd and no more than 2 EUR. I turned to AI for help because this question was asked before but it was not clearly resolved. It gave a 5 steps process . I am unable to implement all the Steps except step 1 and step 3 . Below find the steps and provide help . To limit trades per currency in fxDreema — specifically:
                      ‱ ✅ No more than 1 USD trade
                      ‱ ✅ No more than 2 EUR trades
                      — across pairs like EURCAD, EURUSD, NZDUSD, USDCAD, USDJPY, and EURAUD, follow this step-by-step guide using fxDreema’s built-in blocks (no custom MQL4 coding required).


                      🧠 Concept:
                      We’ll:

                      1. Loop through all open trades
                      2. Count how many contain "USD" or "EUR" in their symbol
                      3. Use conditions to block new entries if the limit is reached

                      ✅ Step-by-Step in fxDreema


                      đŸ”č Step 1: Define Your Variables
                      Go to the “Variables” tab and create:
                      Name Type Initial Value
                      usdCount int 0
                      eurCount int 0
                      These will track the number of open USD and EUR trades.


                      đŸ”č Step 2: Reset Variables on Every Tick
                      In the “on Tick” event, add two blocks:
                      ‱ Set Variable → usdCount = 0
                      ‱ Set Variable → eurCount = 0
                      This ensures we reset before recounting each time.


                      đŸ”č Step 3: Loop Through All Open Trades
                      Add a block:
                      Block: For each Trade
                      Scope: All Trades
                      This will loop through each open trade.


                      đŸ”č Step 4: Inside the Loop — Count Currencies
                      ➀ Check if Trade Symbol Contains "USD"
                      ‱ Condition block:
                      o Left: Symbol
                      o Is: Contains
                      o Right: "USD"
                      → Connect this to a Modify Variables block:
                      ‱ Variable: usdCount
                      ‱ Action: Add
                      ‱ Value: 1


                      ➀ Check if Trade Symbol Contains "EUR"
                      ‱ Condition block:
                      o Left: Symbol
                      o Is: Contains
                      o Right: "EUR"
                      → Connect this to another Modify Variables block:

                      here is the link for the project. https://fxdreema.com/shared/ytofVuile

                      1 Reply Last reply Reply Quote 0
                      • l'andorrĂ 
                        l'andorrĂ  last edited by

                        The logic is correct. The problem is that fxDreema condition blocks do not use that 'contains' options, sadly. I think the only option here should be using custom code or a programmer (I'm not one, sorry) could confirm is we could use the '*USD' form on the 'text(code input)' display option. More than that, I'm afraid I cannpt be more helpful.

                        (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                        (CatalĂ ) MirarĂ© d’ajudar tothom en aquests fĂČrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb mĂ©s profunditat o mĂ©s de pressa, t’hi puc ajudar amb el meu curs d’introducciĂł a fxDeema en catalĂ  a https://www.theandorraninvestor.eu/ca.

                        (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o mås deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

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

                          Thanks. I will look for a programmer to help with coding.

                          1 Reply Last reply Reply Quote 0
                          • l'andorrĂ 
                            l'andorrĂ  last edited by

                            You're welcome.

                            (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                            (CatalĂ ) MirarĂ© d’ajudar tothom en aquests fĂČrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb mĂ©s profunditat o mĂ©s de pressa, t’hi puc ajudar amb el meu curs d’introducciĂł a fxDeema en catalĂ  a https://www.theandorraninvestor.eu/ca.

                            (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o mås deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

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

                            Online Users

                            W
                            M
                            M
                            N
                            G
                            H
                            S
                            E

                            26
                            Online

                            146.7k
                            Users

                            22.4k
                            Topics

                            122.6k
                            Posts

                            Powered by NodeBB Forums | Contributors