fxDreema

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

    Need Help with MA Strategy

    Questions & Answers
    2
    3
    477
    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.
    • L
      lbeetge last edited by

      Hi All

      I am trying to create this strategy but cant seem to get it working. The idea is very simple.

      Entry conditions (BUY):

      1. Price needs to cross through and close above the 20 SMA
      2. Price needs to close above the 50 SMA

      Buy two market orders.

      Stoploss for both orders is the value of ATR(14) in pips

      1st Order Take Profit is value of ATR(14) in pips
      2nd Order Take Profit is when price closes below the 20 SMA

      Close all open orders if price closes below 20 SMA

      This is what I have: https://fxdreema.com/shared/HYjmYblEc

      When I run this on backtest the entry criteria seem to work well, although it does miss some valid entries. The big problem is that it ignores the stoploss and take profits for the first order. Instead it just closes both orders when price closes below the 20 SMA.

      Hope I explained it well enough.

      Any help would be greatly appreciated

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

        ATR gives us values like 0.0014, which I call "price fraction" in some blocks, and maybe "digits" in others... if I missed to fix it. "Pips" expects values like 14. Of course you can multiply ATR by 10000, but this "price fraction" is already available, so... https://fxdreema.com/shared/qRuutgoU

        1 Reply Last reply Reply Quote 0
        • L
          lbeetge last edited by

          Thank you very much. Worked perfectly. Much appreciated

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

          Online Users

          M
          M
          G
          M
          B
          T
          F

          13
          Online

          146.8k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors