fxDreema

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

    SL = X pips + spread?

    Questions & Answers
    6
    12
    3920
    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.
    • S
      SShui last edited by

      Hello all,

      Can someone tell me how to set SL 7 pips + spread

      thanks in advance!

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

        try this:
        ... that SymbolInfoDouble() returns value in points, that means spread 2 pips is returned as 20points, and it is why I divide it with 10 in calculation ... just try it 🙂

        0_1485610036566_upload-7acaa38a-269a-4b38-b499-f90d17e2c800

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

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

          But why?

          1 Reply Last reply Reply Quote 0
          • S
            SShui @miro1360 last edited by

            @miro1360 - Thanks - will test this tonight!

            @fxDreema - so my SL is always 7 pips and I dont get stopped out early because of the spread - is there a better way of doing this?

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

              Maybe you can check the spread before opening new trade (Spread filter)

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

                @fxDreema - But I want the EA to always open the trade, just not get stopped out early because the spread is high

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

                  This works: http://prntscr.com/e3cfjb Well, it's a little bit ugly that I need to put the SL as a value such as 0.0010

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

                    And how can i do the formula using ATR, meaning:

                    SL = ATR + Spread?

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      johnle1024 @JFerreira last edited by

                      @jferreira You can adjust accordingly in ATR similar to what fxDreema did above.

                      However, adding to the SL doesn't account for spread, it just makes SL larger by the spread and the price still needs to account for the spread. So all this does is make a bigger SL.

                      1 Reply Last reply Reply Quote 0
                      • D
                        DGRL last edited by

                        i tried somethin similar and the ea did not load in MT4
                        i want to have a break even of 1 time the spread and i want it to be activated when the profit is X amount higher/lower

                        Does any of you know why the EA did not wanted to load?
                        Maybe wrong equation?

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

                          If the EA gives error, then something is wrong with the code you wrote

                          1 Reply Last reply Reply Quote 0
                          • D
                            DGRL last edited by

                            @fxDreema

                            That is correct
                            I was able to fix the issue and now all is working fine

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

                            Online Users

                            K
                            A
                            S
                            B
                            A

                            22
                            Online

                            146.7k
                            Users

                            22.4k
                            Topics

                            122.6k
                            Posts

                            Powered by NodeBB Forums | Contributors