Termos de Referência
Expert Advisor (EA) Specification
Objective:
Develop an EA that utilizes two indicators: Fractals and MACD (3,6,1) to identify divergences, draw trendlines, mark horizontal zones based on fractals on higher timeframes, and trigger price alerts when these zones are reached. The EA should also incorporate risk management settings and be compatible with synthetic indices.
Indicators & Logic Implementation:
1. Fractals Indicator
-
Detects fractals where two candles to the left and two candles to the right confirm a fractal formation.
-
Marks a horizontal zone at the fractal level.
-
Zones are drawn on higher timeframes (H4, D, W, M), with different colors if multiple timeframes are used. Default setting should use H4 only.
2. MACD Indicator (3,6,1)
-
Used to detect divergence between price and MACD histogram.
-
If divergence is detected, a trendline is drawn on both the indicator and the price chart to illustrate it.
3. Trendline Drawing (Divergence Detection)
-
When a bullish or bearish divergence is detected, the EA should automatically draw a trendline:
-
Bullish Divergence: Price forms lower lows, while MACD histogram forms higher lows.
-
Bearish Divergence: Price forms higher highs, while MACD histogram forms lower highs.
-
4. Horizontal Zone Drawing (Fractals)
-
When a fractal forms, draw a horizontal zone at the high (for bearish fractals) or low (for bullish fractals) of the fractal candle.
-
If the same level is marked by fractals on multiple timeframes, different colors should be used for clarity.
Trading Alerts & Notifications
-
Price Alert: Trigger an alert when price reaches the fractal zones.
-
Divergence Alert: Alert when a new bullish or bearish divergence is detected.
-
Notification Methods:
-
On-screen pop-up alert.
-
Email notification.
-
Push notification to mobile (if supported by platform).
-
Risk Management Settings:
-
Lot Size: User-defined or percentage of account balance.
-
Stop Loss (SL):
-
Default: Below/Above the most recent fractal zone.
-
Adjustable based on user settings.
-
-
Take Profit (TP):
-
Default: 2x SL distance or next fractal zone.
-
Adjustable based on user preference.
-
-
Risk Percentage: EA should allow the user to define risk per trade as a percentage of account balance.
Compatibility with Synthetic Indices:
-
The EA should be designed to work with synthetic indices (e.g., Volatility indices, Jump indices, Boom & Crash indices).
-
Handle market conditions specific to synthetic assets (e.g., volatility spikes, non-traditional price action).
User Inputs & Settings:
-
Indicator Settings:
-
MACD (3,6,1) parameters (modifiable by user).
-
Fractals (number of candles left & right - default 2 each side).
-
Timeframes to use for fractal zone drawing (H4, D, W, M).
-
Colors for different timeframe zones.
-
-
Trade Settings:
-
Lot size (fixed or percentage-based).
-
Stop Loss / Take Profit settings.
-
Risk percentage per trade.
-
-
Alerts & Notifications:
-
Enable/Disable alerts.
-
Preferred notification method.
-
Execution & Performance Considerations:
-
Low latency execution for faster response.
-
Optimized for minimal CPU usage to prevent platform lag.
-
Draw only necessary objects (trendlines, zones) to keep the chart clean.
Expected Deliverables from Programmer:
-
Fully functional EA (.ex4/.ex5) compatible with MT4/MT5.
-
Source code for future modifications.
-
User guide/documentation.
-
Backtest results on both forex pairs and synthetic indices.
-
Option to include an ON/OFF button on the chart for quick enable/disable of EA functions.