I would like to develop an Expert Advisor with the following rules and features:
Indicator A: when it generates a signal, the possibility to open a trade is activated.
Indicator B: must confirm the signal within a maximum of 10 candles from Indicator A.
Important: The signal from Indicator B is valid only after the candle that generates it has closed. Open candles do not generate a valid confirmation.
Measure the size of the confirmation candle of Indicator B (high - low in pips).
If the candle exceeds a user-configurable maximum value, do not open the trade.
This avoids entries on overly large candles, which often anticipate retracements.
SL:
Default below the lowest of the last 10 candles (long) or above the highest of the last 10 candles (short).
Ability to add a user-configurable buffer.
Ability to set the stop in pips instead of using the min/max of the last 10 candles.
TP:
Default twice the stop loss, but both SL and TP can be manually modified by the user before opening the trade.
Ability to set take profit directly in pips as a user-configurable input.
Trailing Stop: optional, configurable by the user.
Break-even: move SL to breakeven after a certain number of pips of profit (configurable input).
Lot size:
Fixed lot
Percentage of account balance/risk (% risk per trade)
Max daily profit: block new trades if reached.
Max daily loss: block new trades if reached.
Do not open trades during major economic events.
Ability to select the impact level (high, medium, low).
Optional post-news timeout configurable by the user.
Magic Number: specific (e.g., 123456).
Ability to enable/disable all advanced features by the user.
Logging of trades, signals, and parameters used (optional for debugging and optimization).