Wait for Candle cross twice in a row
-
Hi, I'm trying to enter a buy trade. After my initial conditions (low rsi etc.) are met then I turn on a "5m candle cross" condition that waits for the current 5-minute candle high to cross above the previous 5m candle high. At that cross, I want to trigger a condition that is identical to my 5m cross condition so that I can enter a buy trade when the current 5m candle high crosses the high of the previous 5m candle.
The problem is it is buying when the first cross happens instead of waiting for the next cross to happen. Maybe because I have 2 identical conditions in a row it passes both when the first cross happens? So to be clear, I want my EA to wait for the 5m cross and then wait again for the next 5m cross then enter the trade. Any help would be appreciated.
this is my first time asking a question on the forum. here is my example:
-
Could you please share your project to take a look on it?
-
@hax @l-andorrà is right. Easiest way would be to share a concrete project.
However, in general if you link 2 conditions, there are some ways to delay such as switch ON a block on first occurance of condition 1 or having a counting variable that is increased by each run condition 1 is valid.
In both cases you also need to care about invalidation in case condition 2 doesn't happen in sensible in a reasonable amount of time. In that case you'd reset to original condition.
Does that make sense? -
Hi. I put a link to part of the project at the bottom of my post. It does not have the actual exit strategies but I figure that does not matter. The actual project is much larger but it is not quite finished. I have to get the entries right or the project has no chance of being profitable. Thanks!
-
This makes sense thank you! I will try the turn on block in-between condition 1 and 2. Like I did earlier in the chain LOL. If it doesn't work, I will try a counting variable.
-
Thank you to all that replied! Adding another turn on block worked! Thank you!!!!!!!!!!!!!!!!!