fxDreema

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

    Variable For Broker's Minimum S/L

    Questions & Answers
    2
    8
    1599
    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.
    • T
      Trader3487 last edited by

      Is there a way to call variable that contains broker's s/l minimum for a particular symbol? For example, to use a condition block that says if market price for [symbol name] > broker minimum for that symbol, then set s/l.

      I am looking at the column on the right side of this page titled "limit and stop loss levels": http://www.xm.com/assets/pdf/spreads/XM ... o_2013.pdf

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

        In MQL4 this value can be get with:

        MarketInfo(Symbol(),MODE_STOPLEVEL)
        

        the returned value is in poits, for example it can be 20 in 5-digits broker (0.00020). I can add this somewhere, but you can also use this is Value -> Numeric.
        For specified symbol:

        MarketInfo("EURUSD",MODE_STOPLEVEL)
        

        But now when the requested SL is too short, the minimum is taken. Or at least it tries to take the minimum, but sometimes there are error messages because the price changed. Well, even if this happens it will try to send the trade with updated SL until it succeed.

        1 Reply Last reply Reply Quote 0
        • T
          Trader3487 last edited by

          thanks!

          1 Reply Last reply Reply Quote 0
          • T
            Trader3487 last edited by

            this is giving me compile errors when I put MarketInfo("EURUSD",MODE_STOPLEVEL) into "start when profit is above" field. If I leave that field empty then, it works but I need to put this there as offset so trailing stop doesn't start in the negative zone: http://fxdreema.com/shared/hp3YtkRhc

            1 Reply Last reply Reply Quote 0
            • T
              Trader3487 last edited by

              I noticed that when you edit block, the comma (",") in "MarketInfo("EURUSD",MODE_STOPLEVEL)" changes to a period (".") but if you set it back to a comma, then it compiles without errors. But it still doesn't work correctly.

              Trailing stop mode = dynamic size (in pips)
              Start when profit is above = dynamic level

              dynamic size (in pips) = dynamic level?

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

                I will check that ","->"." problem...
                But this formula gives value in points, but in fxDreema "pips" can be different, it depends if the broker is 4 or 5 digits, and Point format set in fxDreema. There is something more to be added to that formula, but I don't think you need to do that, because when Trailing stop modifies SL or TP, it checks stops level and if SL or TP is too small - it takes the minimum. You can try this if you set fixed pips to something small, for example 1.

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

                  Let's say you want to tell Trailing stop to keep SL at the minimum distance. If you set small value it should do that by itself. Is there another reason for you to use this parameter?

                  1 Reply Last reply Reply Quote 0
                  • T
                    Trader3487 last edited by

                    well, let's say you want to offset the trailing stop so it starts after the open price. A fixed value won't work for all symbols, wouldn't I need a dynamic value? How would I do this?

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

                    Online Users

                    A
                    F
                    F
                    E
                    A
                    E
                    M
                    F
                    K

                    16
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors