Skilled Advisor Handbook — MQL5 MetaTrader 5
HACKER X AI
Superior Hedging EA · Full Dealer Documentation · v2.0
MT5 Native
MQL5 Supply
All Pairs & Gold
Auto Danger Guard
HACKER X AI is a totally automated Skilled Advisor for MetaTrader 5 constructed round a multi-level hedging technique. When the preliminary commerce strikes towards you, the EA routinely opens a counter-trade (a hedge) in the other way with a bigger lot measurement — permitting it to get better losses and shut the basket in internet revenue when situations align.
It enters the market utilizing an EMA crossover + RSI confluence sign, then manages the place with break-even, trailing cease, and full drawdown safety — all whereas displaying reside statistics on an in-chart dashboard.
02
How It Works — Logic Circulation
1
Sign Scan — EMA Cross + RSI Filter
Each tick, the EA checks if the quick EMA (default 21) has crossed the sluggish EMA (default 50). A bullish cross triggers a BUY sign; a bearish cross triggers a SELL. The RSI filter confirms momentum — it blocks buys if RSI is overbought (>70) and blocks sells if oversold (<30).
2
Preliminary Entry — Hedge Stage #0
A commerce is opened on the base lot measurement (default 0.01). The EA at all times verifies there may be sufficient free margin earlier than coming into utilizing OrderCalcMargin() . A Take Revenue is about. No Cease Loss on the preliminary commerce — the hedge manages danger as a substitute.
3
Place Monitoring
The EA watches the open place each tick. If worth strikes in your favour, Break-Even and Trailing Cease kick in to guard revenue. If worth strikes towards you past the set off distance, a hedge is triggered.
4
Hedge Set off — Counter-Commerce Opened
When the place is shedding and worth has moved InpTriggerPoints towards you, a counter-trade is opened in the other way. The hedge lot is the earlier lot × the multiplier (default 1.5×). This repeats as much as 4 ranges. The EA checks margin earlier than every hedge — if margin is inadequate, it halves the lot till it suits.
5
Place Administration — BE + Trailing
All worthwhile positions have trailing stops utilized. Break-even is moved as soon as a place reaches the break-even offset in revenue. SL/TP values at all times respect the dealer’s minimal cease degree ( SYMBOL_TRADE_STOPS_LEVEL ) to keep away from invalid cease errors.
6
Basket Closure — Take Revenue
Every hedge has its personal TP. When TPs are hit, the mixed basket closes in internet revenue. The EA halts for the day if the every day revenue goal is reached. Max drawdown guard closes every part and halts if fairness drops too far.
Instance utilizing default settings (InpLotSize=0.01, InpLotMultiplier=1.5, InpTriggerPoints=50) on a typical pair:
#0 BUY 0.01 #1 SELL 0.02 #2 BUY 0.03 #3 SELL 0.05 TP -50pts -50pts -50pts Entry Worth
| Stage | Path | Lot Dimension | Set off | Objective |
|---|---|---|---|---|
| #0 Preliminary | BUY (sign) | 0.01 | EMA cross + RSI | Unique commerce, follows the development sign |
| #1 Hedge | SELL (counter) | 0.02 (×1.5) | −50 factors loss | First counter-trade, covers preliminary loss |
| #2 Hedge | BUY (counter) | 0.03 (×1.5) | −50 factors additional | Second restoration layer |
| #3 Hedge | SELL (counter) | 0.05 (×1.5) | −50 factors additional | Third restoration layer |
| #4 Hedge (max) | BUY (counter) | 0.07 (×1.5) | −50 factors additional | Remaining restoration — no extra hedges after this |
On devices like XAUUSD (Gold), even a 0.01 lot wants important margin. The EA routinely checks OrderCalcMargin() and can scale back the hedge lot if margin is inadequate — it is going to by no means ship a commerce it might probably’t afford.
04
Enter Parameters — Full Reference
| Parameter | Default | Description |
|---|---|---|
| Core Settings | ||
| InpLotSize | 0.01 | Beginning lot for the preliminary commerce. Maintain small on high-margin pairs like XAUUSD. |
| InpLotMultiplier | 1.5 | Every hedge multiplies the earlier lot by this worth. 1.5 is balanced; going above 2.0 will increase restoration pace however blows margin sooner. |
| InpMaxHedges | 4 | Most variety of hedge ranges. After this, no extra hedges are positioned. Really useful: 3–5. |
| InpTriggerPoints | 50 | What number of factors worth should transfer towards a shedding commerce earlier than triggering the following hedge. Greater = wider gaps = decrease hedge frequency. |
| InpTakeProfit | 80 | Take Revenue in factors for the preliminary commerce. Hedges use 50% of this worth. |
| Pattern Filter | ||
| InpMA_Fast | 21 | Quick EMA interval. Shorter = extra indicators (extra trades, extra noise). Strive 10–21 for scalping. |
| InpMA_Slow | 50 | Sluggish EMA interval. Bigger = stronger development filter. Strive 50–200 for swing buying and selling. |
| InpRSI_Period | 14 | RSI lookback. 14 is normal. Decrease = extra reactive, increased = smoother. |
| InpRSI_OB / InpRSI_OS | 70 / 30 | Overbought / Oversold thresholds. Tighten to 65/35 for fewer however higher-quality entries. |
| Danger Administration | ||
| InpMaxDrawdown | 5.0% | Most allowed fairness drawdown. If hit, all positions shut and buying and selling halts for the day. Set between 3–10% relying in your danger tolerance. |
| InpDailyProfitTarget | 2.0% | When every day stability revenue reaches this %, the EA closes all trades and stops for the day. Prevents overtrading after day. |
| InpUseBreakEven | true | Strikes SL to close entry as soon as the commerce is worthwhile by InpBreakEven factors. Really useful: at all times ON. |
| InpBreakEven | 20 | Factors of revenue required earlier than break-even triggers. Should be above dealer’s STOPS_LEVEL. |
| InpUseTrailing | true | Prompts trailing cease on worthwhile positions. Really useful: ON. |
| InpTrailingStart | 40 | Revenue in factors earlier than trailing cease prompts. |
| InpTrailingStep | 10 | How tightly the trailing cease follows worth. Smaller = tighter trailing. |
05
Reside Dashboard — Studying the Stats
The dashboard renders straight in your MT5 chart. This is what every panel reveals:
⚡ HACKER X AI | HEDGING EA
BALANCE10,250.00 USD
EQUITY10,183.40 USD
OPEN P&L-66.60
MAX DD1.24%
Win / Loss
34 W16 L68.0%
Commerce Stats
TOTAL TRADES50
GROSS PROFIT842.30
GROSS LOSS291.10
PROFIT FACTOR2.89
LARGEST WIN48.20
LARGEST LOSS32.10
CONSEC WINS7
CONSEC LOSS3
Hedge Standing
OPEN POSITIONS2
HEDGE LEVEL1 / 4
STATUS● ACTIVE
08:14:33v2.0 | MQL5
Win Charge Bar
Inexperienced
≥55% win price
Win Charge Bar
Yellow
40–54% win price
Win Charge Bar
Pink
<40% win price
Standing Badge
● Lively
EA buying and selling usually
Standing Badge
■ Halted
DD or goal hit
Revenue Issue
>1.5
Wholesome efficiency
1
Open MetaEditor
In MT5, press F4 or go to Instruments → MetaQuotes Language Editor.
2
Create the File
File → New → Skilled Advisor (template). Identify it HACKER X AI . Delete the template code and paste the complete EA supply code.
3
Compile
Press F7 to compile. You must see 0 errors, 0 warnings within the Toolbox. If warnings seem, examine your dealer’s image title and lot constraints.
4
Connect to Chart
In MT5 Navigator panel (Ctrl+N), discover HACKER X AI beneath Skilled Advisors. Drag and drop onto your required chart (e.g. EURUSD M15).
5
Allow Auto Buying and selling
Click on the Auto Buying and selling button within the MT5 toolbar (turns inexperienced when lively). Additionally allow “Permit algorithmic buying and selling” within the EA’s properties → Widespread tab.
6
Set Inputs and Go
Within the EA properties → Inputs tab, configure your lot measurement, danger settings, and different parameters. Click on OK. The dashboard will seem on the chart.
Run HACKER X AI on a demo account or in Technique Tester for no less than 2–4 weeks earlier than going reside. Each dealer has totally different spreads, cease ranges, and margin necessities that have an effect on efficiency.
07
Really useful Settings by Use Case
Conservative — Low Danger
LotSize: 0.01
Multiplier: 1.3
MaxHedges: 3
TriggerPts: 80
MaxDD: 3%
DailyTarget: 1%
Timeframe: H1 / H4
Balanced — Really useful ✓
LotSize: 0.01
Multiplier: 1.5
MaxHedges: 4
TriggerPts: 50
MaxDD: 5%
DailyTarget: 2%
Timeframe: M15 / M30
Aggressive — Greater Danger
LotSize: 0.05
Multiplier: 2.0
MaxHedges: 5
TriggerPts: 30
MaxDD: 8%
DailyTarget: 4%
Timeframe: M5 / M15
Gold strikes in bigger level ranges. Set TriggerPoints to 150–300, TakeProfit to 200+, and hold LotSize at 0.01 or decrease. Gold requires increased margin per lot — at all times examine your dealer’s margin necessities first.
A wholesome EA ought to have a Revenue Issue above 1.5 in backtesting. If yours is under 1.2, tighten the RSI filter (65/35) or enhance TriggerPoints to cut back hedge frequency.
Q: Why is the EA displaying “Invalid stops”?
Your dealer’s minimal cease degree (STOPS_LEVEL) is bigger than the SL/TP distance. Improve InpBreakEven and InpTrailingStart values till they exceed your dealer’s cease degree. The EA auto-detects this by way of SYMBOL_TRADE_STOPS_LEVEL however your enter values additionally should be above it.
Q: “Not sufficient cash” error on XAUUSD?
Gold requires excessive margin. The EA auto-reduces hedge heaps if inadequate margin is detected. If it nonetheless errors, scale back InpLotSize to 0.01 and InpLotMultiplier to 1.2, or enhance your account stability.
Q: The EA says “HALTED” — what occurred?
Both the every day revenue goal was hit (good!) or the max drawdown restrict was reached. The EA resets routinely the following buying and selling day at midnight server time.
Q: Can I exploit this on a number of pairs directly?
Sure. Connect HACKER X AI to totally different charts with totally different symbols. Every occasion tracks its personal positions by way of the Magic Quantity and image filter.
Q: What timeframe ought to I exploit?
M15 or M30 is the candy spot for many pairs — sufficient sign high quality with out extreme noise. H1 works nicely for conservative merchants. Keep away from M1/M5 on reside accounts till backtested completely.
Danger Disclaimer
Foreign exchange and CFD buying and selling includes important danger of loss and isn’t appropriate for all traders. Previous efficiency will not be indicative of future outcomes. HACKER X AI is an automatic buying and selling instrument — it can’t assure earnings and might maintain losses. All the time check on a demo account earlier than reside deployment. By no means commerce with cash you can’t afford to lose.
HACKER X AI · v2.0 · MQL5 METATRADER 5 · ALL RIGHTS RESERVED