让策略按你的想法生长。
源码在手,你的想法就能超越参数面板。
无需另装依赖
在 MetaEditor 中打开源码,即可开始开发。项目采用独立代码或 MT5 已自带的标准库。
个人使用不限次数
自由学习、定制并用于自己的交易账户。源码在手,让你的想法能够持续改进。
一次购买,不按激活或使用次数收费
每个源码项目只需购买一次。MQLume 不按激活次数或使用次数额外收费。
Vibe coding,让交易经验成为创造力。
把想法告诉 AI 编程助手,以可编辑的 MQL5 项目为起点,由你掌握每一次修改的方向。
说出你的想法
试着提出交易时段过滤、更清晰的日志或新的风险规则。
审阅并编译
读懂 AI 提议的代码,核对逻辑,再用 MetaEditor 编译。
验证你的版本
对比回测结果,再经过模拟盘测试,最后决定是否实盘使用。
可使用你选择的 AI 工具;商品不包含 AI 订阅。请审阅生成代码并保护源码隐私。更好的工具帮助你完善流程,但不保证交易盈利。
交易配置
交易规格
让你的黄金交易想法从这里开始。免费获取完整可编辑的 MoonDog MT5 源码:九个策略模块、本地 ONNX 过滤与灵活的交易管理,集成于一个独立文件。
以上为市场页面公布的规格,不保证适合你的资金状况或带来收益。
- 品种
- XAUUSD
- 图表周期
- 任意图表时间框架 · 策略使用各自内部周期
- 账户
- 对冲账户
- VPS
- 建议用于持续运行
打开源码,看看里面
浏览项目中的 50 行真实 MQL5 源码,在编辑器内向下滚动以继续探索。
double MDFindPivot(const MDStrategyConfig &config,const bool buy, const double bid,const double ask,const double pipSize,const int digits, const MqlRates &bars[],const double &pendingPrices[]){ int required=config.searchDepth+2+config.olderBars; if(required<1 || ArraySize(bars)<required || !ArrayGetAsSeries(bars)) return 0.0; for(int shift=config.newerBars+1;shift<=config.searchDepth;shift++) { double pivot=buy ? bars[shift].high : bars[shift].low; if(buy ? pivot<=ask+config.minPivotDistance*pipSize : pivot>=bid-config.minPivotDistance*pipSize) continue; bool extreme=true; for(int k=shift-config.newerBars;k<=shift+config.olderBars;k++) if(buy ? bars[k].high>pivot : bars[k].low<pivot) { extreme=false; break; } if(!extreme) continue; for(int k=0;k<shift;k++) if(buy ? bars[k].high>pivot : bars[k].low<pivot) { extreme=false; break; } if(!extreme) continue; double entry=NormalizeDouble(pivot+(buy ? config.buyOffset : -config.sellOffset)*pipSize,digits); if(MDHasNearbyPending(entry,config.pendingSpacing*pipSize,pendingPrices)) continue; return NormalizeDouble(pivot,digits); } return 0.0;}bool MDPassPendingPlacementGates(const MDStrategyConfig &config,const bool buy, const double pivot,const double entry,const double pipSize, const double &pendingPrices[]){ if(MDHasNearbyPending(entry,config.pendingSpacing*pipSize,pendingPrices)) return false; int count=ArraySize(pendingPrices); if(count==config.pendingLimit && count>0) { double extreme=pendingPrices[0]; for(int i=1;i<count;i++) extreme=buy ? MathMin(extreme,pendingPrices[i]) : MathMax(extreme,pendingPrices[i]); if(buy ? extreme<pivot : pivot<extreme) return false; } for(int i=0;i<count;i++) if(buy ? pendingPrices[i]<=entry : entry<=pendingPrices[i]) return false; return true;}void MDResolvePendingExpiration(const MDStrategyConfig &config,const datetime now, const long supportedModes,const bool weekendShield, const datetime nextWeekendCutoff, const bool forcedMode,const ENUM_ORDER_TYPE_TIME cachedMode, ENUM_ORDER_TYPE_TIME &type,datetime &expiration){ type=ORDER_TIME_GTC;产品介绍
把这款 EA,变成你的 EA。
读懂逻辑,定制你的策略。MoonDog 集合突破入场、MoonLock 利润保护、固定或百分比仓位、交易时段和新闻控制。可以从默认五个策略开始,探索另外四个可选模块,也可以配合 AI 编程助手实现并测试自己的改动。两个 ONNX 模型和面板图片均已嵌入,无需另行下载模型或订阅 API。
专为 MetaTrader 5 打造。完整源码、清晰的参数和实用文档,让你掌握下一次开发的主动权。
编译后,先回测,再模拟盘。
购买源码并编译后,请务必在策略测试器中回测检查,并经过模拟盘测试,再自行决定是否进行真实交易。测试通过不代表实盘收益保证。
项目规格
- 平台
- MetaTrader 5 / MQL5,不兼容 MT4
- 版本
- 4.21
- 依赖
- 一个独立的 MQ5 文件,在 MetaEditor 中打开即可编译。
- 输入参数
- 123 项可配置参数,配有完整参数指南
- 编译与测试
- 使用 MT5 MetaEditor 编译;交付构建及测试记录见 RELEASE_NOTES.txt。
你的下一次创造,从这里开始。
交付清单
完整源码、实用文档与参考文件,帮助你理解、定制并测试自己的 EA。
一个项目。
完整交付。
100% 源码指本商品可编辑实现完整交付,并非只交付 EX5,亦不以隐藏策略模块代替源代码。
版本 4.21 · 个人使用许可- MQ5包含
MoonDog EA MT5 4.21[MQLume].mq5
完整、可编辑的单文件源码。阅读逻辑、自由定制,并编译自己的 EA。
- EX5包含
MoonDog EA MT5 4.21[MQLume].ex5
与源码配套的编译版 EA;修改 MQ5 后请重新编译。
- TXT包含
README.txt
简明的网站介绍、安装与编译指南,以及使用许可和客服信息。
- PDF包含
PARAMETERS.pdf
PARAMETERS.pdf 说明全部 123 项参数、默认值与实用设置。压缩包包含 MQ5、EX5、README.txt、PARAMETERS.pdf、RELEASE_NOTES.txt,不含 SET 预设。
- TXT包含
RELEASE_NOTES.txt
本交付包的构建信息、已有测试条件、改动和已知限制。
测试与验证
用测试,把想法一步步做扎实。
探索、定制并测试你的 EA,了解它在不同市场环境下的表现。从交付指南入手,逐步建立适合自己参数设置的测试流程。
编译,开始探索
在 MetaEditor 中打开源码并编译,从默认参数开始探索。随附指南介绍安装与参数,帮助你着手定制自己的 EA。
跨越市场周期进行测试
建议在数据可用的情况下,使用过去 10 年的真实 Tick 历史数据进行回测,再通过模拟盘测试,全面评估自己的参数设置。
实盘前检查
请先对自己的参数进行回测,再通过模拟盘测试,最后决定是否实盘交易。过往结果不代表未来表现。
版本 v4.21 · 123
参数说明
下方为交付源码的初始参数,修改后请先检查并测试。
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
00 | QUICK SETUP: CHANGE ONLY THIS
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
SET 1 Default / SET 2 Adaptive / SET 3 All 9 / SET 4 All 9 AdapMoonQuickSetup | MDSetup_Default |
IMPORTANT | CHECK SET AGAIN AFTER EVERY EA UPDATE
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Recommended set link [check after every update]RecommendedSetLink | 显示文字 |
01 | CHOOSE TRADING MODE
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
AI profile: Conservative [default] / More Trades / Without ONNXAiTradingMode | MDAi_Conservative |
02 | LOT SIZE & RISK
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Sizing: AUTO=BT 2% / live fixed; select another mode to overridMoonSizing | MDSizing_Auto |
Fixed lot [FIXED mode, or AUTO on live/demo charts]MoonFixedLot | 0.01 |
Risk per trade [%; CUSTOM RISK mode only]MoonCustomRiskPercent | 2.0 |
Maximum lot for % risk [0 = no cap]MaximumRiskLot | 0.0 |
Adaptive sizing [manual % risk + ONNX; not AUTO, Growth or fixeAdaptivePositionSize | MDAdaptive_Normal |
03 | STOP LOSS & PROFIT PROTECTION
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Initial stop loss [gold pips; new orders]MoonStopLossPips | 20.0 |
How to protect open-trade profitMoonProtectionMode | MDProtection_VirtualOnly |
Remember virtual protection after restartPersistVirtualTrailing | true |
Enable MoonLock profit protectionMoonLockEnabled | true |
Start MoonLock at profit per 0.01 lot [account money]MoonLockStartPer001 | 1.0 |
Choose Classic / Gradual, with or without Spike ShieldMoonLockProfile | MDLock_ClassicShield |
Classic profiles: share of peak profit to protect [%; default 5MoonLockPercent | 50.0 |
04 | CUSTOM BE & TRAILING [MOONLOCK OFF]
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Use my BE and trailing when MoonLock is OFFUseCustomBreakEvenTrailing | false |
Move to BE after this profit [gold pips]CustomBreakEvenStartPips | 10.0 |
At BE, protect this many profit pipsCustomBreakEvenLockPips | 1.0 |
Start trailing after this profit [gold pips]CustomTrailingStartPips | 20.0 |
Keep trailing this far behind price [gold pips]CustomTrailingDistancePips | 10.0 |
Move trailing only after this further improvement [gold pips]CustomTrailingStepPips | 2.0 |
05 | TAKE PROFIT TARGETS
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Moon Apex take profit [gold pips]MoonApexTargetPips | 140.0 |
Other four modules: take profit [gold pips]MoonCoreTargetPips | 150.0 |
06 | INDIVIDUAL STRATEGIES [ADVANCED CUSTOM ONLY]
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Enable Moon NovaMoonNova | true |
Enable Moon ApexMoonApex | true |
Enable Moon ZenithMoonZenith | true |
Enable Moon PulseMoonPulse | true |
Enable Moon EclipseMoonEclipse | true |
06B | ADVANCED CUSTOM ONLY
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Only when QUICK SETUP = Advanced CustomUsePerModuleTunedExits | true |
Moon Orbit add-on [M30 pivots; OFF = default]MoonAddOnA | false |
Moon Halo add-on [H1 wide pivots; OFF = default]MoonAddOnB | false |
Moon Titan add-on [H4 pivots; OFF = default]MoonAddOnC | false |
Moon Comet add-on [H1 fast pivots; OFF = default]MoonAddOnD | false |
Add-ons ON: max open positions in one direction, all modules [0MaxSameDirectionPositions | 8 |
Allow entries on NETTING accounts [V4.19 is validated on hedginAllowNettingAccount | false |
07 | MAGIC NUMBERS & EXISTING TRADES
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
MoonDog magic number [unique for each EA chart]MoonTradeIdentity | 33300 |
Manage previous magic number [0 = off]PreviousMoonTradeIdentityBase | 0 |
Manage older-format magic number [0 = off]PreviousMoonDogTradeIdentity | 0 |
08 | DAILY ENTRY HOURS
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Allow new entries only within set hoursUseTradingHours | false |
Entry start hour [broker time, 0-23]TradingStartHour | 2 |
Entry start minute [0-59]TradingStartMinute | 0 |
Entry end hour [broker time, 0-23]TradingEndHour | 19 |
Entry end minute [0-59]TradingEndMinute | 0 |
Delete pending orders outside entry hoursDeletePendingOutsideHours | false |
09 | WEEKEND ENTRY PAUSE
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Pause entries and remove pending for the weekendWeekendShieldEnabled | true |
Weekend times: automatic / customWeekendScheduleMode | MDWeekend_Automatic |
AUTO: pause minutes before Friday closeWeekendFridayCutoffMinutes | 240 |
AUTO: wait minutes after weekly reopeningWeekendReopenDelayMinutes | 240 |
AUTO fallback: Friday pause hour [broker time]WeekendFallbackFridayHour | 20 |
AUTO fallback: Monday resume hour [broker time]WeekendFallbackMondayHour | 5 |
CUSTOM: Friday pause hour [broker time]WeekendCustomFridayHour | 20 |
CUSTOM: Friday pause minuteWeekendCustomFridayMinute | 0 |
CUSTOM: Monday resume hour [broker time]WeekendCustomMondayHour | 5 |
CUSTOM: Monday resume minuteWeekendCustomMondayMinute | 0 |
10 | NFP, CPI & FOMC NEWS
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
News currency [USD for gold; both news filters]NewsCurrency | "USD" |
Enable separate NFP, CPI and FOMC protectionUseMajorEventControl | true |
Allow trading during NFP [false = pause]TradeDuringNFP | false |
NFP: pause minutes before releaseNFPMinutesBefore | 30 |
NFP: wait minutes after releaseNFPMinutesAfter | 60 |
Allow trading during CPI [false = pause]TradeDuringCPI | false |
CPI: pause minutes before releaseCPIMinutesBefore | 30 |
CPI: wait minutes after releaseCPIMinutesAfter | 60 |
Allow trading during FOMC [false = pause]TradeDuringFOMC | false |
FOMC: pause minutes before releaseFOMCMinutesBefore | 60 |
FOMC: wait minutes after releaseFOMCMinutesAfter | 150 |
11 | OTHER NEWS & CALENDAR SAFETY
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Enable the general economic-news filterMoonCalendarShieldEnabled | false |
General filter: block high-impact newsFilterHighImpactNews | true |
General filter: also block medium-impact newsFilterModerateImpactNews | false |
General filter: pause minutes before newsNewsMinutesBefore | 60 |
General filter: wait minutes after newsNewsMinutesAfter | 30 |
Both news filters: delete pending during pauseDeletePendingBeforeNews | true |
Calendar unavailable: pause NEW entries [pending orders stay unNewsFailClosed | false |
Also protect verified NFP/CPI/FOMC dates [check expiry in ExperUseBuiltInMajorNewsBackup | true |
12 | OPTIONAL WIDE-SPREAD PROTECTION
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Wide spread: pause entries and remove pendingWideSpreadProtectionEnabled | false |
Spread limit [MoonDog points; 200 = 20 gold pips]WideSpreadMaxPoints | 200.0 |
13 | NORMAL ACCOUNT DAILY LOSS LIMIT
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Enable a daily loss limit for normal accountsNormalDailyLimitEnabled | false |
Daily loss limit [% of day-start equity]NormalMaxDailyLossPercent | 20.0 |
Close MoonDog positions at the daily loss limitNormalDailyClosePositions | true |
Delete MoonDog pending at the daily loss limitNormalDailyDeletePendings | true |
Saved daily-limit profile nameNormalDailyProtectionId | "MAIN" |
14 | PROP FIRM LIMITS
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Enable prop-firm protectionPropFirmActive | false |
Saved challenge profile namePropFirmChallengeId | "MAIN" |
Challenge starting balance [0 = automatic]PropFirmStartingBalance | 0.0 |
Challenge profit target [%]PropFirmProfitTargetPercent | 8.0 |
Firm's maximum daily loss [%]PropFirmMaxDailyLossPercent | 5.0 |
Firm's maximum total drawdown [%]PropFirmMaxTotalDrawdownPercent | 10.0 |
Stop before the firm limit [percentage points]PropFirmSafetyBufferPercent | 0.5 |
Pause new entries at the profit targetPropFirmStopAtProfitTarget | true |
Delete pending at prop loss or profit-target limitsPropFirmDeletePendingsWhenBlocked | true |
Close MoonDog positions at a loss-limit triggerPropFirmClosePositionsOnLimit | true |
Close at profit target [also enable target entry pause]PropFirmClosePositionsAtTarget | false |
15 | PROP FIRM CALCULATIONS
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Total drawdown: fixed / highest balance / equityPropFirmDrawdownMode | MDPropDrawdown_Fixed |
Daily starting reference: balance / equityPropFirmDailyBaseline | MDPropBaseline_Equity |
Daily loss allowance: initial / daily referencePropFirmDailyLossAmount | MDPropDailyAmount_Initial |
Trailing allowance: fixed amount / % of peakPropFirmTrailingAmount | MDPropTrailing_Fixed |
Firm reset hour [broker time, 0-23]PropFirmDailyResetHour | 0 |
Firm reset minute [0-59]PropFirmDailyResetMinute | 0 |
Max positions + pending [0 = strategy limit]PropFirmMaximumExposureSlots | 0 |
16 | AUTOMATIC FIXED-LOT GROWTH
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Grow the fixed lot as the account growsLotScalingEnabled | false |
Growth starting balance [0 = save automatically]LotScalingBaseBalance | 0.0 |
Account growth needed for each lot increaseLotScalingBalanceStep | 500.0 |
Lot added at each growth stepLotScalingLotStep | 0.01 |
Maximum lot from automatic growthLotScalingMaxLot | 0.03 |
Use equity for growth [false = balance]LotScalingUseEquity | false |
Keep the highest reached growth levelLotScalingOnlyUp | false |
Remember the growth level after restartLotScalingPersistState | true |
Saved lot-growth profile nameLotScalingStateId | "MAIN" |
17 | ORDER COMMENTS
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Custom order comment [empty = module name]OrderCommentText | "MoonDog MQLume" |
Add module code to your custom commentAppendModuleToComment | false |
PROP mode only: leave order comments blankPropFirmBlankOrderComment | false |
18 | SLIPPAGE MEASUREMENT
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Measure slippage and enable its panelShowExecutionComparison | true |
Closed trades before an overall ratingExecutionMinimumTrades | 10 |
EXCELLENT: max one-way slippage [gold price]ExecutionExcellentMax | 0.05 |
GOOD: max one-way slippage [gold price]ExecutionGoodMax | 0.15 |
NORMAL: max one-way slippage [gold price]ExecutionNormalMax | 0.35 |
POOR: max one-way slippage [higher = BAD]ExecutionPoorMax | 0.75 |
19 | PANEL & STARTUP IMAGE
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Open full panel on startup [OFF = lightweight; use Show panel]MoonDashboardVisible | false |
Panel size [smaller number = smaller panel]MoonDashboardScale | 1.1 |
Show MoonDog startup imageShowLaunchSplash | true |
Startup image duration [seconds]LaunchSplashSeconds | 3 |
20 | TESTING & LOCAL REVIEW LOG
下列初始值来自交付源码。调整设置前,请阅读随附的参数指南。
| 源码参数键 | 本版初始值 |
|---|---|
Reduce drawing during backtestsFastBacktest | true |
Save local review log [no auto-training]LocalLearningLogEnabled | false |
INTERNAL calendar helper: always leave empty on your trading chCalendarWorkerSession | "" |
交付后的支持
售后包括 Bug 修复。
产品持续维护期间,针对交付原版中可复现、与商品说明不符的问题,提供排查与修复支持。
支持期限:产品持续维护期间交付与编译问题
文件缺失、交付错误,以及声明环境中的原版编译故障。
程序与文档缺陷
请提供版本、参数、日志与复现步骤,以便确认并处理问题。
售后范围
不保证未来盈利。购买和使用本产品需要具备 MQL5 与 MT5 基础知识;因缺少相关知识而无法使用,不属于 Bug 修复范围。
购买的是什么?
你可以阅读、修改和编译交付源码,用于自己的研究及本人交易账户。修改前请保留一份未经改动的交付原版。 未经单独书面授权,不得转售、再分发、公开发布、转授权源码或编译文件,也不得作为白标产品提供。交付源码不代表转让版权或第三方名称的所有权。
发货后的退款政策
源代码是可复制的数字商品。一经发货,不接受改变主意、不再需要等个人原因退款。下单前请核对兼容性、内容与已披露限制。
如何交付和报告 Bug?
填写邮箱、确认授权条款,即可下载免费 EA 源码包,无需付款。
交付与售后
- 1
加入购物车
选择需要的免费 EA 源码包。
- 2
检查订单
确认商品和 US$0 总额。
- 3
填写邮箱
确认授权条款并完成免费订单。
- 4
下载
所有免费商品可一次下载为一个 ZIP,也可分别下载。
探索免费 EA 源码
免费下载,提供真实源码。

MQL4 / MQL5 源码文件为 .mq4 / .mq5;EX4 / EX5 是编译程序。购买 EX4 或 EX5 并不自动包含源码。
仅供学习的示例。使用前请在 MetaEditor 中审阅并编译;这些示例不会下单。