Identified and optimized a performance bottleneck in the MQL5 Expert Advisor's execution hot path. 💡 What: Implemented a 1-second cache for `TerminalInfoInteger(TERMINAL_TRADE_ALLOWED)` and `MQLInfoInteger(MQL_TRADE_ALLOWED)` within the `IsTradingAllowed` function in `ExpertMAPSARSizeOptimized_Improved.mq5`. 🎯 Why: These terminal API calls are relatively expensive as they require context switching between the MQL virtual machine and the terminal core. In this EA, which processes every price tick to manage trailing stops, these redundant calls were introducing unnecessary overhead thousands of times per hour. 📊 Impact: Reduces terminal API overhead by up to 99% during rapid price ticks (capping it at 1 call per second per symbol), significantly improving execution efficiency for high-frequency price processing. 🔬 Measurement: Verified the optimization by reviewing the code logic and ensuring it correctly updates on a 1-second timer. Repository health was confirmed using `ci_validate_repo.py` and `test_automation.py`. |
||
|---|---|---|
| .devcontainer | ||
| .github | ||
| .jles | ||
| .jules | ||
| config | ||
| dashboard | ||
| docs | ||
| logs | ||
| mt5/MQL5 | ||
| scripts | ||
| .dockerignore | ||
| .editorconfig | ||
| .env.example | ||
| .gitignore | ||
| ACCOUNT_SETUP_411534497.md | ||
| AGENTS.md | ||
| AUTOMATION_FEATURES.md | ||
| CURRENT_STATUS_ANALYSIS.md | ||
| DEPLOYMENT_COMPLETE.md | ||
| deployment_log_20260119_063645.txt | ||
| docker-compose.dev.yml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| Dockerfile.cloud | ||
| Dockerfile.dev | ||
| EXNESS_ACCOUNT_SETUP.txt | ||
| fly.toml | ||
| LICENSE | ||
| LIVE_TRADING_SETUP.md | ||
| QUICK_DEPLOY.md | ||
| QUICK_REFERENCE.md | ||
| railway.json | ||
| README.md | ||
| render.yaml | ||
| requirements.txt | ||
| RISK_CONFIG_50USD.md | ||
| vercel.json | ||
| VERIFICATION.md | ||
| VPS_SETUP_NOTES.md | ||
SMC + Trend Breakout (MTF) for Exness MT5
This repo contains:
mt5/MQL5/Indicators/SMC_TrendBreakout_MTF.mq5: visual indicator (BOS/CHoCH + Donchian breakout + lower-timeframe confirmation).mt5/MQL5/Experts/SMC_TrendBreakout_MTF_EA.mq5: Expert Advisor (alerts + optional auto-trading).
☁️ Cloud Deployment
Deploy to cloud platforms:
- Render.com: Auto-deploy with
render.yaml - Railway.app: Deploy with
railway.json - Fly.io: Deploy with
fly.toml - Docker: Build and deploy anywhere
Quick Deploy:
# Setup all platform configs
python scripts/deploy_cloud.py all
# Deploy to specific platform
python scripts/deploy_cloud.py render
python scripts/deploy_cloud.py railway
python scripts/deploy_cloud.py flyio
python scripts/deploy_cloud.py docker --build
📖 For detailed cloud deployment instructions, see Cloud Deployment Guide
Render workspace
My Blue watermelon Workspace tea-d1joqqi4d50c738aiujg
Install into Exness MetaTrader 5
⚠️ Note: Custom Indicators and EAs are not supported on the Exness Web Terminal. You must use the Desktop version of MT5.
📖 For detailed deployment instructions, see Exness Deployment Guide
Quick start:
- Open Exness MT5.
- Go to File → Open Data Folder.
- Copy:
SMC_TrendBreakout_MTF.mq5toMQL5/Indicators/SMC_TrendBreakout_MTF_EA.mq5toMQL5/Experts/
- In MT5, open MetaEditor (or press F4) and compile the files.
- Back in MT5: Navigator → Refresh.
🚀 Automated Startup (NEW!)
Quick Start:
- Windows:
powershell -ExecutionPolicy Bypass -File scripts\startup.ps1 - Linux/WSL:
./scripts/startup.sh
Auto-Start on Boot:
- Windows:
powershell -ExecutionPolicy Bypass -File scripts\startup.ps1 -CreateScheduledTask - Linux:
./scripts/startup.sh --setup-systemd
📚 Documentation:
- Quick Reference Guide - Command cheat sheet
- Verification Report - System status and test results
- Startup Automation Guide - Complete guide
- Quick Start - Quick start instructions
The automation system handles:
- MT5 Terminal startup
- Python scripts execution
- Scheduled tasks configuration
- Process monitoring and logging
- Windows Task Scheduler integration
- Linux systemd/cron integration
Optional: package / deploy helpers
- Create a zip you can copy to your PC:
bash scripts/package_mt5.sh→ outputsdist/Exness_MT5_MQL5.zip
- Copy directly into your MT5 Data Folder (run this on the machine that has MT5 installed):
bash scripts/deploy_mt5.sh "/path/from/MT5/File->Open Data Folder"
GitHub automation (reviews, CI, auto-merge, OneDrive sync)
This repo includes GitHub Actions workflows under .github/workflows/:
- CI (
CI): runs on pull requests and pushes tomain/master- Validates repo structure
- Builds
dist/Exness_MT5_MQL5.zipand uploads it as an artifact
- Auto-merge enablement (
Enable auto-merge (label-driven)): if a PR has the labelautomerge, it will enable GitHub’s auto-merge (squash). Your branch protection rules still control when it can merge (required reviews, required CI, etc.). - OneDrive sync (
Sync to OneDrive (rclone)): on pushes tomain(and manual runs), syncsmt5/MQL5to OneDrive viarclone.
Recommended repo settings (GitHub → Settings):
- Branch protection (main):
- Require pull request reviews (at least 1)
- Require status checks:
CI / validate-and-package - (Optional) Require CODEOWNERS review
- Auto-merge: enable “Allow auto-merge” in repo settings
OneDrive sync setup (required secrets):
RCLONE_CONFIG_B64: base64 of yourrclone.confcontaining a OneDrive remote.
Example (run locally, then paste into GitHub Secrets):
rclone config
base64 -w0 ~/.config/rclone/rclone.conf
Optional secrets:
ONEDRIVE_REMOTE: remote name inrclone.conf(default:onedrive)ONEDRIVE_PATH: destination folder path (default:Apps/MT5/MQL5)
Firefox Relay API key (optional secrets):
SCRSORCOPILOT
Set both to your Firefox Relay profile API key (https://relay.firefox.com/accounts/profile/). Store these as GitHub Secrets or in a local .env file (see .env.example). Do not commit secret values.
Use the indicator
- Attach
SMC_TrendBreakout_MTFto a chart (your main timeframe). - Set LowerTF to a smaller timeframe (ex: main = M15, lower = M5 or M1).
- Signals require lower-TF confirmation by default (EMA fast/slow direction).
Use the EA (push to terminal + optional auto trading)
- Attach
SMC_TrendBreakout_MTF_EAto a chart. - Enable Algo Trading in MT5 if you want auto entries.
- If you want phone push alerts:
- MT5 → Tools → Options → Notifications
- enable push notifications and set your MetaQuotes ID.
- For web request integrations (ZOLO-A6-9V-NUNA- plugin):
- Enable
EnableWebRequestparameter - Add
https://soloist.ai/a6-9vto MT5's allowed URLs list:- MT5 → Tools → Options → Expert Advisors
- Check "Allow WebRequest for listed URL"
- Add the URL:
https://soloist.ai/a6-9v
- Enable
Auto SL/TP + risk management (EA)
In SMC_TrendBreakout_MTF_EA:
- SLMode
SL_ATR: SL = ATR ×ATR_SL_MultSL_SWING: SL beyond last confirmed fractal swing (withSwingSLBufferPoints), fallback to ATR if swing is missing/invalidSL_FIXED_POINTS: SL =FixedSLPoints
- TPMode
TP_RR: TP =RR× SL distanceTP_FIXED_POINTS: TP =FixedTPPointsTP_DONCHIAN_WIDTH: TP = Donchian channel width ×DonchianTP_Mult(fallback to ATR width if needed)
- RiskPercent
- If
RiskPercent > 0, lots are calculated from SL distance so the money at risk ≈ RiskPercent of Equity (or Balance if you disableRiskUseEquity). RiskClampToFreeMargincan reduce lots if required margin is too high.
- If
Notes / safety
- This is a rules-based implementation of common “SMC” ideas (fractal swing BOS/CHoCH) and a Donchian breakout.
- Test in Strategy Tester and/or demo before using real funds.
Project links
- Developer tip window project: https://chatgpt.com/g/g-p-691e9c0ace5c8191a1b409c09251cc2b-window-for-developer-tip/project
- Plugin Integration: ZOLO-A6-9V-NUNA-
- GitHub Pages: https://github.com/Mouy-leng/-LengKundee-mql5.github.io.git
- Soloist.ai Endpoint: https://soloist.ai/a6-9v
Contact
- Email:
Lengkundee01.org@domain.com - WhatsApp: Agent community