fxDreema

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

    About pending orders counts

    Questions & Answers
    2
    12
    573
    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.
    • G
      Gauss last edited by

      Hello. I wrote a simple EA, let me explain with an example; For example, if I manually open a 0.02 lot buy transaction, it will place 5 buy limit orders of 0.02 lot on each decline at 10 pips intervals. But I run this EA side by side on both the m15 and m5 time frames of eurchf, for example. Although their magic numbers are different, when I place a buy limit order on a parity in the m15 time frame, it opens 10 pending orders, although it should open a total of 5. In other words, it detects the manual trade I opened in both m15 and m5 time frames and opens a trade equal to the total number of orders in both. Where am I making a mistake? I share the ea below. thanks

      https://fxdreema.com/shared/VbJz9JDjc

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

        Not sure if there is a simpler way to do this, but I would use a "If Condition" block. Then use bools to turn on/off the block you don't need on the OnInit tab.
        i.e. You attach the EA to M5, then turn M5 to true & M15 to false. Vice-versa for the M15.
        Screenshot 2023-11-27 103932.png

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

          Here's this if you're confused.
          https://fxdreema.com/shared/KcPGdVRTc

          1 Reply Last reply Reply Quote 0
          • G
            Gauss last edited by

            I tried but nothing changed. behaves as if the bool part does not exist

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

              I tested it multiple times in a demo and worked fine so something must be wrong in your project still.

              1 Reply Last reply Reply Quote 0
              • G
                Gauss last edited by

                I think it happens because you gave 5 transactions to both m5 and m15. For example, give 3 operations to m15 and 7 operations to m5 as variables. For example, if you open a buy transaction on m5, instead of placing 7 pending orders, it will place 3+7=10. Because Metatrader cannot know which time period chart we are using as a basis because we place the first order or pending order manually, this is the problem. I don't think this can be solved.

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

                  If you buy, it'll place 5 orders with 10 pips difference. Same with sell. Which is what you said in the first post in the thread. Now it sounds like you're saying something different?

                  1 Reply Last reply Reply Quote 0
                  • G
                    Gauss last edited by

                    I did not mean it. Let me briefly summarize what I want; I put ea on m5 and m15 charts separately. There are a few patterns I'm looking for. If this pattern comes across on m15, I open a trade manually or enter a limit order. If this transaction or order is on m15, I want it to place, for example, 5 pending orders in the direction of my transaction (this number 5 is variable). If this order or transaction is on m5, I want it to place, for example, 7 pending orders in the direction of my transaction (this number 7 is also variable). ...for example, when I open 1 order for m5 from mobile, how will the system understand that it is opened for m5 and will choose 7 orders and open that number of orders? Since he cannot understand this, he enters the total number of orders in m5 + m15. So 12. I'm looking for a way to solve this. I hope it's clear this time.

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

                      I see, you didn't say mobile before. Since mobile doesn't have EA attached, it would indeed be more difficult. You could probably use your MetaQuotes ID or have some comment identifier from your phone somehow but not sure how you would go about that. Maybe someone else has more insight. Can try to look into for a little a bit later to see if I can find anything.

                      1 Reply Last reply Reply Quote 0
                      • G
                        Gauss last edited by

                        Thank you so much for your interest

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

                          Yeah, I think it's pretty much impossible to know the specific timeframe you're on based on your phone since you can't have the EA on your phone. Only so much you can do.

                          1 Reply Last reply Reply Quote 0
                          • G
                            Gauss last edited by

                            yes I agree with you

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

                            Online Users

                            E
                            Y
                            L
                            F
                            S
                            F
                            N
                            S
                            E
                            H

                            28
                            Online

                            146.7k
                            Users

                            22.4k
                            Topics

                            122.6k
                            Posts

                            Powered by NodeBB Forums | Contributors