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
Build your own gold-trading workflow. Explore two embedded models, flexible automatic sizing and hands-on trade management in complete editable MQL5 source.
These are marketplace specifications, not a guarantee of suitable capital or performance.
- Symbol
- XAUUSD
- Chart timeframe
- M30–H1
- Minimum deposit
- US$1,500
- Account
- Hedging · ECN / RAW
- Leverage
- 1:500 recommended
- 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 STLots(){ double lot; if(UseAutoLot) {double balance=AccountInfoDouble(ACCOUNT_BALANCE);if(balance<=0)balance=AccountInfoDouble(ACCOUNT_EQUITY); lot=NormalizeDouble(balance/(BalancePerLot>0?BalancePerLot:1000.0)*LotPerStep,2);} else {lot=NormalizeDouble(AccountInfoDouble(ACCOUNT_MARGIN_FREE)*stLegacyRisk/1000.0,2);if(ManualLot!=0)lot=ManualLot;} double step=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP); double aligned=step*(int)MathRound(lot/step); if(MathAbs(aligned-lot)>0.0000001)lot=aligned; double minimum=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN),maximum=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX); if(lot<minimum)lot=minimum;if(lot>maximum)lot=maximum;return lot;}bool STMarginAllowed(const string symbol,const double lot){ MqlTick tick;SymbolInfoTick(symbol,tick);double required=0,free_margin=AccountInfoDouble(ACCOUNT_MARGIN_FREE); if(!OrderCalcMargin(ORDER_TYPE_BUY,symbol,lot,tick.ask,required))return false; return required<=free_margin;}bool STFill(MqlTradeRequest &request){ long mode=SymbolInfoInteger(request.symbol,SYMBOL_TRADE_EXEMODE); if(mode<SYMBOL_TRADE_EXECUTION_MARKET)return true; long flags=SymbolInfoInteger(request.symbol,SYMBOL_FILLING_MODE); if(mode==SYMBOL_TRADE_EXECUTION_MARKET) {if((flags&SYMBOL_FILLING_FOK)!=0)stFilling=ORDER_FILLING_FOK; else if((flags&SYMBOL_FILLING_IOC)!=0)stFilling=ORDER_FILLING_IOC; else{stLastRetcode=TRADE_RETCODE_INVALID_FILL;return false;}} else if(stFilling==ORDER_FILLING_FOK && (flags&SYMBOL_FILLING_FOK)==0) {stLastRetcode=TRADE_RETCODE_INVALID_FILL;return false;} else if(stFilling==ORDER_FILLING_IOC && (flags&SYMBOL_FILLING_IOC)==0) {stLastRetcode=TRADE_RETCODE_INVALID_FILL;return false;} request.type_filling=stFilling;return true;}bool STSend(MqlTradeRequest &request){ MqlTradeResult result={}; bool sent=OrderSend(request,result);stLastRetcode=result.retcode; return sent; // Baseline returns request submission bool, not a fill guarantee.}bool STOpen(const ENUM_ORDER_TYPE side,const double volume,const double price,const double sl,const double tp){ if(IsStopped()){stLastRetcode=TRADE_RETCODE_CLIENT_DISABLES_AT;return false;} MqlTradeRequest request={};request.action=TRADE_ACTION_DEAL;request.symbol=_Symbol; request.magic=OrderMagic;request.type=side;request.volume=volume;request.price=price; request.sl=sl;request.tp=tp;request.deviation=10; long modes=SymbolInfoInteger(_Symbol,SYMBOL_ORDER_MODE); if((modes&SYMBOL_ORDER_MARKET)==0){stLastRetcode=TRADE_RETCODE_INVALID_ORDER;return false;} if((modes&SYMBOL_ORDER_SL)==0)request.sl=0;if((modes&SYMBOL_ORDER_TP)==0)request.tp=0;Overview
An EA you can make your own.
Go beyond the settings panel. Super Trend gives you the source behind its XAUUSD entry filters, position spacing, partial closes and trailing stops. Study the implementation, test a new idea with an AI coding assistant, and keep control of every change. Models are embedded: no extra model, MQH or DLL download is needed.
Built for MetaTrader 5. A complete source project, clear inputs and practical documentation give you control over your next build.
Compile. Backtest. Demo. Then decide.
After compiling the purchased source, check its behaviour in the Strategy Tester. Test it on a demo account before deciding whether to trade live. Passing tests does not guarantee live returns.
Project specifications
- Platform
- MetaTrader 5 / MQL5; not compatible with MT4
- Version
- 2.1
- Dependencies
- Uses only the Trade library included with MT5. No custom MQH or external DLL to install.
- Inputs
- 46 inputs covering sizing, entries, trade management and chart controls
- 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 2.1 · Personal-use licence- MQ5Included
EA Super Trend XAUUSD MT5 2.1[MQLume].mq5
Complete, editable single-file source. Read the logic, customise it and compile your own EA.
- EX5Included
EA Super Trend XAUUSD MT5 2.1[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
The included PARAMETERS.pdf explains all 46 inputs, defaults, units and operating details. Five files are included: 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.
Compile your starting point
Open the source in MetaEditor, compile it and explore the default settings. The included guides explain installation and parameters so you can begin customising.
Test across market cycles
For a broader view of your settings, we recommend backtesting with the past 10 years of real tick data where available, followed by testing on a demo account.
Before live use
Backtest your chosen settings, then test on a demo account before deciding whether to trade live. Past results do not guarantee future performance.
Version v2.1 · 46
Parameter guide
Initial settings from the delivered source. Review and test changes before using them.
Explore the inputs below to shape the EA around your research, risk preferences and workflow.
Core settings and sizing
Automatic sizing uses LotPerStep for each BalancePerLot of balance. With automatic sizing disabled, ManualLot supplies fixed volume. Check broker volume limits.
| Source input key | Initial value |
|---|---|
SettingsInfo_Settings | Display text |
Important informationInfo_Link | Display text |
Close orders by signals (Only SL/TP if false)close_orders_by_signals | true |
Auto lot (volume per balance step)UseAutoLot | true |
Auto lot: volume per balance stepLotPerStep | 0.01 |
Auto lot: balance amount per volume stepBalancePerLot | 1000.0 |
Fixed lot (used if auto lot is off)ManualLot | 0.0 |
Orders magicOrderMagic | 887441147 |
Money management
max_orders above 1 enables multiple positions with the configured spacing. Stop-loss, take-profit and spacing units are documented in PARAMETERS.pdf.
| Source input key | Initial value |
|---|---|
Max positions number (Enable grid mode if >1)max_orders | 3 |
Distance between positions (For grid mode)orders_distance | 250.0 |
Stop lossstoploss | 4290 |
Take profittakeprofit | 4730 |
Bot comment (orders comment)bot_comment | EA Super Trend XAUUSD MQLume |
Partial closes
Choose the profit threshold and percentage to close. The once-per-position setting prevents repeated partial closes.
| Source input key | Initial value |
|---|---|
Enable partial closeUsePartialClose | true |
Profit in points to partially closePartialClosePoints | 1000 |
Percent of volume to close (%)PartialClosePercent | 50.0 |
Only one partial close per positionPartialCloseOnce | true |
Trailing stops
Configure activation profit, trailing distance and minimum stop adjustment step in symbol points.
| Source input key | Initial value |
|---|---|
Enable trailing stopUseTrailingStop | true |
Profit in points to activate trailingTrailingStartPoints | 6280 |
Trailing distance from price (points)TrailingDistance | 2530 |
Minimum step to move stop (points)TrailingStep | 990 |
SuperTrend display
These settings control the chart overlay. Entry decisions also use the embedded models.
| Source input key | Initial value |
|---|---|
Show SuperTrend on chartShowSuperTrend | true |
ATR periodSuperTrendATRPeriod | 10 |
ATR multiplierSuperTrendMultiplier | 3.0 |
Bars to displaySuperTrendHistory | 300 |
Line width (1-5)SuperTrendLineWidth | 3 |
Show reversal arrowsShowTrendArrows | true |
Trading hours and weekdays
The time filter is disabled by default. When enabled, review server-time hours and allowed weekdays in the included guide.
| Source input key | Initial value |
|---|---|
Enable trading time filterUseTimeFilter | false |
Start hour (server time)StartHour | 1 |
Start minuteStartMinute | 0 |
End hour (server time)EndHour | 29 |
End minuteEndMinute | 0 |
Trade on MondayTradeMonday | true |
Trade on TuesdayTradeTuesday | true |
Trade on WednesdayTradeWednesday | true |
Trade on ThursdayTradeThursday | true |
Trade on FridayTradeFriday | true |
Trade on SaturdayTradeSaturday | false |
Trade on SundayTradeSunday | false |
News filter
Configure currency, impact and entry buffers. News protection is bypassed in the Strategy Tester; evaluate its operation separately on a demo account.
| Source input key | Initial value |
|---|---|
Enable news filterUseNewsFilter | true |
Do not open N minutes before newsNewsMinutesBefore | 60 |
Do not open N minutes after newsNewsMinutesAfter | 30 |
Only high-impact news (false = medium+high)NewsHighOnly | true |
News currencies, comma separated (e.g. USD,EUR)NewsCurrencies | USD |
Account yield chart
Show or hide the whole-account yield chart and choose its displayed history.
| Source input key | Initial value |
|---|---|
Show account yield chartShowYieldChart | true |
Days on yield chartYieldChartDays | 30 |
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
Future profits are not guaranteed. You should be comfortable using MQL5 and MT5; difficulties caused by a lack of the required knowledge are outside bug-fix support.
FAQ
Frequently asked questions
Designed for users with programming skills and trading experience who can read code, compile MQL5 and test strategies independently.
Help centreWhat 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
After payment is verified, we deliver the source package and documentation to your order email. Check your inbox and spam folder. Keep your order reference for delivery and support questions. Include your order reference, source release, terminal build, settings, expected behaviour and steps to reproduce. Attach only relevant logs and remove account credentials.
Delivery & support
- 1
Review
Read the files, environment and terms
- 2
Confirm
Check the source version and purchase terms
- 3
Pay
Payment is checked with the provider or on the selected blockchain
- 4
Receive
Source files by email within 6 hours of confirmed payment
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.