fxDreema

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

    OrderModify error 130

    Questions & Answers
    3
    16
    9941
    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.
    • A
      ambrogio last edited by

      hello @miro1360 , please, can you help me? 0_1508444093339_OrderModify error130.PNG
      I can not resolve this error, I guess it depends from the trailing stop. If we handle the trailing stop/start, more and more times gives the error, sometimes gives no error, is there any formula to fix this issue?
      thanks in advance
      https://fxdreema.com/shared/ULeQD7jse

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

        I added various checks here and there, so the EA would attempt to automatically move SL or TP to the nearest possible levels before the request is sent to the server. But while the request is sending, the price moves and suddenly the SL or TP level that is sent looks invalid. This is what I think the problem is. I guess that the problem happens only sometimes, and other times everything is fine.

        A 1 Reply Last reply Reply Quote 0
        • M
          miro1360 last edited by

          I think this error is caused when broker reject your request for modify order, you can not do much for this issue (it depends on broker) ... why broker is doing this ... because, most brokers are using some automated antiscalping plugins which are controlling traders behaviour - I mean, if trader is not very agressive (scalping trading) ... into scalping can be achivied also agressive trailing-stop and moving stops by 1 pip and stops too close from open/close price ... if you want avoid this issue, you have only few options:

          • find super scalping broker (I dont know if any exist, when you trade greater volume, no one want see you scalping 😄 ), or
          • change trailing stop limits (like fewer agressive) ...

          Between trading and gambling is a very small gap, be careful.

          A 1 Reply Last reply Reply Quote 0
          • A
            ambrogio @fxDreema last edited by

            @fxdreema the problem is that: if I set trailing stop=1, and trailing start=3, the tester crashes, maybe you have to calculate the stop level of the broker?

            1 Reply Last reply Reply Quote 0
            • A
              ambrogio @miro1360 last edited by

              @miro1360 you are right but the product that I am developing is subjected to the check of the mql5 community, and I have to find the solution to avoid the error

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

                it calculates the stop level of the broker... just before sending the request. But the actual prices could change while the request travels to the broker, so when the request finally arrives there (let's say 200 ms later), the requested SL is already invalid.

                Unfortunately in the request we specify SL and TP as absolute values, not as relative. We send values such as 1.2345, not for example 0.0010 (for 10 pips relative to the current Ask/Bid price that is on the broker). So, because of that the EA can say one price, but until this price goes to the broker, the price is already different.

                A 2 Replies Last reply Reply Quote 0
                • A
                  ambrogio @fxDreema last edited by

                  Hi @fxdreema, I saw that the curious thing is that this does not happen with orders Buy now
                  https://fxdreema.com/shared/qz047fJae

                  1 Reply Last reply Reply Quote 0
                  • A
                    ambrogio @fxDreema last edited by

                    @fxdreema, @miro1360 , i have found these two codes on MQL5 community, it could solve the problem?
                    talk later, tanks
                    0_1508494381035_CODE_1.PNG
                    0_1508494395981_CODE_2.PNG

                    1 Reply Last reply Reply Quote 0
                    • M
                      miro1360 last edited by

                      this worth a try 🙂

                      Between trading and gambling is a very small gap, be careful.

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        ambrogio @miro1360 last edited by ambrogio

                        @miro1360, how could I try these on fxdreema, I am not a programmer mql, any suggestion?

                        1 Reply Last reply Reply Quote 0
                        • M
                          miro1360 last edited by

                          it is little complicated 😄

                          Between trading and gambling is a very small gap, be careful.

                          A 1 Reply Last reply Reply Quote 0
                          • A
                            ambrogio @miro1360 last edited by

                            @miro1360 it may be useful the "Custom MQL4 code" block?

                            1 Reply Last reply Reply Quote 0
                            • M
                              miro1360 last edited by

                              yes, but you need create here whole trailing ... or combination of normal blocks + custom code block (with code for modifying stops into both directions - because SL have possibility goes into "possitive" when it is as trailing ... ) ...

                              Between trading and gambling is a very small gap, be careful.

                              A 1 Reply Last reply Reply Quote 0
                              • A
                                ambrogio @miro1360 last edited by

                                @miro1360 .....ok, I'll think about it, thank you

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

                                  But I have checks like these in the code above, even more, so if the SL level is less than the required, it is automatically changed to the minimum that is required 🙂 But I think the problem happens because until the request travels to the server, sometimes all the numbers become different (and wrong)

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    miro1360 last edited by

                                    and take into account also reasons from brokers antiscalp plugin (which is also activated for agressive trailing stops) 😄 ... this plugin just reject your request and send info into log that your request was not accpeted for many reasons 😄 ... and here is nothing you can do with this (only avoid agressive trailing or scalping or another broker 😄 ) ... ...

                                    Between trading and gambling is a very small gap, be careful.

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

                                    Online Users

                                    A
                                    E

                                    8
                                    Online

                                    146.7k
                                    Users

                                    22.4k
                                    Topics

                                    122.6k
                                    Posts

                                    Powered by NodeBB Forums | Contributors