fxDreema

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

    How to set the SL level to the closest current price level?

    Questions & Answers
    3
    4
    1328
    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
      josecortesllobat last edited by

      Hello

      Please, are you kind to help to figure out this?

      I have a condition where the SL level of any opened position is moved when a TP level is reached. The EA Works pretty well but sometimes the SL is not moved as I expected and the MT5 journal logged the error showed below for each time this takes place:

      0_1523527926242_8e39217f-7a0f-4782-8006-982dcf82b94f-image.png

      So, is there a way to set "automatically" the SL level as close as posible to the current price level if my condition is not met? My condition to move the SL level is like this (On Trade)

      0_1523528028044_87690ea2-c2c6-484c-a848-f1e72d10c845-image.png

      I have added other conditions in On Tick section to try to solve the issue but it is still happening

      0_1523528154955_44528266-81a8-446f-9652-e6e4583b9651-image.png

      Any suggestion will be welcome.

      Thanks

      Regards

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

        hi can i talk to you on skype or telegram ??? +919803926981 is my telegram and hemantpremi@gmail.com my skype please write me there

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

          @josecortesllobat Invalid SL appears when SL is too close or on the opposite side of the market price. I programmed the blocks to find the closest SL possible when you provide number that is too small, for example 0.1 pips. So if you try such value, you should see a message by the EA that SL is set to the minimum possible value, or something like that.

          But I guess there is a possible problem that may happen sometimes. Let's say you provide a number that is too small and the EA calculated the closest possible. The EA sends the modify request to the server, but in the meantime the price moved and now the desired SL level is already on the wrong side, so it returns that error. Unfortunately I don't know how to deal with this 🙂

          1 Reply Last reply Reply Quote 0
          • J
            josecortesllobat last edited by

            @fxDreema Thanks for your support. I guess that the blocks work as you described but I was not really sure.

            Yes, it happens what you said. The SL level is not allowed to move to the price set because there is a movement in the opposite direction and now the SL price set is above (longs) the current price.

            Not a problem. I have just to design a workaround for the SL logic what is very easy with your builder.

            Thanks

            Regards

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

            Online Users

            X
            J
            A
            N
            S
            E
            A
            M
            T
            M

            18
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors