NEWCard payments are live · from $18/month, USDT also acceptedSee plans
COINPRED / STRATEGY LIBRARY

Ethereum MACD ATR Trailing Strategy: Ribbon Filter, Scaled Exits and Setup

WunderTrading open-source (MPL 2.0, © Deobald) MACD strategy: EMA/SMA filter, ATR stop, two TPs, author ETHUSDT 30m chart, setup. No invented stats.

Illustrated guidesPine Script®Included with monthly & annual plans
← All strategies
WunderTrading · 3.0 · 2026-10-29 · Trend following
Ethereum MACD ATR Trailing Strategy: Ribbon Filter, Scaled Exits and Setup

What problem this strategy targets

Raw MACD crosses fail often in downtrends. This WunderTrading MACD strategy only longs when MACD crosses above its signal while EMA > SMA (same length ribbon), then manages exits with an ATR trailing-style stop and two percent take-profit tranches.

Pine v5 strategy(). Author showcase: BINANCE:ETHUSDT, 30m. Source copyright line © Deobald; published under WunderTrading.

Author ETHUSDT 30m MACD ATR strategy chart
Author showcase: BINANCE:ETHUSDT, 30m. Not a Coinpred backtest.

Logic overview

Period 34 builds EMA/SMA ribbon and MACD; Signal Smoothing default 2; ATR period 17; SL = entry − 2.2×ATR.

Entries

  • Long on MACD cross over signal with leadLine2 < leadLine1.
  • No short entry branch in the source.

Exits, stops, take-profit, sizing

  • Close long if close < floating ATR stop.
  • TP1 default +1% for 10% qty; TP2 default +5% for 50% qty.
  • pyramiding=2 in strategy().

Parameters (source defaults)

InputDefaultRole
Period34MACD + EMA/SMA length
Signal Smoothing2MACD signal
Long Take Profit 1 % / Qty1 / 10First TP tranche
Long Take Profit 2 % / Qty5 / 50Second TP tranche
SL Multiplier2.2ATR stop multiple
ATR period17ATR length

Markets, timeframes, limits

  • Author showcase: ETHUSDT 30m; BTC unchecked here.
  • Long-only.
  • Custom Atr() smoother ≠ ta.atr exactly.
  • Repaint and partial TP fills not verified by Coinpred.

TradingView setup guide

  1. Download the .pine file from Coinpred (membership required; see below) or compare with the original publication page.
  2. Open TradingView → Pine Editor, create a blank script, paste the full source, then save.
  3. Click Add to chart. Confirm it is a strategy() script so the Strategy Tester is available.
  4. Review defaults in the Inputs panel using the parameter table below, then tune for your symbol and timeframe.
  5. Inspect signals in the Strategy Tester before wiring alerts. Historical curves are not a promise of future results.

Verification and backtests

Download rights and version notes

  • Author: WunderTrading(源码 © Deobald); original title: MACD Strategy; version: 3.0 (pine-facade).
  • License: MPL 2.0; Coinpred ships the unmodified full source file.
  • Original page: https://www.tradingview.com/script/2jDHQAJc-MACD-Strategy-with-trailing-ATR-stop/
  • Pine version: v5; type: strategy().
  • Charts are author showcase images; image rights are outside MPL and captions are labeled accordingly.
  • Downloads follow Coinpred membership rules; modified source files must remain under MPL 2.0.

Source, license and version

Mozilla Public License 2.0 (MPL 2.0),© Deobald(发布账号 WunderTrading)。Mozilla Public License 2.0 (MPL 2.0),依据原脚本源码许可声明。再分发须保留原版权与许可声明;如修改源码文件,修改后的文件仍须按 MPL 2.0 提供。Coinpred 未修改源码。 / Licensed under MPL 2.0 per the source header. Redistribution must keep copyright and license notices; modified files must remain under MPL 2.0. Coinpred ships the unmodified source.

View original source ↗

Check the script license and your TradingView account features. Historical results do not guarantee future performance.