GoldVelocity
- Uzmanlar
- Sürüm: 1.0
- Etkinleştirmeler: 5
GoldVelocity — a momentum scalper for XAUUSD
GoldVelocity — an automated advisor for MetaTrader 5 that trades on the speed of price movement. The strategy is based on the idea of market inertia: when gold begins to move quickly in one direction, the movement is highly likely to continue for several minutes. The advisor measures the price speed in pips per bar and opens a trade in the direction of the momentum, and when the movement fades, it closes the position without waiting for a stop.
How the strategy works
- Measuring speed. At each tick, the EA compares the current price with the price several bars ago (by default, 5 minutes on a one-minute chart) and converts the result into points per bar. This is called "speed."
- Pulse input. If the speed exceeds the entry threshold, a position is opened in the direction of movement: a sharp rise in price → buy, a sharp fall → sell.
- The solution is twofold. Each position has a strict stop-loss and take-profit. Additionally, the advisor monitors momentum decay: if momentum reverses against the position, the position is closed early, locking in the result without waiting for the stop.
- Pause between transactions. After each trade, the advisor pauses to avoid opening a series of trades on the same price spike.
Key Features
- Working on one symbol and timeframe — XAUUSD M1. The advisor holds no more than one position at a time.
- Automatic margin checking. Before each trade, the required margin is calculated: if the desired volume is beyond the available funds, the lot is automatically reduced to the allowed amount. Trades are not rejected with a "No money" error.
- Automatic volume normalization under the minimum, maximum lot and symbol step.
- Taking into account broker restrictions. Stop-loss and take-profit are automatically moved to the minimum allowed distance (stops level), manual closing is not performed inside the order freezing zone (freeze level).
- Respect for the trading session. The advisor checks the trading schedule for the symbol: trades are not opened outside of sessions, at market close, or on weekends. Trading permissions are also checked for the terminal, account, and advisor.
- Spread filter. Entry is not performed when the spread exceeds a specified threshold - this is important for gold, where the spread widens significantly at night and on news.
Parameters
| Parameter | By default | Description |
|---|---|---|
| LookbackBars | 5 | How many bars are used to measure price velocity? More bars means a calmer and longer signal; fewer bars mean a sharper and noisier signal. |
| EntrySpeed | 150 | Entry threshold in points per bar. If the price moves faster, a trade is opened. The key sensitivity parameter: the higher the value, the less frequent the signals and the stronger the impulse. |
| ExitSpeed | 30 | Extinction threshold. If the velocity reverses against the position by more than this value, the position is closed early. |
| StopLossPts | 300 | Stop-loss in points. Automatically moves to the minimum allowed by the broker. |
| TakeProfitPts | 600 | Take profit in points. Risk/reward ratio 1:2. |
| Lots | 0.10 | Desired trade volume. If the margin is insufficient, it is reduced automatically. |
| MaxSpreadPts | 40 | Maximum spread in points for entry. The EA does not trade above this threshold. |
| CooldownSec | 180 | Pause between trades in seconds – protection against repeated entries on the same impulse. |
| Magic | 202410 | Unique identifier for the advisor's trades. Change this if you have multiple advisors running on the same account. |
Recommendations for use
- Before trading on a real account Be sure to test it in the strategy tester on the history of several months, including trending and sideways market segments. Select EntrySpeed And LookbackBars for your symbol and broker - the frequency and quality of signals depend on them.
- A momentum-type strategy works best in a volatile market and suffers in a narrow sideways market: in a flat, impulses are rare and often reverse.
- During major news releases, gold prices experience sharp surges, which can be false signals. Consider the news calendar when evaluating your results.
- Start with a minimum volume and a control account.
Disclaimer
Trading in financial markets involves risk. Past testing results do not guarantee future returns. The Expert Advisor is a tool, not a guarantee of profit. Please make decisions regarding its use based on your own risk profile.
