What is it? The option of "Wait to Pass" on every block
-
With a right click on every block, there is an option "Wait to Pass".
It seems to make the block wait for some time or clicks or anything before enabling itself. What would be exact logic of it? Do I need to setup anything else to make it useful? -
@sktsec This is an old feature that it is hardly used. Technically you can do what you say, and make the block to wait for some time before executing the action of any following block, but that is only useful in very limited contexts. Simply ignore it.
-
Normally you have these events - init, tick, deinit and so on. I assume you understand them, so I won't explain them here. These events correspond to the actual event functions in MQL (https://www.mql5.com/en/docs/event_handlers). If we take the OnTick function for example, it automatically runs on every incoming tick, which means the code inside this function is executed on every tick. In fxDreema instead of code you have blocks, but the idea is the same.
This means that when building a logic, the foundation of the logic must always be the tick event. You must be able to imagine how ticks are coming and how blocks are executed on every tick.
However, traders usually think about their logic in a little bit different way. They think about steps, like "first this happens, then this happens, then this is checked and if true - this happens, otherwise something else happens". Such logic never mentions the incoming ticks.
"Waiting" blocks are my attempt to allow making the EA in that Steps logic. If all "wait" blocks can pass every time, then the whole logic is the same as the Tick logic. But if some "wait" block doesn't pass, then on the next tick this will be the block that will be executed first - the blocks above it will not be executed. And this will repeat on every tick until the "wait" block finally passes. Only when the end of the branch is reached, the top block would have the chance to be executed again.
But after I made this functionality and I tested it, I was disappointed. I don't know, maybe my brain is more accustomed to the Tick logic, or the Tick logic is just better for making trading logic. I noticed that when I stared adding more branches of blocks, I was having hard times synchronizing the work of all branches.
So, the "Waiting" logic is fine until you have only 1 branch of blocks, or the different branches are doing completely different things and they don't interfere.
-
@fxDreema
Clear explanation to make me fully understood. BTW, I joined the paid service after your website was hacked and recovered. Your response showed to us that you are a reliable genius doing an awesome job! -
@l-andorrà
Many thanks for the explanation, which I had read several times in the description but never really understood. It is very important to make it clear that ALL BLOCKS ABOVE can only be executed again after they have been passed. I didn't immediately understand that in the general description, it might be good to emphasize this again clearly in the general description.