
Gold
A focused improvement
For a specific change to an existing project.
Quoted per project
Discuss this tier · GoldWith the source in your hands, your ideas can go further than the settings panel.
Open your source in MetaEditor and start building. Projects use self-contained code or the standard libraries already included with MT5.
Study, customise and trade on your own accounts. Your EA source gives you the freedom to keep refining your ideas.
One purchase per source project. MQLume does not charge by the number of activations or uses.
Bring your ideas to an AI coding assistant. Use the editable MQL5 project as your starting point, and stay in control of every change.
Ask for a session filter, clearer logging or a different risk rule.
Read the proposed code, check the logic and compile it in MetaEditor.
Compare backtests, then test on a demo account before considering live use.
Use an AI tool of your choice; no AI subscription is included. Review generated code and keep your source private. Better tools support your process, but do not guarantee trading profits.
Overview
Editable English MQ5, matching EX5 and installation/parameter guides. The file list below shows the exact included resources.
Built for MetaTrader 5. A complete source project, clear inputs and practical documentation give you control over your next build.
Trading setup
Trend-based entries with optional grid additions, side controls and virtual exits.
Read the supplied parameter guide for units and interactions before changing these initial values.
Explore 50 lines of the project's MQL5 source. Scroll inside the editor to discover more.
int OnInit() { allowNewCycle=NewCycle_; allowBuy=Flag_Trade_Buy_; allowSell=Flag_Trade_Sell_; autoLot=Autolot_ && Autolotsize_!=0; initialLot=MathMax(Lot_Init_,SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN)); maxLot=MaxLot_; if(maxLot<SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN) || maxLot>SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX)) maxLot=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX); lotMultiplier=Martin_<0?1:Martin_; tpPoints=TP_<0?100:TP_; slPoints=SL_<0?2000:SL_; trailStart=iTS<0?400:iTS; trailDistance=iTD; if(trailStart!=0 && (trailDistance<1 || trailDistance>=trailStart)) trailDistance=200; volumeDigits=(int)MathRound(MathAbs(MathLog(SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP))/MathLog(10.0))); long modes=SymbolInfoInteger(_Symbol,SYMBOL_FILLING_MODE); filling=(modes&SYMBOL_FILLING_FOK)!=0?ORDER_FILLING_FOK:((modes&SYMBOL_FILLING_IOC)!=0?ORDER_FILLING_IOC:ORDER_FILLING_RETURN); TesterHideIndicators(true); trendHandle=iRSI(_Symbol,TF_DB,50,PRICE_CLOSE); stochasticHandle=iStochastic(_Symbol,TF_Stoh,KPeriod,DPeriod,Slowing,MODE_LWMA,STO_CLOSECLOSE); TesterHideIndicators(false); if(trendHandle==INVALID_HANDLE || stochasticHandle==INVALID_HANDLE) return INIT_FAILED; objectPrefix="MQLumeBD_"+IntegerToString(ChartID())+"_"; LoadPanelState(); RefreshQuote(); CreatePanel(); InitializeNewsCurrencies(); if(Flag_Use_News && !MQLInfoInteger(MQL_TESTER) && !MQLInfoInteger(MQL_OPTIMIZATION)) LoadNews(); return INIT_SUCCEEDED;}void OnTick() { if(!UpdateNewsGate()) return; if(!MQLInfoInteger(MQL_TRADE_ALLOWED) || !TerminalInfoInteger(TERMINAL_TRADE_ALLOWED) || !AccountInfoInteger(ACCOUNT_TRADE_ALLOWED) || SymbolInfoInteger(_Symbol,SYMBOL_TRADE_MODE)==SYMBOL_TRADE_MODE_DISABLED) return; if(pendingCloseSide>=0) { ProcessPendingClose(); return; } UpdateSignals(); RefreshQuote(); // Overlap uses prior counts but fresh endpoints, before signal/trailing mutation. ProcessOverlap(); RefreshQuote(); RefreshBaskets(); TryEntries(); ApplyVirtualExits(); ApplyBrokerStops(); RefreshBaskets(); UpdatePanel();}Your next build starts here.
Complete source, practical documentation and reference files to help you understand, customise and test your EA.
100% source code means the editable implementation of this product is supplied in full. It is not an EX5-only delivery or a hidden strategy module.
Version 13.0 · Personal-use licenceThe compiled EA accompanying the source. Recompile after editing the MQ5.
Complete, editable single-file source. Read the logic, customise it and compile your own EA.
Read the supplied parameter guide for units and interactions before changing these initial values.
A concise welcome, installation and compilation guide, with licence terms and support details.
Testing
Trend-based entries with optional grid additions, side controls and virtual exits.
Version v13.0 · 68
Initial settings from the delivered source. Review and test changes before using them.
Initial values shown below come from the included source. Review the parameter guide before changing settings. Outgoing EA order comments use @MQLume and retain required strategy identifiers. Comment inputs remain for saved-setting compatibility and do not remove the execution label.
Read PARAMETERS.pdf alongside README.txt for the meaning, defaults and operating notes behind the short input labels.
Read the supplied parameter guide for units and interactions before changing these initial values.
| Source input key | Initial value |
|---|---|
=======================================qw0 | Display text |
Open new seriesNewCycle_ | true |
Trade BuyFlag_Trade_Buy_ | true |
Trade SellFlag_Trade_Sell_ | true |
Manage manual ordersflag_Hand_Ord | false |
Use hedgeFlag_Use_hedge | true |
Order Comment (fixed @MQLume)sOrdComm | Display text |
Max spread (0 - not use)MaxSpred | 0 |
Start HourStart_Hour | 0 |
End HourEnd_Hour | 0 |
Magic | 1111 |
Read the supplied parameter guide for units and interactions before changing these initial values.
| Source input key | Initial value |
|---|---|
=======================================qw1 | Display text |
TF Black DragonTF_DB | PERIOD_CURRENT |
Read the supplied parameter guide for units and interactions before changing these initial values.
| Source input key | Initial value |
|---|---|
=======================================qw2 | Display text |
Use stochasticUse_Stoh | false |
TFTF_Stoh | PERIOD_CURRENT |
Up levelUp_Level | 90 |
Down levelDown_Level | 10 |
KPeriod | 7 |
DPeriod | 1 |
Slowing | 2 |
Read the supplied parameter guide for units and interactions before changing these initial values.
| Source input key | Initial value |
|---|---|
=======================================qw3 | Display text |
Max buy ordersMaxOrdersBuy | 10 |
Max sell ordersMaxOrdersSell | 10 |
Initial lotLot_Init_ | 0.01 |
AutolotAutolot_ | false |
Autolot size. Free margin for each 0.01 LotsAutolotsize_ | 1000 |
Lot MultiplierMartin_ | 1.5 |
Max LotMaxLot_ | 5.0 |
TP ModeTP_Mode | mode_Virt |
TP (0 - not use)TP_ | 200 |
SL ModeSL_Mode | mode_Virt |
SL (0 - not use)SL_ | 200 |
Trail ModeTrail_Mode | mode_Virt |
Trail Start, points (0 - not use)iTS | 0 |
Trail Distance, pointsiTD | 100 |
Overlap Last orderOverlap | true |
Overlap last order numberOverlapOrderNumber | 8 |
Overlap percentOverlapPercent | 3 |
Pause between orders (min. 0 - not use)MinuteStop | 0 |
Read the supplied parameter guide for units and interactions before changing these initial values.
| Source input key | Initial value |
|---|---|
=======================================qw4 | Display text |
Fix distanceFix_Distance | 200 |
Order dinamic distanceOrder_dinamic_distance | 6 |
Dynamic distance startDynamic_distance_start | 200 |
Distance multiplierDistance_multiplier | 1.2 |
Read the supplied parameter guide for units and interactions before changing these initial values.
| Source input key | Initial value |
|---|---|
=======================================qw5 | Display text |
Use NewsFlag_Use_News | false |
High impactImp1Draw | false |
Medium impactImp2Draw | false |
Low impactImp3Draw | false |
Pause before a high importance newsb3_ | 60 |
Pause after a high importance newsa3_ | 60 |
Pause before a medium importance newsb2_ | 15 |
Pause after a medium importance newsa2_ | 15 |
Pause befor a low importance newsb1_ | 5 |
Pause after a low importance newsa1_ | 5 |
Read the supplied parameter guide for units and interactions before changing these initial values.
| Source input key | Initial value |
|---|---|
=======================================qw6 | Display text |
X1_ | 10 |
Y1_ | 25 |
Draw on-offfDraw | true |
FontSizeMark | 13 |
FontNameMark | "Verdana" |
ColorText | clrWhite |
ColorFonRec | C'148,0,211' |
FontSizeButt | 11 |
FontNameButt | "Verdana" |
ColorButt | clrWhite |
Info panel background colorcCIP | clrGray |
Support after delivery
While the product is actively maintained, we investigate and fix reproducible defects in the delivered, unmodified code that conflict with the product description.
Missing files, incorrect delivery and original-code compilation failures in the stated environment.
Provide the release, settings, logs and reproduction steps so we can assess and resolve the issue.
Start with the included guide and contact us for help with delivery or reproducible software defects. Trading results are not guaranteed.
You may read, modify and compile the delivered source for your own research and trading accounts. Keep a backup of the original delivery before making changes. You may not resell, redistribute, publish or sublicense the source or compiled files, or offer them as a white-label product, without separate written permission. Source delivery does not transfer copyright or ownership of third-party names.
Source code is a copyable digital product. Once delivered, we do not accept change-of-mind refunds, including because you no longer need the product. Check compatibility, contents and disclosed limits before ordering.
Enter your email, confirm the licence and download your free EA source package. No payment needed.
Choose your free EA source packages.
Review the products and US$0 total.
Confirm the licence and complete your free order.
One ZIP for all selected free products, with individual downloads available.
Ask us about advanced custom development. Share your requirements through private support or email; we will discuss the scope and quote separately.
100% committed to following up on your delivery and support requests.
Explore free EA source code




Free editable gold breakout project with six independently selectable cores, session filters and flexible position sizing.

Free editable source with compiled EX5: four gold breakout engines with independent profiles, sizing, direction and exits.

Trend-based entries with optional grid additions, side controls and virtual exits.

RSI entries with two ATR filters, configurable sessions and optional grid management.
Learn the difference: MQL4 / MQL5 source uses .mq4 / .mq5; EX4 / EX5 files are compiled programs. Buying an EX4 or EX5 file does not automatically include source code.
Two original, non-trading learning samples for MT4 and MT5. Inspect OnInit and OnDeinit logging without order execution.
Learning samples only. Review and compile them in MetaEditor before use; these samples do not place trades.
Ready for another approach? Choose an EA to run, or source code to explore and customise.


Source code · MQ5 + EX5
XAUUSD · Flexible sizing and account protections

EA only · EX5
Two gold trading engines, Discipline and Loyalty, with flexible sizing, trailing stops and a chart dashboard.

Loading…
Stay close to MQLume, wherever you like to learn.
See our EAs in action. Explore backtests, walkthroughs and practical guides.
Watch on YouTubeMeet other EA users, share ideas and keep up with what’s new.
Join the community Follow official updates