Time Bomb Job
-
Hello i would like to know if with that block gives me the right result

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?
-
Time to wait is in seconds.
-
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? -
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.
-
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 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 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 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
-
jeez i wish i read this , before i got all exited . dam
-
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. -
I have a profitable setup, but I don't know how to build a robot.