fxDreema

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

    Time Bomb Job

    Questions & Answers
    6
    11
    3237
    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.
    • M
      mpantogi last edited by

      Hello i would like to know if with that block gives me the right result 0_1504956085411_1.jpg

      I want when the condition is true and the price raise 5 pips in 30 minutes to buy now.The time to wait it is the max time.If the price raise 5 pips in 5 minutes then Buy now too,if the price doesn't raise 5 pips in max 30 minutes don't buy now.

      Is that the right way to do that?

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

        Time to wait is in seconds.

        M 1 Reply Last reply Reply Quote 0
        • M
          mpantogi @Stroker last edited by

          ok,sorry for minutes i mean seconds.
          So if the price raise 5 pips in 20 seconds then it will wait 30 seconds or in 20 seconds it will be true and Buy now?

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

            I think it waits, it works on periods of those seconds. This block is dumb, I made it long time ago and is one of those blocks that I want to remove.

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

              Ah ... these blocks ... if it were possible to operate exactly in real account what is possible in the backtest, we would have excellent setups with only these blocks. It is a way out of the charts and operate directly with ticks, which is how the market works.

              I once built a strategy with these blocks, but it turns out that in the backtest on ticks, it's not the same as real ticks on the market. If it were possible to repeat similarly or identically what you do in the backtest on a real account, we will have an EA millionaire.

              tcanuto 1 Reply Last reply Reply Quote 0
              • tcanuto
                tcanuto @tcanuto last edited by

                @tcanuto said in Time Bomb Job:

                Ah ... these blocks ... if it were possible to operate exactly in real account what is possible in the backtest, we would have excellent setups with only these blocks. It is a way out of the charts and operate directly with ticks, which is how the market works.

                I once built a strategy with these blocks, but it turns out that in the backtest on ticks, it's not the same as real ticks on the market. If it were possible to repeat similarly or identically what you do in the backtest on a real account, we will have an EA millionaire.

                The secret I believe to be for this to happen is to know how the backtest simulates the historical ticks and do this calculation simulta- neously, but on the actual account.

                tcanuto 1 Reply Last reply Reply Quote 0
                • tcanuto
                  tcanuto @tcanuto last edited by

                  @tcanuto said in Time Bomb Job:

                  @tcanuto said in Time Bomb Job:

                  Ah ... these blocks ... if it were possible to operate exactly in real account what is possible in the backtest, we would have excellent setups with only these blocks. It is a way out of the charts and operate directly with ticks, which is how the market works.

                  I once built a strategy with these blocks, but it turns out that in the backtest on ticks, it's not the same as real ticks on the market. If it were possible to repeat similarly or identically what you do in the backtest on a real account, we will have an EA millionaire.

                  The secret I believe to be for this to happen is to know how the backtest simulates the historical ticks and do this calculation simulta- neously, but on the actual account.

                  In short ... make it work exactly what happens in backtestes, but in real account.

                  tcanuto 1 Reply Last reply Reply Quote 0
                  • tcanuto
                    tcanuto @tcanuto last edited by

                    @tcanuto said in Time Bomb Job:

                    @tcanuto said in Time Bomb Job:

                    @tcanuto said in Time Bomb Job:

                    Ah ... these blocks ... if it were possible to operate exactly in real account what is possible in the backtest, we would have excellent setups with only these blocks. It is a way out of the charts and operate directly with ticks, which is how the market works.

                    I once built a strategy with these blocks, but it turns out that in the backtest on ticks, it's not the same as real ticks on the market. If it were possible to repeat similarly or identically what you do in the backtest on a real account, we will have an EA millionaire.

                    The secret I believe to be for this to happen is to know how the backtest simulates the historical ticks and do this calculation simulta- neously, but on the actual account.

                    In short ... make it work exactly what happens in backtestes, but in real account.

                    I believe the answer is here: https://www.mql5.com/en/articles/75

                    1 Reply Last reply Reply Quote 0
                    • max c
                      max c last edited by

                      jeez i wish i read this , before i got all exited . dam

                      1 Reply Last reply Reply Quote 0
                      • max c
                        max c last edited by max c

                        Explanation: by grok ai
                        Initialization: levl_last and time_last are static variables, meaning they retain their values across function calls, allowing us to keep track of the last checked price and time.
                        Current Data Capture: We get the current time with TimeCurrent() and the current ask price with SymbolAsk(SYMBOL).
                        Movement Check:
                        levl_diff calculates how many pips the price has moved since the last check (toPips() converts price difference to pips).
                        time_diff calculates how much time has passed since the last check.
                        Condition for Triggering:
                        The block checks if the price has moved up by at least PipsInTime within TimeToWait seconds. If so, and if the current price is higher than the last checked price, it sets next = true.
                        If the time limit (TimeToWait) is exceeded without the required movement, reset is set to true to start tracking again from the current price and time.
                        Reset or Move Forward: If reset is true, we update levl_last and time_last to the current values to start a new tracking cycle. If next is true, it signals to move to the next block in the strategy; otherwise, it might loop back or move to an alternative path.

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

                          I have a profitable setup, but I don't know how to build a robot.

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

                          Online Users

                          E
                          J
                          D
                          M
                          X
                          K
                          E
                          D
                          M
                          H

                          20
                          Online

                          146.6k
                          Users

                          22.4k
                          Topics

                          122.6k
                          Posts

                          Powered by NodeBB Forums | Contributors