Specifiche
Hello! I need an fully automated Expert Advisor for Meta Trader 5 that opens series of trades based on deviation from MA. Instruments: Forex pairs, metals, indices, oil. All time frames. Entry/Exit Logic: First trade triggers when price deviates from Moving Average for a preset number of pips and lot size. Trade closes when price returns and hits MA. If price goes further second trade opens with manually preset lot size and distance from the previous trade and so on. All trades close when price returns to MA. No SL for trades. All trades should be closed if account balance hits a certain percentage of Daily Drawdown.
*********************************************************
1. General Information
Trading platform: Meta Trader 5 (MT5)
Trading Instruments: All currency pairs (if not all, at least major), Gold, Silver, Oil Brent, Oil WTI, Indices: German DAX 40, Japanese NIKKEI JP225, US Dow Jones Industrial Average, UK FTSE100, Standard and Poor's 500, Australian All ordinaries ASX200, NASDAQ.
Chart: All timeframes (M1, M2, M3, M5, M10, M15, M30, M45, H1, H2, H4, Day)
2. Strategy and Entry/Exit Logic
Technical Indicator: Moving Average (all settings are as in MT5 i.e. Period, Shift, Method (Simple, Exponential, Smoothed, Linear Weighted), Apply to (Close, Open, High, Low, Median Price HL/2, Typical Price HLC/3, Weighted Close HLCC/4).
Entry Conditions: Trade opens when the price deviates from preset Moving Average to any direction for a preset number of pips and preset lot size. If price goes up from MA SELL trade opens backwards toward MA. If price goes down from MA BUY trade opens towards MA. Trade closes when price hits MA. If price doesn't return to MA second trade opens the same direction as the first trade. There should be maximum 7 trades. For each next trade distance from the PREVIOUS trade in pips and lot size are set manualy. No pending orders, only market execution.
Exit Conditions: No Stop Loss for any trade. Three options to close trades: i) Preset number of pips for each trade; ii) Close all trades when price returns to MA; iii) Close all trades when profit reaches xx% of the Balance.
Time Filter/Restrictions: EA should refer to a calendar (For instance, to forexfactory.com calendar) to avoid high impact news. Time interval to be discussed. There should be an additional option to select three time intervals to exclude sessions. Time refers to MT5 platform time.
3. Trades and Position Sizing.
Lot Size: from 0.01 to 10.0 lots. Lot sizes are set manually for each trade.
Distance from MA: Distance for a first trade is set as a "Distance from MA", distance for a second trade is set as a "Distance from the first trade". Distance for a third trade is set as a "Distance from the second trade" and so on. Maximum number of trades is seven.
4. Risk Management: No Stop Loss to any trade is set. There shoulld be three options to close trades: i) when the price returns and hits MA; ii) preset number of pips for each trade; iii) when the total profit of all trades reaches certain percentage (preset manually) of Account Balance. Last option is "Close all trades when the loss reaches certain percentage of Daily Drawdown (preset manually). If certain percentage of Drawdown is reached, no more trades that day.
5. Technical and MQL5 Specifics.
Use Magic Number for EA. (Can I open 2-3 charts of the same instrument, same timeframe but different settings? On one chart more aggressive trading with shorter distances, on the second chart larger distances for a more conservative trades).
Slippage and Spread: No trades if Spread exceeds xxx pips.
6. Testing and Optimization.
Backtesting Period: up to 5 years. Optimization Criteria: Lowest Drawdown, Highest profit. (Something else?)
7. Additional Requirements.
a) There should be an option to turn on bands on both sides of MA. Colour, thickness and line type (line, dotted line). Bands should be strictly parallel to MA, not expanding or contracting like Bollinger bands. Distance from MA for bands should be set manually in pips.
b) If I interfere in EA work and close trades manually EA should not open new trades at a current price to replace closed trades.
c) Signal Lifetime: No restrictions. Trades are closed at Take profit (see Section 4) or at a certain maximum DailyDrawdown or manually by me.
d) I should receive all .ex5, .mq5, .set files for this EA and open MQL5 script.