fxDreema

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

    What do I have to do if I want that after close trade the previous candles do not count?

    Questions & Answers
    2
    3
    144
    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.
    • G
      grupodama last edited by

      Suppose the EA is programmed for a moving average crossover where a sale is made when a buy is closed and vice versa, what I need is that after two negative operations it does not open the next one, that is, I do not want the candle to count when the second negative operation is closed and that in the next candle that would be "ID 0" the EA will start as if it had not made any operation before. I have tried it with the block "skip ticks" and configured as "skip for centain time" but as my candles are "renko" sometimes it doesn't work, if I configure it as "skip until certain time" it never works for me. I would be very grateful if you help me.

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

        @grupodama When a trade closes set a int variable to 0, once per bar add 1 to the variable, before buy/sell check this number is high enough with a condition block, if need be count the losses before setting the variable to 0.

        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! 😊

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

          @jstap Thank you very much Jstap, I already have it solved. All the best.

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

          Online Users

          D
          T
          S
          B
          F
          T

          19
          Online

          147.0k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors