Check for two bull candles in a row after opening sell trade
-
I'm having trouble getting this to work. So I enter a sell trade at the open of a candle. Then two candles later at open, I want it to look back and see if there are two bull candles. If there are, the trade will be closed. If there are not, then the sell will continue (but it will not keep checking for bulls candles anymore for the trade). If there aren't two bulls candles on the first two candles I want the sell trade to remain for the life of the trade (and it will be closed on indicator reversal). I have if trade (for sells) set up and then I tried every nth bars (set to 2 bars) but it seems to ignore that and pass immediately into the next candle, Rather than two candles away.
-
Try these blocks in order:
If Trade
Condition ( Candle ID 2 < Candle ID 1)
Close Trade -
@jsauter86 Can you please share your project?
-
@jsauter86 I don't understand what Condition (Candle ID 2 < Candle ID 1) would do. It needs to check for two bull candles in a row right after a sell. So sell is opened on at start of a bar. Then not the next candle bar but the open of the one after that it checks last two candles to see if, bullish and then closes trade if they are. And if it is NOT bullish then the trade stays open until reversal from indicator so it can only pass through here once after first two green candles.
-
@kizerage212 said in Check for two bull candles in a row after opening sell trade:
@jsauter86 I don't understand what Condition (Candle ID 2 < Candle ID 1) would do. It needs to check for two bull candles in a row right after a sell. So sell is opened on at start of a bar. Then not the next candle bar but the open of the one after that it checks last two candles to see if, bullish and then closes trade if they are. And if it is NOT bullish then the trade stays open until reversal from indicator so it can only pass through here once after first two green candles.
can you share your current project?
-
Oh nevermind, I used the modify variable block and created a variable called counter. I then just had it count+1 until it reached 2 and a condition to pass once it equals 2 starting at zero to check the bulls in a row two candles past. So far it works. Thanks
-
@kizerage212 Good for you.
