fxDreema

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

    Lookback or hold indicator value for confirmation

    Questions & Answers
    2
    5
    766
    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.
    • H
      hjmr last edited by

      Hi,

      I’m trying to program the following:

      When RSI cross 50, look back certain amount of bars (ex. 50 bars) to confirm if RSI was in an overbought/oversold region. If so, then proceed with buy or sell.

      Thanks,

      roar 1 Reply Last reply Reply Quote 0
      • roar
        roar @hjmr last edited by

        @hjmr here: https://fxdreema.com/shared/AHuqK5DSb

        The draw line is only for visualization

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

        1 Reply Last reply Reply Quote 0
        • H
          hjmr last edited by

          Thank you for your fast response and sharing the program. I was looking at it. So the 2,3 and 7,8 blocks are performing the lookback? I‘ll keep studying your code.

          Thanks,

          roar 1 Reply Last reply Reply Quote 0
          • roar
            roar @hjmr last edited by

            @hjmr yes! When detecting the 50 cross, block 1 first resets the cid variable ("candle id") to 0. Then the loop keeps increasing the number, looking for rsi 70 or reaching the limit (lookback)

            Need small help? Tag me in your post
            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

            H 1 Reply Last reply Reply Quote 0
            • H
              hjmr @roar last edited by

              @roar
              Thank you. Im used to eabuilder and transitioning to fxdreema. Have to keep learning. This was of great help.

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

              Online Users

              A
              R
              S
              M
              P
              R
              A
              D

              16
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors