AtlasFX TrendGuard 1.00 - validation record
Date: 2026-09-05

RELEASE STATUS
Research release. Source compiled and independently reviewed. No MT5 Strategy
Tester run, historical profitability backtest, demo forward test or live execution
was performed. Compiler success and formula checks do not establish profitable,
safe or broker-compatible operation. Demo testing is required before considering
real-money use. EnableLiveTrading defaults to false.

ACTUAL COMPILATION
Tool: installed MetaEditor64, version 5.0.0.5370.
Target: X64 Regular; MQL5 Standard Library CTrade.
Final compiler result: 0 errors, 0 warnings, 478 msec elapsed.
Compilation created AtlasFX_TrendGuard.ex5 beside the source.
No terminal trading session or trading request was started for compilation.

SHA-256 of the final compiled pair:
AtlasFX_TrendGuard.mq5
D5F2F6FFEFB98FAC65B6B05D4C231B50EE8DDD31FC9949C79D0353DDCDFC869E
AtlasFX_TrendGuard.ex5
4CA9FC8623C76A0C9ECF8BA14032A06D80E64A13A344DC36BFBE450F09C091D7

MATHEMATICAL REFERENCE CHECKS
tests/numeric_checks.ps1 and tests/numeric_results.json:
10,001 scenarios, 70,001 assertions, PASS; deterministic seed 260905.
Checks: buy/sell SL direction, broker minimum stop distance, price tick grids,
floored lot sizing, maximum volume, risk budget and unaffordable minimum volume.
Coverage includes tick sizes 0.00001, 0.00005, 0.001, 0.005 and lot steps
0.01, 0.1, 0.25, 1.0.

An independent reviewer also ran 26 PASS decision/formula reference fixtures:
closed/current-bar exclusion, oldest channel endpoint, equal-price exclusion,
EMA/ADX boundaries, original-R trailing eligibility, monotone buy/sell stops,
daily threshold, recovery latch and nonpositive equity.

These PowerShell scripts exercise standalone mathematical/reference models.
They do not call or execute the .mq5/.ex5 file and are not MQL5 unit tests,
broker integration tests, simulations of trading performance or backtests.
Run the supplied .ps1 scripts with PowerShell to reproduce their results.

INDEPENDENT SOURCE REVIEW
No remaining blocking findings at final review. Review covered closed-bar
indexing; quote/time revalidation; lot/stop normalization; live-account gate;
synchronous trade results and no signal retries; mixed netting ownership;
original risk reconstruction after partial fills/restarts; existing/new stop
freeze levels; persisted daily latch; and duplicate-symbol lock behavior.

Important findings fixed before the final compilation:
- Refresh quotes after data reads and skip entry if quotes, time or equity
  change during final preflight.
- Make duplicate-symbol instance lock independent of magic number.
- Latch invalid partial prior state even when the account is flat.
- Latch finite nonpositive equity against an existing valid daily baseline.
- Recalculate original risk from original order SL and actual average fill,
  including late partial fills.

LIMITS TO VERIFY IN MT5/DEMO
Broker symbol aliases and contract specifications, spread/commission/swap,
server timezone/DST, execution/slippage/gaps, minimum stops/freeze behavior,
partial fills/requotes, history availability, restart/reconnect, daily rollover,
external deposits/withdrawals, hedging/netting, margin rules and missing state.

The daily brake blocks new entries only. It does not liquidate positions or
guarantee a maximum loss. It uses whole-account equity from the first observed
tick of each server day; deposits, withdrawals and other trading affect it.
It cannot reconstruct an unobserved midnight baseline or detect intratick/offline
equity excursions. The state is terminal-local and account/server/magic-scoped.
Use one terminal installation for an account, one AtlasFX instance per symbol,
and a consistent magic/risk setup across symbols; external EAs can still race
with this EA. No portfolio-wide aggregate open-risk or news-event filter exists.

Sizing estimates price-to-SL loss only; commission, swap and execution losses
are excluded. SL execution, actual fill price and fills during gaps can make
realized loss exceed the estimate. The per-symbol lock does not coordinate with
other software or another terminal. Missing ownership/history prevents trailing.
On real accounts with EnableLiveTrading=false, all EA trade actions including
trailing are disabled; existing broker-side SL/TP orders remain broker-managed.

PRIMARY TECHNICAL REFERENCES
OrderCalcProfit (account-currency profit estimate):
https://www.mql5.com/en/docs/trading/ordercalcprofit
OrderCalcMargin:
https://www.mql5.com/en/docs/trading/ordercalcmargin
Symbol properties (tick/volume/stops/freeze):
https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants
CTrade PositionModify and result-code requirement:
https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade/ctradepositionmodify
HistorySelectByPosition:
https://www.mql5.com/en/docs/trading/historyselectbyposition
Order properties (ORDER_SL):
https://www.mql5.com/en/docs/constants/tradingconstants/orderproperties
FileOpen and file sharing flags:
https://www.mql5.com/en/docs/files/fileopen
Terminal global variables:
https://www.mql5.com/en/docs/globals/globalvariableset
