Make the strategy your own.
With the source in your hands, your ideas can go further than the settings panel.
No extra dependencies to install
Open your source in MetaEditor and start building. Projects use self-contained code or the standard libraries already included with MT5.
Unlimited personal use
Study, customise and trade on your own accounts. Your EA source gives you the freedom to keep refining your ideas.
Pay once. No activation or usage fees.
One purchase per source project. MQLume does not charge by the number of activations or uses.
Vibe coding. Your trading judgement.
Bring your ideas to an AI coding assistant. Use the editable MQL5 project as your starting point, and stay in control of every change.
Describe your idea
Ask for a session filter, clearer logging or a different risk rule.
Review the change
Read the proposed code, check the logic and compile it in MetaEditor.
Test your version
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.
Trading setup
Stated specifications
Your next gold-coding project starts free. Get the complete editable source, compiled EA and parameter guide, then explore gold breakout trading on your own terms.
These are marketplace specifications, not a guarantee of suitable capital or performance.
- Symbol
- XAUUSD / Gold
- Chart timeframe
- Any chart timeframe
- Account
- Hedging required for portfolio mode
- VPS
- Recommended for continuous operation
Inside the source
Explore 50 lines of the project's MQL5 source. Scroll inside the editor to discover more.
double HunterNormalizePrice(double price){ double tick=SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_SIZE); if(tick<=0.0) tick=_Point; if(tick>0.0) price=MathRound(price/tick)*tick; return HunterDecimalRound(price,_Digits);}double HunterSpreadPips() // Read Ask before Bid.{ double ask=SymbolInfoDouble(_Symbol,SYMBOL_ASK); double bid=SymbolInfoDouble(_Symbol,SYMBOL_BID); return (ask-bid)/HunterPip();}// Fixed volume is raised to the minimum before rounding down to the lot step.double HunterClampVolume(double volume){ const double minimum=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN); const double maximum=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX); volume=MathMax(minimum,volume); volume=MathMin(maximum,volume); double step=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP); if(step<=0.0) step=0.01; volume=HunterDecimalRound(MathFloor(volume/step)*step,2); return volume<minimum?0.0:volume;}// Risk volume must not be increased to the broker minimum.double HunterRiskVolume(double volume){ const double minimum=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN); const double maximum=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX); double step=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP); if(volume<=0.0 || minimum<=0.0 || volume+1.0e-12<minimum) return 0.0; if(step<=0.0) step=0.01; volume=HunterDecimalRound(MathFloor(MathMin(volume,maximum)/step)*step,2); return volume<minimum?0.0:volume;}// Use 98% of free margin, with a calculation fallback and bounded lot reductions.double HunterFitMargin(const ENUM_ORDER_TYPE type,double volume,const double price,string &reason){ volume=HunterClampVolume(volume); if(volume<=0.0) { reason="Volume below minimum"; return 0.0; } double available=AccountInfoDouble(ACCOUNT_MARGIN_FREE);Overview
An EA you can make your own.
Claim Smart Gold Hunter free from MQLume: add it to your cart, enter your email and download your package on the website. Explore individual trading profiles or combine selected profiles in portfolio mode, with configurable sizing and directional risk controls. Study the code, adapt a rule and test your own ideas. No extra DLL or custom indicator download is needed.
Built for MetaTrader 5. A complete source project, clear inputs and practical documentation give you control over your next build.
Project specifications
- Platform
- MetaTrader 5 / MQL5; not compatible with MT4
- Version
- 5.0
- Dependencies
- One self-contained MQ5 file. Open it in MetaEditor and compile.
- Inputs
- 87 inputs covering profiles, sizing, time controls and portfolio settings
- Build & testing
- Compile in MT5 MetaEditor; consult RELEASE_NOTES.txt for the packaged build and testing record.
Your next build starts here.
Included files
Complete source, practical documentation and reference files to help you understand, customise and test your EA.
One project.
Complete source.
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 5.0 · Personal-use licence- MQ5Included
Smart Gold Hunter MT5 5.0[MQLume].mq5
Complete, editable single-file source. Read the logic, customise it and compile your own EA.
- EX5Included
Smart Gold Hunter MT5 5.0[MQLume].ex5
The compiled EA accompanying the source. Recompile after editing the MQ5.
- TXTIncluded
README.txt
A concise welcome, installation and compilation guide, with licence terms and support details.
- PDFIncluded
PARAMETERS.pdf
PARAMETERS.pdf covers all 87 inputs, their defaults, units and interactions. The free package includes MQ5, EX5, README.txt, PARAMETERS.pdf and RELEASE_NOTES.txt.
- TXTIncluded
RELEASE_NOTES.txt
Build details, recorded test conditions, changes and known limits for the supplied package.
Testing
Build confidence through testing.
Explore, customise and test your EA across different market conditions. Start with the supplied guide, then build a testing routine around your own settings.
Version v5.0 · 87
Parameter guide
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.
Choose a trading profile
Positive RR is selected by default. Select another built-in profile or the custom profile before changing profile-specific settings.
| Source input key | Initial value |
|---|---|
Strategy Profileinp_Mode | SGH_POSITIVE_RR |
Entry and stop options
Configure optional entry randomization, break-even and execution-based stop placement. Some options do not apply to every profile; check PARAMETERS.pdf.
| Source input key | Initial value |
|---|---|
Entry Randomizerinp_UltimateEntryRandomizer | false |
Break Even (Not Applicable to Positive RR / Swinger / Prop Firminp_UltimateBreakEven | false |
False Initial SL On Pending Orderinp_UltimateFalseInitialSL | false |
False Initial SL Distance (points)inp_UltimateFalseSLPoints | 1000.0 |
Recalculate SL From Executioninp_UltimateSLFromExecution | false |
Position sizing
Choose fixed lots, risk-percentage sizing or balance-per-0.01-lot sizing. The delivery defaults to fixed 0.01 lots. Spread protection is separately configurable.
| Source input key | Initial value |
|---|---|
Lot Size Methodinp_LotMethod | SGH_FIXED_LOTS |
Fixed Lotinp_Lots | 0.01 |
Risk Percentinp_RiskPercent | 1.0 |
Balance Per 0.01 Lotinp_BalancePer001Lot | 100.0 |
Max Spread (points, 0=off)inp_MaxSpread | 0 |
High Spread Protectioninp_UseHighSpreadDeletePending | false |
Custom profile
Adjust the custom profile’s take profit, stop loss, trailing thresholds, pause and entry-distance adjustment. These controls are not general overrides for all built-in profiles.
| Source input key | Initial value |
|---|---|
Custom Take Profit (points, 0=off)inp_TP | 250.0 |
Custom Stop Loss (points, 0=off)inp_SL | 500.0 |
Custom Trailing Start (points, 0=off)inp_TrailStart | 100.0 |
Custom Trailing Stop (points)inp_TrailStop | 50.0 |
Custom Pause Between Positions (sec)inp_Pause | 300 |
Entry distance adjustment (+/- points)inp_CustomPointsAway | 0.0 |
Account and session controls
Configure daily targets and limits, news buffers, daily close/reopen times and Friday closing. Review the broker’s server time and the guide before changing these controls.
| Source input key | Initial value |
|---|---|
Enable Daily Profit/Loss Protectionsinp_UsePropFirmMode | true |
Stop After Daily Profit Targetinp_UseDailyProfitTarget | false |
Daily Profit Targetinp_DailyProfitTargetUSD | 200.0 |
Stop After Daily Loss Limitinp_UseDailyLossLimit | false |
Daily Loss Limitinp_DailyLossLimitUSD | 100.0 |
Close All If Daily DD Is Hitinp_UseEquityProtection | false |
Daily Drawdown %inp_DailyEquityProtectionPercent | 3.0 |
Daily Drawdown Based Oninp_DailyDDReference | SGH_PREV_DAY_BALANCE |
Use All High-Impact Newsinp_UseHighImpactNewsFilter | false |
Use Selected High-Impact News Onlyinp_UseMajorNewsFilter | true |
News Currencies: USD,EUR,GBPinp_NewsCurrencies | USD |
Selected High-Impact Newsinp_MajorNewsKeywords | NFP,CPI,FOMC,Fed Chair,Core PCE |
Minutes Before Newsinp_NewsMinutesBefore | 5 |
Minutes After Normal Newsinp_NewsMinutesAfter | 5 |
Full Fed Chair Speech Protectioninp_FullFedChairSpeechProtection | true |
Fed Chair Protection Minutesinp_FedChairSpeechMinutes | 60 |
Use manual daily close/reopen timeinp_UseManualDailyCloseTime | true |
Daily close hourinp_DailyCloseHour | 21 |
Daily close minuteinp_DailyCloseMinute | 15 |
Daily reopen hourinp_DailyReopenHour | 1 |
Daily reopen minuteinp_DailyReopenMinute | 15 |
Delete pending orders at daily closeinp_DailyCloseDeletePendings | true |
Close positions at daily closeinp_DailyCloseClosePositions | true |
Friday Close Protectioninp_UseFridayCloseProtection | true |
Friday close timeinp_UseManualFridayCloseTime | true |
Friday close hourinp_FridayCloseHour | 15 |
Friday close minuteinp_FridayCloseMinute | 25 |
Delete Pending Orders on Fridayinp_FridayCloseDeletePendings | true |
Close Open Positions on Fridayinp_FridayCloseClosePositions | true |
Time and panel settings
Choose automatic or manual broker-time offset, optional early-close detection and whether to show the information panel.
| Source input key | Initial value |
|---|---|
Auto Detect Broker GMT Offsetinp_UseAutoBrokerGMTOffset | false |
Manual Broker GMT Offsetinp_ManualBrokerGMTOffset | 2 |
Broker Early/Holiday Close Detectioninp_UseBrokerEarlyCloseDetection | false |
Minutes Before Broker Session Closeinp_EarlyCloseProtectionMinutes | 30 |
Show Info Panel On Chartinp_ShowPanel | true |
Order identification
Assign an appropriate magic number and trade comment so you can identify this installation’s orders.
| Source input key | Initial value |
|---|---|
Magic Numberinp_MagicNo | 888777 |
Trade Comment (single-profile mode)inp_TradeComment | @fundedtoday SGH 5 MQLume |
Portfolio mode
Portfolio mode is off by default. Enable the profiles you want to combine, choose each profile’s sizing method and set the maximum combined directional risk. A hedging account is required.
| Source input key | Initial value |
|---|---|
Multi-Profile Mode (OFF = single profile)inp_UseMultiProfileMode | false |
Max Combined Risk Per Buy/Sell Side % (0=off)inp_PortfolioMaxDirectionalRiskPercent | 3.0 |
Recalculate SL From Executioninp_PortfolioSLFromExecution | false |
False Initial SLinp_PortfolioFalseInitialSL | false |
False SL Distance (points)inp_PortfolioFalseSLPoints | 1000.0 |
Enable Strikerinp_PortfolioUseStriker | false |
Striker Lot Methodinp_PortfolioStrikerLotMethod | SGH_PORTFOLIO_FIXED_LOTS |
Striker Risk % Per Tradeinp_PortfolioStrikerRiskPercent | 1.0 |
Striker Fixed Lotinp_PortfolioStrikerFixedLot | 0.01 |
Enable Ultimate Scalperinp_PortfolioUseUltimateScalper | false |
Ultimate Scalper Lot Methodinp_PortfolioUltimateLotMethod | SGH_PORTFOLIO_FIXED_LOTS |
Ultimate Scalper Risk % Per Tradeinp_PortfolioUltimateRiskPercent | 1.0 |
Ultimate Scalper Fixed Lotinp_PortfolioUltimateFixedLot | 0.01 |
Enable Classic Scalperinp_PortfolioUseScalper | false |
Classic Scalper Lot Methodinp_PortfolioScalperLotMethod | SGH_PORTFOLIO_FIXED_LOTS |
Classic Scalper Risk % Per Tradeinp_PortfolioScalperRiskPercent | 1.0 |
Classic Scalper Fixed Lotinp_PortfolioScalperFixedLot | 0.01 |
Enable Positive RRinp_PortfolioUsePRRScalping | false |
Positive RR Lot Methodinp_PortfolioPRRLotMethod | SGH_PORTFOLIO_FIXED_LOTS |
Positive RR Risk % Per Tradeinp_PortfolioPRRRiskPercent | 1.0 |
Positive RR Fixed Lotinp_PortfolioPRRFixedLot | 0.01 |
Enable Swingerinp_PortfolioUseSwinger | false |
Swinger Lot Methodinp_PortfolioSwingerLotMethod | SGH_PORTFOLIO_FIXED_LOTS |
Swinger Risk % Per Tradeinp_PortfolioSwingerRiskPercent | 1.0 |
Swinger Fixed Lotinp_PortfolioSwingerFixedLot | 0.01 |
Enable Prop Firm Scalperinp_PortfolioUsePropScalper | false |
Prop Firm Scalper Lot Methodinp_PortfolioPropLotMethod | SGH_PORTFOLIO_FIXED_LOTS |
Prop Firm Scalper Risk % Per Tradeinp_PortfolioPropRiskPercent | 1.0 |
Prop Firm Scalper Fixed Lotinp_PortfolioPropFixedLot | 0.01 |
Enable Custom Profileinp_PortfolioUseCustom | false |
Custom Lot Methodinp_PortfolioCustomLotMethod | SGH_PORTFOLIO_FIXED_LOTS |
Custom Risk % Per Tradeinp_PortfolioCustomRiskPercent | 1.0 |
Custom Fixed Lotinp_PortfolioCustomFixedLot | 0.01 |
Support after delivery
Bug fixes are included.
While the product is actively maintained, we investigate and fix reproducible defects in the delivered, unmodified code that conflict with the product description.
Support: while the product is actively maintainedDelivery & compilation
Missing files, incorrect delivery and original-code compilation failures in the stated environment.
Code & documentation defects
Provide the release, settings, logs and reproduction steps so we can assess and resolve the issue.
Support scope
Start with the included guide and contact us for help with delivery or reproducible software defects. Trading results are not guaranteed.
What am I buying?
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.
Refunds after delivery
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.
Delivery and bug reports
Enter your email, confirm the licence and download your free EA source package. No payment needed.
Delivery & support
- 1
Add to cart
Choose your free EA source packages.
- 2
Check your order
Review the products and US$0 total.
- 3
Enter your email
Confirm the licence and complete your free order.
- 4
Download
One ZIP for all selected free products, with individual downloads available.
Explore free EA source code
Free downloads. Real source files.


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.
Journal Starter
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.