Please teach me why the Close Trades didn't work
-
I set some conditions for closing trade.
Candle ID 1 close>BBand lower band>Candle ID 1 open, then close trade.
I connected the blocks like this:
But after I check the resul of backtesting, I found out close trades didn't work.

The bull candle I mark as yellow circle fits the close trades conditions: Candle ID 1 close>BBand lower band>Candle ID 1 open. But the trade wasn't closed.Is there anybody could kindly teach me on which part I made mistake?
Really appreciate. -
@pei Hi!
I don't see any mistake in the blocks overview. Perhaps there is some small setting wrong.
Maybe your "if trade" counts only buys?
How about the "close trades", is it filtering only buys?
Did you remember to use ID1 in all calculations, candle ID and bollinger ID? The bollinger indicator ID is hidden in the "more settings" section:

-
@roar Thank you so much. I set "if trade" as" either buys or sells", I think it makes sense. Also same setting for "close trade". I hink the issue is I didn't use ID 1 in bollinger, I never knew that, thank you so much for teaching me. I coreect it and did backtesting again. Seems it worked. But I have another question, what should I do if I want to clse the trade at candle ID 1 close price?

So whenver I use bollinger in conditions, I have to get into "more setting" to set the candle ID, right?
It's so kind of you. I really appreciate. -
@pei
Well, you use "once per bar", so the EA only checks the candle open. ID 1 means history (first history bar), you can't decide to close your trades at a history time, you see. -
@roar Understood. Thank you so much.