
Trend Vector EA this is a trend-following EA that uses the standard technical indicator Average Directional Movement Index (ADX) for market analysis and decision-making. The EA enters a trade when a strong trend emerges in the market. An entry signal is generated when two key conditions are met: trend strength and trend direction. The primary signal for closing a position is a weakening trend. The EA also includes other position management mechanisms, such as Stop Loss, Take Profit, Trailing Stop, and an optional trade closure upon the appearance an opposite signal.
| Developer price | FREE |
| Terminal | MT4 |
| Currency pair | ANY |
| Timeframe | ANY |
| Recommended brokers | InstaForex , ICMarkets |
| For advisor recommended to use VPS 24/5 | vps24hour – Excellent inexpensive VPS for $3 per month you can use up to 3 terminals!!! |
Backtesting:
Testing was conducted on the XauUsd pair on timefraim H1 with settings, the file for which you can download from the link in our Telegram channel https://t.me/srcfx/44 . However, keep in mind that you can choose the best settings and currency pairs yourself.This settings file is not some ideal recommended solution, it is just a starting point.

Settings:

Description parameters:
===== Indicator Settings =====
| Parameter name | Description and operating principle |
|---|---|
| ADX Period | The period (number of candles) for calculating the ADX indicator. Decreasing the value makes the indicator more sensitive to short-term price changes, increasing the number of signals (possibly false). Increasing the period smooths the indicator, making it slower and filtering out market noise. |
| ADX Level | The level that the main ADX line must cross to confirm trend strength. The higher this value, the stronger the trend required to open a trade. This filters out weak movements but may result in missing part of the trend. |
===== EA Settings =====
| Parameter name | Description and operating principle |
|---|---|
| Entry | Determines when exactly the trade will be opened after receiving a signal. • Immediately: The trade is opened immediately on the current tick. • After bar closed: The trade is opened only at the opening of a new candle. |
| Exit | Determines when the trade will be closed on a weakening trend signal. • Immediately: The trade is closed immediately. • After bar closed: The trade is closed at the open of a new candle. |
| Trade Side | Allows you to select the trading direction. • Long: Only purchases. • Short: Only sales. • Both: Both purchases and sales. |
| Entry Point | Allows you to invert (flip) the entry logic. • Normal: Standard logic • Reversal: Reverse logic |
| Close on Return Signal | If true, then when a sell signal appears, all open purchases will be closed, and vice versa. |
| Max spread (0 to disable) | The maximum spread (in pips) allowed for opening a trade. If the current market spread is higher than this value, no new trades will be opened. 0Disables this check. |
| Slippage | Maximum allowed slippage (in points) when sending a trade order. |
| Magic number | A unique identifier that the Expert Advisor assigns to its trades to distinguish them from trades opened by other Expert Advisors or manually. |
| Comment | A text comment that will be assigned to each trade opened by this EA. |
===== Maximum Positions =====
| Parameter name | Description and operating principle |
|---|---|
| Max trades per day | Limits the maximum number of trades (both open and already closed) that the advisor can execute during one trading day. |
| Position limitation | Enables ( true) or disables ( false) the following limits on the number of positions. |
| Max Total Positions | The maximum total number of simultaneously open positions (both buy and sell). |
| Max BUY Positions | Maximum number of simultaneously open buy positions. |
| Max SELL Positions | Maximum number of simultaneously open sell positions. |
===== Lot Settings =====
| Parameter name | Description and operating principle |
|---|---|
| Lot Mode | Determines how the lot size will be calculated for each new trade. • Fix Lot: The fixed lot size specified in is always used Lot Value.• Money: The lot size is calculated so that its margin requirement is equal to the amount specified in Lot Value.• % Equity: The lot is calculated as a percentage of the current funds (Equity) in the account. Lot Valuesets the percentage.• % Equity for SL: The lot is calculated so that when Stop Loss is triggered, the loss will be a certain percentage of the funds (Equity). Lot Valuesets the percentage.• % Balance for SL: Similar to the previous one, but the calculation is based on the balance. • Money for SL: The lot is calculated so that when Stop Loss is triggered, the loss will be a fixed amount in the deposit currency specified in Lot Value. |
| Lot Value | The numerical value for the lot calculation mode selected above (e.g. 0.1 lot, $100, 1.5 percent). |
===== Stop Loss Settings =====
| Parameter name | Description and operating principle |
|---|---|
| SL Type | Determines the method for setting Stop Loss. • Off: Stop Loss is not used. • Fix: Fixed SL in pips from the opening price. • % Price: SL is set as a percentage of the opening price. • Money: SL is set to a level at which the loss will amount to a specified amount in the deposit currency. • Absolute Price Level: SL is set to the absolute price level specified in SL Value.• ATR * Mult: SL is set at a distance equal to the ATR indicator value multiplied by Multi for ATR SL.• High/low X Bars: SL for buying is set to the minimum ( Low) of Xthe last candles, and for selling – to the maximum ( High). Xis set in SL Value.• % Balance: SL is set to the level where the loss will reach the specified percentage of the balance. |
| Use Network SL | Use Network Stop Loss. If true, and multiple trades are open in the same direction, the EA will attempt to calculate a common “breakeven” Stop Loss for the entire order grid. |
| SL Value | Numeric value for the selected SL type. |
| Multi for ATR SL | Multiplier for type ATR * Mult. |
===== Take Profit Settings =====
| Parameter name | Description and operating principle |
|---|---|
| TP type | Determines the method for setting Take Profit. • Off: Take Profit is not used. • Fix: Fixed TP in pips. • % Price: TP as a percentage of the opening price. • Money: TP at the level where the profit reaches the set amount. • Absolute Price Level: TP at the absolute price level. • ATR * Mult: TP at a distance equal to ATR multiplied by Multi for ATR TP.• Risk/Reward: TP is set depending on the SL size. For example, if TP Value= 2 and SL = 50 pips, then TP will be 100 pips (ratio 1:2). |
| Use Network TP | Use network Take Profit. Similar to Use Network SL, but for locking in the total profit across the order grid. |
| TP Value | Numeric value for the selected TP type. |
| Multi for ATR TP | Multiplier for type ATR * Mult. |
===== Trailing Settings =====
| Parameter name | Description and operating principle |
|---|---|
| Trailing Type | Trailing stop type. • Off: Not used. • Standard Pips: Classic trailing. SL moves after the price when it moves a distance in the profitable direction Trailing Start.• ATR Start: Trailing is activated when the price moves in the profitable direction by a distance equal to the current ATR value. • % Stop Loss: Trailing is activated when the price moves in the profitable direction by a percentage of the initial SL size (specified in Trailing Start). |
| Trailing Start | The distance in pips/percentage that the price must travel in a profitable direction for the trailing stop to be activated. |
| Trailing step | The step with which the Stop Loss will move following the price. |
| Trailing Target | The target to which the Stop Loss will be moved. • Move Each Pips: SL simply moves after the price with a specified step. • Sync With MA: SL is moved to the level of the moving average (MA). |
| Trailing MA Length | Moving average period for Sync With MA. |
| Trailing MA Type | Moving average type (SMA, EMA, etc.). |
===== Breakeven Settings =====
| Parameter name | Description and operating principle |
|---|---|
| Breakeven Type | Determines how the trigger for moving a trade to breakeven will be calculated. • Off: Not used. • %: Triggered when profit reaches % of the opening price. • Pips: Triggered when profit reaches the specified number of pips. • Money: Triggered when profit reaches the set amount. • % SL: Triggered when profit reaches % of Stop Loss size. • Absolute Price Level: Triggered when the price reaches the specified level. |
| Breakeven Start | The value (pips, %, money) at which the move to breakeven will be triggered. |
| Breakeven Level | The level to which the Stop Loss will be moved 0is the opening price, 5which is the opening price + 5 pips. |
===== Martingale Settings =====
| Parameter name | Description and operating principle |
|---|---|
| Martingale Type | Enables and defines the averaging logic. • Off: Not used. • Add Position On Loss: A new trade in the same direction is opened if the current position goes into loss • Add Position On Profit: A new trade (top-up) is opened if the current position goes into profit. |
| Lot Type | A method for increasing the lot for the next trade in the grid. • Off: The lot does not increase. • Multiplicator: The lot of the previous trade is multiplied by Lot Value.• Addition: The lot of the previous transaction is added Lot Value. |
| Lot Value | The multiplication factor or value for adding the lot. |
| Step Type | What is the unit of measurement for the next trade opening? • Pips: In pips. • %: As a percentage of the opening price. |
| Open Step | The step size (in pips or %) after which the next trade in the grid will be opened. |
| Max Long | Maximum number of buy trades in one martingale grid. |
| Max Short | Maximum number of sell trades in one martingale grid. |
===== Time Settings =====
| Parameter name | Description and operating principle |
|---|---|
| GMT Offset | Your broker’s time offset from GMT. Specify this so the advisor can determine the time correctly. |
| Start Time / Stop Time | Intraday filter. The advisor will trade only during the specified time interval (for example, from 9:00 AM to 6:00 PM). |
| Mandatory Closing | If true, all open positions will be forcibly closed after the Stop Time expires. |
| Weekly Time | Enables (true) or disables (false) the day of week filter. |
| Start Day / Stop Day | Start and end day of the week for trading. |
| Start Time / Stop Time | Trading start time on Start Day and trading end time on Stop Day. |
A separate thread has been created for this advisor on the forum https://fxclub.top/index.php?threads/3-trend-vector-ea.554/ (Note: registration is required to view the thread and chat on the forum)
This is a space for communication, discussion of the nuances of this EA, exchange of experience and results, as well as a joint search for optimal settings.
Reminder: As with every trading system, always remember that forex trading can be risky. Don’t trade with money that you can not afford to lose. It is always best to test EA’s first on demo accounts, or live accounts running low lotsize. You can always increase risk later!
