Spécifications
1.
Here are the definitions of the input variables for the EA:
• Trade distance: the distance in pips between the take profit levels of each additional trade
• Trade lot size: the initial lot size for each trade
• Trade lot size multiplier: the multiplier used to calculate the lot size for each additional trade
• Trade take profit no stop loss: the take profit level for each trade in pips (since there is no stop loss)
• Swing pullback level minimum: the minimum pullback level required for a swing point to be considered valid
• Swing pullback maximum: the maximum pullback level allowed for a swing point to be considered valid
• Number of additional trades: the maximum number of additional trades that can be opened in the same direction as the initial trade
2. To identify potential trading opportunities, the EA should analyze the price action using candle close and swing points. A swing low is a price point that is lower than the two adjacent price points, while a swing high is a price point that is higher than the two adjacent price points. The EA should track the distance between each swing low and swing high to determine potential trade opportunities.
3. For a sell condition, the EA should look for a pullback from a lower low into at least 50% of the last swing high and current swing low at the close of the current bar within 50% to 95% pullback range. If this condition is met, the EA should execute a sell trade with a lot size calculated based on the input variables.
4. For a buy condition, the EA should look for a pullback from a higher high into at least 50% of the last swing low and current swing high at the close of the current bar within 50% to 95% pullback range. If this condition is met, the EA should execute a buy trade with a lot size calculated based on the input variables.
5. If the price moves against a sell order, the EA should only add another sell trade if current candle close, if the specified trade distance is reached if not reached do not add trade. The lot size for this additional trade should be calculated based on the trade lot size multiplier input variable. If the price continues to move against the new sell trade, the EA should continue to add new trades at specified trade distance only if current candle close withing the specified distance, until it reaches the maximum number of additional trades.
6. If the price moves against a buy order, the EA should only add another buy trade if current candle close, if the specified trade distance is reached if not reached do not add trade. The lot size for this additional trade should be calculated based on the trade lot size multiplier input variable. If the price continues to move against the new buy trade, the EA should continue to add new trades at specified trade distance only if current candle close withing the specified distance, until it reaches the maximum number of additional trades.
7. Once an additional sell trade has been executed, the EA should move the take profit of all open sell orders to the same point using averaging take profit. This will bring the take profit closer to enable trade closure at the new averaged take profit.
8. Once an additional buy trade has been executed, the EA should move the take profit of all open buy orders to the same point using averaging take profit. This will bring the take profit closer to enable trade closure at the new averaged take profit.
9. The EA should continue to monitor the price action and execute trades based on the specified conditions until the trade hits the take profit.
10. If the trade distance is set to zero, the EA should not execute any additional trades in the same direction as the initial trade.
11. The EA should also have a feature to limit potential losses by implementing a maximum allowed drawdown. If the drawdown exceeds this limit, the EA should close all open trades to prevent further losses.
12. The EA should have an option to set a stop loss for each trade, which would override the trade take profit no stop loss input variable.
13. The EA should have a user-friendly interface that allows traders to easily configure the input variables, set stop loss and maximum drawdown limits, and view performance metrics such as profit and loss, win rate, and average trade duration.
14. The EA should also have a feature to allow traders to choose between different trading strategies, such as trend following or range trading.
15. The EA should be capable of handling different time frames and instruments, and the user interface should allow traders to easily switch between them.
16. The EA should provide detailed logs and reports on all trades executed, including entry and exit points, lot sizes, and profit/loss. This information can be used by traders to analyze their trading performance and identify areas for improvement.
17. The EA should be designed with security in mind, and should not store any sensitive information such as login credentials or account balances. Traders should be responsible for managing their own accounts and ensuring that their trading strategies are compatible with their risk tolerance and financial goals.