fxDreema

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

    Movable horizontal line to define position size

    Questions & Answers
    2
    3
    348
    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
      SirLuk last edited by

      Does anyone know how to go about this?

      I want a horizontal line on my charts which I can move around according to where I want my stop loss. On tick, the EA always calculates the distance from the line to the live price. If I then click buy or sell (on created buttons), the position size will automatically be correct to give me a fixed stop loss in money, the size which I define before hand in a constant.

      So let's say the constant says 100$. I pull the line to where I want the SL and then click buy. The position size is then automatically calculated and applied to my trade.

      jstap 1 Reply Last reply Reply Quote 0
      • jstap
        jstap @SirLuk last edited by

        @sirluk You'll find all you need in here:

        https://fxdreema.com/shared/WSCVrJKxc

        The same blocks work in MT4 aswell.

        Learn fxDreema Without the Wait!

        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

        Don’t miss out

        Click here➡️ https://mybook.to/fxDreema to get your copy today!

        Enjoy! 😊

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

          Thanks @jstap. The solution for what I wanted is actually much easier than I thought. Draw a horizontal line and then use object on the chart as a stop loss mode. I had to create seperate Buy and Sell buttons, since I want to open trades manually with this EA. But I'm really happy with it. I just pull the line to my intended stop and click buy or sell. Position size all automatic.

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

          Online Users

          V
          C
          K
          A

          25
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors