Termos de Referência
Let's develop an EA for MT5.
Indicators:
Bollinger Bands with customizable period and deviation.
Moving Average with customizable period.
Financial Manager:
Customizable initial lot size
Customizable Martingale multiplier (with decimals)
Customizable Take Profit (TP)
Customizable Stop Loss (SL)
Trading Logic:
if no open orders and the last trade hit TP:
Use the initial lot size.
If the moving average is above the middle band of the Bollinger Bands: open a buy order.
If the moving average is below the middle band of the Bollinger Bands: open a sell order.
if no open orders and the last trade hit SL:
Apply the Martingale multiplier to the last lot size.
Open a trade in the opposite direction of the last trade.
Please provide the complete MQL5 code for this EA.