HFT AI Expert Advisor
- Experts
- Auras & Bielawski GbR
- Versione: 1.217
- Attivazioni: 10
stelaraX – HFT AI Expert Advisor
Fully automated high-frequency trading with integrated AI pre-filtering
1. Core Concept and Usage Recommendation
The stelaraX – HFT AI Expert Advisor is a fully automated trading system for MetaTrader, designed specifically for high-frequency scalping and trend-following strategies. It combines:
-
Classic technical indicators (EMAs, ATR, ADX, candle structure)
-
A high-frequency candle-scalping module
-
Extensive risk and profit-protection mechanisms
-
An optional ChatGPT pre-filter (OpenAI integration) that evaluates each signal “intelligently” before entry.
Recommended setup:
-
Account size: from around 1,000 USD
-
Leverage doesn´t matter
-
Timeframes: works best on M1, M5, M15
-
Out-of-the-box: The EA is preconfigured so that it can be used directly after installation. Fine-tuning is possible but not required.
-
Financial instrument: BTC/USD
-
Changes for backtesting:
SL: 100000 Points
TP: 75000 Points
Trailing Close:
true
6.0
BE_MinProfitMoney: 3.0 -
We recommend GBE brokers as your broker.
2. General Settings & Management
-
EA_Name / Manufacturer / Contact
Display and logging of EA name, manufacturer, support email and website in the terminal journal. -
Magic Number
Unique identifier for all trades of this EA – important when multiple EAs run on the same account.
These settings mainly help with organization and clean separation of trades from other systems.
3. Trading Basics
3.1 Core Trading Parameters
-
Lot size per trade (InpEntryLots)
Controls the default position size per entry (e.g. 0.25 lots). -
Stop Loss & Take Profit in pips
-
InpStopLossPips
-
InpTakeProfitPips
Internally converted to points and automatically adjusted to the broker’s minimum distance.
-
-
Fast & slow EMA (InpFastMAPeriod / InpSlowMAPeriod)
The core signal logic is based on an EMA crossover:-
Cross from below to above → long signal
-
Cross from above to below → short signal
-
The entry logic combines this crossover with several quality filters (see section 6).
4. Trade Direction & Trading Days
4.1 Long/Short Enable
-
EnableLong / EnableShort
Separate activation of long and short trades.
→ e.g. trade only long in a strong uptrend.
4.2 Trading Days
-
EnableMonday–Sunday
Detailed control over which weekdays the EA is allowed to trade.
Useful for excluding weekends or specific days (such as heavy news days).
On every tick, the EA checks whether the current day is allowed; if not, no new trades are opened.
5. Spread & Volatility Filters
5.1 Maximum Spread
-
MaxSpreadPoints
Maximum allowed spread in points (0 = disabled).
→ Protects against entries when spreads are extreme (e.g. during news or low liquidity).
5.2 ATR Volatility Filter
-
UseATRFilter, ATR_Period, ATR_MinPct
The EA measures the average candle range (ATR) relative to price.-
If volatility is too low, signals are ignored.
-
Goal: only trade when there is enough movement in the market to make scalping meaningful.
-
6. Signal Quality Filters & Trend Logic
This is a major strength of the EA: signals are not taken purely on a basic crossover, but cleaned by several filters.
6.1 Higher Timeframe Trend (HTF Trend Filter)
-
UseHTFTrendFilter, HTF_TF, HTF_EMA_Period
An EMA on a higher timeframe (e.g. H1/H4) defines the higher-timeframe trend.-
Long signals are preferably taken only in uptrends.
-
Short signals preferably only in downtrends.
→ Reduces trades against the dominant trend.
-
6.2 EMA Slope Filter
-
UseSlopeFilter, MinFastSlopePoints, MinSlowSlopePoints
Measures how much the fast and slow EMAs move per bar.-
If the slope is too low, the signal is discarded (sideways/range conditions).
→ The EA aims to trade mainly in genuine momentum phases.
-
6.3 ADX Trend Strength
-
UseADXFilter, ADX_Period, Min_ADX
ADX checks whether a significant trend is present.-
If ADX is below the minimum threshold, signals are ignored.
→ Filters out noise in trendless phases.
-
6.4 Candle Confirmation
-
ConfirmCandles
Optionally requires a defined number of candles to close in the trend direction after the EMA cross
(bullish candles for long, bearish candles for short).
→ Confirms that the signal is not just a spike.
6.5 Anti-Flip Logic (AvoidRecentFlipBars)
-
AvoidRecentFlipBars
Prevents taking a new trade in the opposite direction immediately after a recent cross.
→ Protects against whipsaws in choppy, sideways markets.
6.6 EMA50 Trend Filter
An internal EMA 50 acts as an additional trend indicator:
-
Price above EMA50 → bias to long
-
Price below EMA50 → bias to short
This filter is used both in the “standard” signal logic and in the HFT module.
7. High Frequency Trading (HFT Mode / Candle Scalping)
-
UseHFTMode, HFT_MinMovePoints
In HFT mode, the EA does not only react bar-by-bar, but works on tick level:
-
It measures how far price has moved within the current candle from a reference point.
-
If a minimum movement (HFT_MinMovePoints) is exceeded, the EA registers a new directional move (up/down).
-
If this direction aligns with the EMA trend (EMA50), an entry can be triggered.
-
If there is already a position in the opposite direction, it can be closed (depending on No-Loss mode and profit conditions).
Goal: actively exploit fast intrabar moves and dynamic price swings.
8. Anti-Flip & Cooldown Between Trades
-
MinSecondsBetweenTrades
Minimum time in seconds between new trades (protection against over-trading). -
OneTradePerBar
Only one trade per bar is allowed.
This reduces trade clusters (many trades within a very short time) and avoids unnecessary double entries and exits.
9. Position Count & Hedging
-
MaxOpenPositions
Maximum number of open positions per symbol and magic.
→ By default, the EA is conservative and limits itself to one position per symbol to keep the risk per market bounded.
10. Profit Targets & Trailing Functions (Account Currency)
10.1 Profit Target in Account Currency
-
UseProfitMoneyTarget, MinProfitMoney, MaxProfitMoney
-
Once a defined minimum profit in account currency (e.g. 50 USD) is reached, the EA can close the position automatically.
-
MaxProfitMoney serves as a reference/logging value – if exceeded, the EA can still close trades.
-
10.2 Trailing Stop in Money (SL-Based)
-
UseTrailMoney, Trail_ActivateMoney, Trail_LockMoney, Trail_StepMoney
Once a certain profit is reached:-
A dynamic stop loss in account currency is calculated,
-
the EA tracks the maximum profit,
-
and moves the stop forward when new profit highs are made.
-
This systematically locks in part of the profit.
10.3 Trailing Close (No SL, Market Close Only)
-
UseTrailingClose, TrailingCloseMoney
Here, no SL is moved. Instead, if profit falls back by a defined amount from the maximum realized floating profit (MFE), the EA closes the position at market.
→ Useful for brokers/instruments where SL trailing or gaps are problematic.
11. Dynamic Stop Loss (Trailing in Pips)
-
UseDynamicSL, DynamicSL_Pips, DynamicSL_AfterBE
The EA can trail the stop based on a fixed pip distance:
-
For longs: SL follows the bid with a fixed distance.
-
For shorts: SL follows the ask with a fixed distance.
Optionally, this trailing can start only after the BreakEven level has been reached (DynamicSL_AfterBE).
12. BreakEven / No-Loss Mode
12.1 BreakEven / Small Profit Lock
-
BE_MinProfitMoney, BE_Lock_Pips
Once a minimum profit level (in currency) has been reached, the EA can:-
move SL to the entry price,
-
and optionally lock in a few extra pips to secure a small guaranteed profit.
-
12.2 No-Loss Mode
-
NoLossMode, CloseOnlyAboveMoney
In No-Loss mode, the EA will never deliberately close a trade in loss as long as this option is active.-
Positions are only closed when at least a small positive profit has been reached.
-
This applies to parts of the HFT logic and to several close mechanisms.
-
Note: This mode aims to reduce realized losses, but may cause positions to remain open longer.
13. Safety Mechanisms & Time-Based Timeout
13.1 Profit Rescue (SafetyClose)
-
SafetyClose_Enable, Safety_MinMFE_Pct, Safety_CloseBufferPct
-
The EA tracks the maximum floating profit in percent (MFE).
-
If profit falls back from a strong peak but is still positive, the EA can close the position to “rescue” the remaining profit.
-
13.2 Time-Based Position Timeout
-
CloseAfterSeconds
After a defined holding time (in seconds), the EA can close a position to avoid having trades remain open for too long.-
Optionally respects No-Loss logic and minimum profit conditions.
-
14. ChatGPT Pre-Filter (OpenAI Integration)
-
UseChatGPTFilter
-
ChatGPT_Model (e.g. gpt-5.1, gpt-5-mini, gpt-4.1, OSS models)
-
OpenAI_URL, OpenAI_API_Key, ChatGPT_Temperature, ChatGPT_MaxTokens, ChatGPT_TimeoutMS
How it works:
-
Before opening a trade, the EA builds a compact OHLC snapshot (e.g. last 20 candles) including symbol, timeframe, direction and entry price.
-
This data is sent to the OpenAI API.
-
The model responds with exactly one word: “YES” or “NO”:
-
YES → trade is allowed.
-
NO → trade is blocked.
-
-
If there are communication errors, an invalid API key, or unclear answers, the EA uses a fail-open behavior: the trade is not blocked by the filter.
This gives each signal an additional, AI-based quality check. The final decision always remains in the EA code – the AI filter acts as a pre-trade gate.
15. Chart Display & Internal Management
-
The EA automatically ensures the chart is in bar/candle mode and that key lines like bid/ask are visible.
-
Internally, it manages:
-
last traded ticks/bars,
-
time spacing between trades,
-
maximum profit (MFE) in percent and currency,
-
global variables for trailing functions.
-
This helps ensure consistent and traceable trading decisions.
16. Risk Warning & Disclaimer
The stelaraX – HFT AI Expert Advisor is a tool for algorithmic trading. Despite all filters, safeguards and optimization mechanisms, the following applies:
Trading financial instruments – especially leveraged products such as CFDs, futures or forex – and using Expert Advisors can lead to significant losses, including the total loss of the capital you invest.
-
There is no guarantee of profits, performance, or capital preservation.
-
Past results, backtests or simulations are not a reliable indicator of future results.
-
The user alone is responsible for:
-
choice of broker,
-
account size,
-
leverage,
-
all EA settings and
-
monitoring running trades.
-
stelaraX and its affiliates accept no liability for financial losses or consequential damages arising from the use of this Expert Advisor, incorrect settings, technical issues, market conditions or outages of services (e.g. broker servers, internet, OpenAI API).
