Pending order, loop after loss. Help
-
Hello, I would like to ask for help with a simple breakout strategy using pending orders, using a trailing stop. The idea is to place pending orders in both directions during a specific time period every day. If not triggered, they should be canceled at the end of the day. What I want is that after a losing trade, under the same conditions, the EA should place three pending orders three times the size. I've tried using Martingale and a loop, but I couldn't achieve the desired result. I would be grateful if someone could help. If you have any suggestions for better solutions to the previous ones, I would appreciate it. This is how it looks now.
-
According to your project, there should be one only bu and one only sell per day. Is that correct? I tell this because you say you want 3 new trades to be open after one of those is closed in loss. Is that what you want?
-
@l-andorrà Yes, my intention is to have one trade per day, and for the next three trades, for three days or until activated, set the stop order with three times the lot size. After that, it should revert to the original.
-
Then you need two variables. One for storing the value of the new lot size and another one counting how many lost trades happened so far. Are you familiar with variables?
-
Yes, I have used variables before. Should the new size be calculated with a formula? Should the consecutive losses be checked with the "Check consecutive losses" block? How should it be assembled?
-
@Adam692 You can do something like this in the 'on trade' tab:

That means every time a buy is hitting its SL, the counter will add +1 and the lot size will be increased a 50%.
Then you can use the standard condition blocks in the 'o tick tab to compare if les than 3 trades were lost so far.
-
@l-andorrà Thank you, I will try.
-
You're welcome.