2 Conditions separeted by time
-
Hello.
I have some difficulty establishing 2 conditions separated by time (not simultanously).
No trade is running > Condition 1 > if yes then wait for Condition 2 > if yes Buy now
If I directly connect Condition 1 to Condition 2 it interprets that the 2 conditions must be fulfilled at the same time but that is not what I want.
Thanks
-
One possibility is the following logic:
No trade is running > Condition 1 > if yes Buy or Sell Pending Orden (Custom/Indicator including Condition 2)
-
There are 2 ways to do that.
- To check for the second condition and when it is true, to check for the first condition back in the time. Candle ID is available, so we can check any candle or indicator value in the past. Of course, this method can be only used when the time between both conditions is fixed, because candles are fixed.
- When the first condition becomes true to remember that (in a variable). Then, also on every tick checking the second condition if the variable is set to true.
-
Many people think that conditions follow one after another in the way you are talking about and they are connecting blocks one after another like each block is a step. This way is more limited, but I was thinking that I can add some workfield where the blocks will work like this. But if there are 2 chains of blocks, then maybe unexpected things can happen
-
Thanks for the ideas. I will test them.