fxDreema

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

    Confirm divergence on two timeframes before placing a trade

    Questions & Answers
    2
    3
    282
    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.
    • R
      ralph1 last edited by

      Hi guys, I'm creating a multi-strategy EA which is divergence and also a combination of some moving averages. And this is how I want it to be:
      For buy trades:

      1. If there is a bullish divergence on the 30m and 15m timeframe. if not, check if the 50SMA is below the candles. If yes, the 9SMA should cross above the 18SMA.

      So for buy trades, one of these conditions(or) strategies should be executed. and vice versa for sell trades.

      I want you guys to take a look at the project if I'm on the right path or there's something I need to change, because the check position count is not working. Trades are placed just once.

      Ralph

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

        @ralph1 You are on the right track, not sure what these con dition blocks are doing

        0_1636369037413_e543d73f-9360-4264-92ab-a8c41a6a8f69-image.png

        I use these as in constant/variable I have a bool then I don't use Istype. I use it as if (already in block) variable/constant, then whether true/false the correct dot is activated.

        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
        • R
          ralph1 last edited by

          The ltype and sltype variables are enumerations that let the user choose from the lot type i.e fixed lot and auto lot same for the sltype.

          Ralph

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

          Online Users

          N
          S
          S
          Y
          D
          B
          E

          16
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors