Celestium Night Ai

★ Multi-Timeframe Trend Pullback Strategy (D1 + H4 + H1)
⚡ 1:3 Reward-to-Risk Ratio with Partial Close & Trailing Stop
🏆 Built-in Daily, Weekly & Consecutive Loss Limits
★ Fully Automated — Set and Let It Run

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CelestiumNight Ai is a fully automated Expert Advisor designed exclusively for trading Gold (XAUUSD) on MetaTrader 5. It captures high-probability intraday trend pullbacks by aligning three timeframes before executing a trade, ensuring every entry is backed by the dominant market direction.

Gold has been in a powerful multi-year bull trend. CelestiumNight Ai is engineered to trade WITH this trend — going long in uptrends and only shorting in confirmed downtrends. The result is fewer, higher-quality trades with a strong reward-to-risk profile.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STRATEGY DESCRIPTION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Core Concept — Trend Pullback to Value

Gold does not move in a straight line. After strong directional moves, price pulls back to key moving average zones before continuing. CelestiumNight Ai identifies these pullback zones and enters with the dominant trend — buying dips in uptrends, selling rallies in downtrends.

This approach gives the EA a structural advantage: entries with tight stops near the EMA value zone, and large targets in the direction the market is already moving.

Three-Timeframe Alignment:
• Daily (D1) — Sets the dominant trend direction using EMA 50. All trades must align with the daily bias.
• H4 — Confirms the medium-term trend using EMA 21. Filters out low-probability counter-trend setups.
• H1 — Times the entry. Waits for price to pull back into the EMA 50 zone, with RSI momentum and ADX trend confirmation.

Long Entry Conditions (all must be true):
1. D1 candle close above D1 EMA 50 — daily uptrend confirmed
2. H4 price above H4 EMA 21 — medium-term trend aligned
3. H1 price within 2 ATR of H1 EMA 50 — pullback to value zone
4. RSI between 30-55 and rising over last 3 bars — momentum recovering
5. H1 bullish candle close (body > 40% of range)
6. ADX > 18 — trend is present, not ranging

Short Entry Conditions:
Mirror of the above — all conditions reversed. The EA only enters shorts when D1 is confirmed below EMA 50, H4 below EMA 21, with RSI falling and a bearish H1 candle.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RISK MANAGEMENT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CelestiumNight Ai has a comprehensive multi-layer risk management system built directly into the code. No manual intervention required.

Per-Trade Risk:
• 1% of account balance risked per trade — flat, no exceptions
• Hard lot cap of 0.50 prevents oversizing in any market condition
• Stop loss placed below H1 EMA 50 with a 1.5 ATR buffer — gives Gold breathing room
• Take profit at 3x the stop distance (1:3 risk-to-reward ratio)

Trade Management:
• Partial close: 50% of position closed automatically at 2R profit
• Break-even: Stop loss moves to entry once trade reaches 1.5R
• Trailing stop: Activates after 2R, trails at 1.5 ATR step — lets winners run
• Max hold: Automatically closes after 48 H1 bars (2 days) if still open
• Trend exit: Closes if price crosses back below H1 EMA 50 after minimum 4 bars

Session & Daily Limits:
• Max 2 trades per day — quality over quantity
• Daily loss limit: 2% — EA stops trading for the rest of the day
• Weekly loss limit: 6% — EA pauses until the next weekly cycle
• Consecutive loss pause: Stops after 3 losses in a row, resets next day
• Margin check: Will not open trades if free margin drops below $500 or margin load exceeds 20%
• Spread filter: Skips entries if Gold spread exceeds 35 pips
• Session filter: Only trades between 07:00 and 20:00 UTC

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ALL SETTINGS EXPLAINED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

RISK SETTINGS:
InpRiskPct       | Default: 1.0    | % of account balance to risk per trade. Recommended: 1.0-2.0%
InpMaxLot        | Default: 0.50   | Hard maximum lot size. EA will never exceed this
InpFixedLot      | Default: 0.10   | Fallback lot if dynamic sizing fails
InpUseDynamic    | Default: true   | Enable dynamic lot sizing based on account balance
InpMinMargin     | Default: 500.0  | Minimum free margin ($) required before placing a trade
InpMaxMarginLoad | Default: 20.0   | Maximum margin usage (%) before new trades are blocked
InpDailyLossLimit| Default: 2.0    | Stops trading for the day if daily drawdown hits this %
InpWeeklyLossLimit| Default: 6.0   | Stops trading for the week if weekly drawdown hits this %
InpMaxConsecLoss | Default: 3      | Losses in a row before EA pauses until next day
InpMaxDailyTrades| Default: 2      | Maximum trades allowed per calendar day

INDICATOR SETTINGS:
InpD1EmaPeriod   | Default: 50     | D1 EMA period for daily trend filter
InpH4EmaPeriod   | Default: 21     | H4 EMA period for medium-term trend confirmation
InpH1EmaPeriod   | Default: 50     | H1 EMA period — the value zone for pullback entries
InpRsiPeriod     | Default: 14     | RSI period on H1
InpAtrPeriod     | Default: 14     | ATR period for stop loss and trail distance
InpAdxMin        | Default: 18.0   | Minimum ADX — below this the market is ranging, skipped
InpAdxPeriod     | Default: 14     | ADX period on H1

STOP / TARGET SETTINGS:
InpSlAtr         | Default: 1.5    | Stop loss distance in ATR multiples from EMA 50
InpTpRR          | Default: 3.0    | Take profit as multiple of stop distance (1:3 RR)
InpTrailAtr      | Default: 1.5    | Trailing stop step in ATR multiples
InpBEatR         | Default: 1.5    | Break-even trigger at 1.5R profit
InpPartial       | Default: true   | Enable partial close at 2R
InpPartialR      | Default: 2.0    | R-multiple at which 50% of position is closed

SESSION SETTINGS:
InpSessStart     | Default: 7      | UTC hour EA starts looking for trades (07:00 UTC)
InpSessEnd       | Default: 20     | UTC hour EA stops looking for trades (20:00 UTC)
InpMaxSpread     | Default: 350.0  | Maximum spread in points (350 = 35 pips for Gold)
InpCooldown      | Default: 2      | H1 bars to wait after closing before entering again
InpMaxHold       | Default: 48     | Maximum bars a trade can be held (48 H1 = 2 days)
InpMinHold       | Default: 4      | Minimum bars before trend-based exit can trigger

DIRECTION SETTINGS:
InpLongs         | Default: true   | Enable long (buy) trades
InpShorts        | Default: true   | Enable short (sell) trades
InpDebug         | Default: true   | Print signals to MT5 log. Set false on live accounts
InpMagicNumber   | Default: 210001 | Unique ID for this EA's trades

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RECOMMENDED SETUP GUIDE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Step 1 — Broker & Account
Recommended brokers:
• IC Markets  — Raw Spread account  — Gold spread 0.1-0.3 pips  ✅ MT5
• Pepperstone — Razor account       — Gold spread 0.1-0.3 pips  ✅ MT5
• XM          — Ultra Low account   — Gold spread 0.3-0.6 pips  ✅ MT5

Account type: Hedging (recommended)
Minimum deposit: $1,000 — Recommended: $3,000+
Leverage: 1:100 

Step 2 — Installation
1. Open MetaTrader 5 and go to File > Open Data Folder
2. Copy CelestiumNightAi.ex5 into the MQL5 > Experts folder
3. Restart MT5 and open the XAUUSD H1 chart
4. Drag the EA from the Navigator panel onto the chart
5. In settings, enable Allow Algo Trading
6. Click OK — the EA smiley face icon confirms it is running

Step 3 — Recommended Live Settings
• InpRiskPct: 1.0 — Start at 1%. Increase only after 3+ months of live profitability
• InpUseDynamic: true — Always use dynamic sizing
• InpMaxLot: 0.50 — Keep unless account is over $50,000
• InpDebug: false — Turn off in live trading to keep logs clean
• InpSessStart/End: 7/20 — Covers London and New York sessions. Do not change

Step 4 — VPS Recommendation
Run CelestiumNight Ai on a VPS near your broker's server for uninterrupted 24/5 operation. Most brokers offer a free VPS for accounts meeting minimum balance requirements.

Step 5 — What to Monitor
• Check weekly performance vs the 6% weekly loss limit
• Do not interfere with open trades — the EA manages exits automatically
• Review the MT5 Journal tab for trade signals
• Do not run other EAs on the same XAUUSD chart with magic number 210001

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
QUICK SPECIFICATION SUMMARY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Platform:              MetaTrader 5 (MT5)
Asset:                 XAUUSD (Gold)
Entry Timeframe:       H1 (1 Hour)
Trend Filters:         H4 EMA 21 + D1 EMA 50
Account Type:          Hedging (recommended)
Backtest Period:       January 2020 – April 2026 (99% tick quality)
Total Return:          +441% on $10,000 starting balance
Profit Factor:         1.48
Sharpe Ratio:          3.05
Win Rate:              32.58% (break-even at 25% with 1:3 RR)
Max Equity Drawdown:   27.59%
Risk Per Trade:        1% of account balance
Reward : Risk:         1 : 3
Partial Close:         50% at 2R profit
Break-Even:            1.5R
Trailing Stop:         1.5 ATR (activates at 2R)
Max Trades/Day:        2
Daily Loss Limit:      2%
Weekly Loss Limit:     6%
Trading Hours:         07:00 – 20:00 UTC
Max Spread Allowed:    35 pips
Minimum Deposit:       $1,000 (Recommended: $3,000+)
Recommended Brokers:   IC Markets, Pepperstone, XM

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RISK DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Trading foreign exchange and gold carries a high level of risk and may not be suitable for all investors. Past performance, including backtest results, is not indicative of future results. The 27.59% maximum equity drawdown recorded in backtesting represents real risk and should be carefully considered before deploying on a live account. You should never trade with money you cannot afford to lose. CelestiumNight Ai is a tool to assist trading — it does not guarantee profits. Always test on a demo account before deploying on a live account.

Filtrele:
Değerlendirme yok
Değerlendirmeye yanıt