OPEN-SOURCE SCRIPT
Qullamagi EMA Breakout Autotrade (Crypto Futures L+S)

Title: Qullamagi EMA Breakout – Crypto Autotrade
Overview
A crypto-focused, Qullamagi-style EMA breakout strategy built for autotrading on futures and perpetual swaps.
It combines a 5-MA trend stack (EMA 10/20, SMA 50/100/200), volatility contraction boxes, volume spikes and an optional higher-timeframe 200-MA filter. The script supports both long and short trades, partial take profit, trailing MA exits and percent-of-equity position sizing for automated crypto futures trading.
Key Features (Crypto)
Markets & Timeframes
Strategy Logic (Quick Summary)
Best Practices for Crypto
Webhook / Autotrade Integration
Important Notes & Disclaimer
Overview
A crypto-focused, Qullamagi-style EMA breakout strategy built for autotrading on futures and perpetual swaps.
It combines a 5-MA trend stack (EMA 10/20, SMA 50/100/200), volatility contraction boxes, volume spikes and an optional higher-timeframe 200-MA filter. The script supports both long and short trades, partial take profit, trailing MA exits and percent-of-equity position sizing for automated crypto futures trading.
Key Features (Crypto)
- Qullamagi MA Breakout Engine – trades only when price is aligned with a strong EMA/SMA trend and breaks out of a tight consolidation range. Longs use: Close > EMA10 > EMA20 > SMA50 > SMA100 > SMA200. Shorts are the mirror condition with all MAs sloping in the trend direction.
- Strict vs Loose Modes – Strict (Daily) is designed for cleaner swing trades on 1H–4H (full MA stack, box+ATR and volume filters, optional HTF filter). Loose (Intraday) focuses on 10/20/50 alignment with relaxed filters for more frequent 15m–30m signals.
- Volatility & Volume Filters for Crypto – ATR-based box height limit to detect volatility contraction, wide-candle filter to avoid chasing exhausted breakouts, and a volume spike condition requiring current volume to exceed an SMA of volume.
- Higher-Timeframe Trend Filter (Optional) – uses a 200-period SMA on a higher timeframe (default: 1D). Longs only when HTF close is above the HTF 200-SMA, shorts only when it is below, helping avoid trading against dominant crypto trends.
- Autotrade-Oriented Trade Management – position size as % of equity, initial stop anchored to a chosen MA (EMA10 / EMA20 / SMA50) with optional buffer, partial take profit at a configurable R-multiple, trailing MA exit for the remainder, and an optional cooldown after a full exit.
Markets & Timeframes
- Best suited for BTC, ETH and major altcoin futures/perpetuals (Binance, Bybit, OKX, etc.).
- Strict preset: 1H–4H charts for classic Qullamagi-style trend structure and fewer fake breakouts.
- Loose preset: 15m–30m charts for higher trade frequency and more active intraday trading.
- Always retune ATR length, box length, volume multiplier and position size for each symbol and exchange.
Strategy Logic (Quick Summary)
Long (Strict): MA stack in bullish alignment with all MAs sloping up → tight volatility box (ATR-based) → volume spike above SMA(volume) × multiplier → breakout above box high (close or intrabar) → optional HTF close above 200-SMA.
Short: Mirror logic: bearish MA stack, tight box, volume spike and breakdown below box low with optional HTF downtrend.
Best Practices for Crypto
- Backtest on each symbol and timeframe you plan to autotrade, including commissions and slippage.
- Start on higher timeframes (1H/4H) to learn the behavior, then move to 15m–30m if you want more signals.
- Use the higher-timeframe filter when markets are strongly trending to reduce counter-trend trades.
- Keep position-size percentage conservative until you fully understand the drawdowns.
- Forward-test / paper trade before connecting to live futures accounts.
Webhook / Autotrade Integration
- Designed to work with TradingView webhooks and external crypto trading bots.
- Alert messages include structured fields such as: EVENT=ENTRY / SCALE_OUT / EXIT, SIDE=LONG / SHORT, STRATEGY=Qullamagi_MA.
- Map each EVENT + SIDE combination to your bot logic (open long/short, partial close, full close, etc.) on your preferred exchange.
Important Notes & Disclaimer
Crypto markets are highly volatile and can change regime quickly. Backtest and forward-test thoroughly before using real capital. Higher timeframes generally produce cleaner MA structures and fewer fake breakouts.
This strategy is for educational and informational purposes only and does not constitute financial advice. Trading leveraged crypto products involves substantial risk of loss. Always do your own research, manage risk carefully, and never trade with money you cannot afford to lose.
开源脚本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免责声明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
开源脚本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免责声明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.