SunflowerEA
- Experts
-
Kun Jiao
Senior Development Engineer. Available for custom development of various quantitative trading strategies and full-scale setup of automated trading research and backtesting environments. - Version: 1.0
# SunflowerEA
### ONNX Neural-Network BTCUSD Trading System
A trained deep-learning model is compiled directly into the EA as a single file — fully local inference, zero external dependencies, built-in multi-leg risk control. Designed for BTCUSD trend swings on the M15 timeframe.
## Key Features
- **Fully local AI inference.** The model is embedded inside the ex5 as a binary resource and loaded from the file itself at runtime — no `MQL5\Files`, no DLL, no network calls. Single-file upload, zero obstacles for Market validation.
- **6-leg combo strategy.** Five long legs (different confidence tiers) plus one dedicated short leg, triggered by the same neural network at different thresholds. Spreads entry timing and smooths the equity curve.
- **Built-in risk control.** Each trade uses ATR-based dynamic stop-loss / take-profit (in ATR multiples) with a time-exit (auto-close on timeout). Position size is calculated as a fraction of account equity and compounds automatically with the balance.
- **Adaptive symbol resolution.** `InpSymbol` auto-matches broker suffixes (e.g. `BTCUSDc`, `BTCUSDm`); leave blank to use the current chart symbol.
- **Low resource usage.** Features are computed incrementally inside the EA (monotonic queues + rolling statistics). No external history reads, no frequent indicator calls — light and stable in both backtest and live trading.
## Parameters
| Parameter | Description | Default |
|---|---|---|
| InpMagic | Magic number (base; leg n = base + n) | 20261019 |
| InpSymbol | Trading symbol (blank = chart symbol, auto-strips suffix) | BTCUSD |
| InpRiskLevel | Risk tier — equity fraction per trade, 9-step dropdown: 0.2% / 0.7% / 1.3% / 1.9% / 2.5% / 3.0% / 3.5% / 4.0% / 4.5% | 2.5% |
| InpEnableS1 ~ S5 | Five long-leg switches | On |
| InpEnableS6 | Dedicated short-leg switch | On |
> Signal timeframe (M15), model input dimension, and per-leg threshold / stop / target / hold are internally pre-tuned constants — no user adjustment needed.
## Setup
1. Drag `SunflowerEA.ex5` onto a **BTCUSD** **M15** chart (other chart symbols can also trade BTC automatically, but a BTC chart is recommended for complete data).
2. Choose a risk tier and toggle individual legs as desired.
3. Recommended starting capital: **a 10000-cent account (cent account, ~$100 USD)**, leverage ≥ 500, on a low-spread ECN account.
## Risk Warning
- This product is an algorithmically traded tool validated by historical backtests. **Past performance does not guarantee future results.** Cryptocurrency is highly volatile and carries a risk of substantial loss up to and including margin call / blow-up.
- Always validate thoroughly in the Strategy Tester first, then go live with small capital, and always use sensible position sizing and account risk control.
- This EA is tuned for high-volatility instruments like BTCUSD and is not recommended for forex or indices.
### ONNX Neural-Network BTCUSD Trading System
A trained deep-learning model is compiled directly into the EA as a single file — fully local inference, zero external dependencies, built-in multi-leg risk control. Designed for BTCUSD trend swings on the M15 timeframe.
## Key Features
- **Fully local AI inference.** The model is embedded inside the ex5 as a binary resource and loaded from the file itself at runtime — no `MQL5\Files`, no DLL, no network calls. Single-file upload, zero obstacles for Market validation.
- **6-leg combo strategy.** Five long legs (different confidence tiers) plus one dedicated short leg, triggered by the same neural network at different thresholds. Spreads entry timing and smooths the equity curve.
- **Built-in risk control.** Each trade uses ATR-based dynamic stop-loss / take-profit (in ATR multiples) with a time-exit (auto-close on timeout). Position size is calculated as a fraction of account equity and compounds automatically with the balance.
- **Adaptive symbol resolution.** `InpSymbol` auto-matches broker suffixes (e.g. `BTCUSDc`, `BTCUSDm`); leave blank to use the current chart symbol.
- **Low resource usage.** Features are computed incrementally inside the EA (monotonic queues + rolling statistics). No external history reads, no frequent indicator calls — light and stable in both backtest and live trading.
## Parameters
| Parameter | Description | Default |
|---|---|---|
| InpMagic | Magic number (base; leg n = base + n) | 20261019 |
| InpSymbol | Trading symbol (blank = chart symbol, auto-strips suffix) | BTCUSD |
| InpRiskLevel | Risk tier — equity fraction per trade, 9-step dropdown: 0.2% / 0.7% / 1.3% / 1.9% / 2.5% / 3.0% / 3.5% / 4.0% / 4.5% | 2.5% |
| InpEnableS1 ~ S5 | Five long-leg switches | On |
| InpEnableS6 | Dedicated short-leg switch | On |
> Signal timeframe (M15), model input dimension, and per-leg threshold / stop / target / hold are internally pre-tuned constants — no user adjustment needed.
## Setup
1. Drag `SunflowerEA.ex5` onto a **BTCUSD** **M15** chart (other chart symbols can also trade BTC automatically, but a BTC chart is recommended for complete data).
2. Choose a risk tier and toggle individual legs as desired.
3. Recommended starting capital: **a 10000-cent account (cent account, ~$100 USD)**, leverage ≥ 500, on a low-spread ECN account.
## Risk Warning
- This product is an algorithmically traded tool validated by historical backtests. **Past performance does not guarantee future results.** Cryptocurrency is highly volatile and carries a risk of substantial loss up to and including margin call / blow-up.
- Always validate thoroughly in the Strategy Tester first, then go live with small capital, and always use sensible position sizing and account risk control.
- This EA is tuned for high-volatility instruments like BTCUSD and is not recommended for forex or indices.
