OPEN-SOURCE SCRIPT
EMA & MACD Strategy with SL/TP

English
This indicator is a trend-following tool designed to identify high-probability entry points by combining a 200 EMA trend filter with a 15 EMA (High/Low) channel and MACD momentum. It also features automatic Stop Loss (SL) and Take Profit (TP) line plotting based on a customizable risk-reward ratio.
Key Features:
Trend Filter: Uses 200 EMA to determine the major trend direction.
Dynamic Channel: Uses 15 EMA High/Low as a "trading zone" to identify breakouts.
Momentum Confirmation: Uses MACD Histogram to ensure momentum is in your favor.
SL/TP Visualization: Automatically plots exit levels. Stop Loss is set at the opposite side of the EMA channel.
Flexible Alerts: Built-in alerts for both Buy and Sell signals with a customizable lookback period for signal alignment.
How to Use:
Long: Price and Channel are above 200 EMA + MACD Histogram is positive + Price breaks above 15 EMA High.
Short: Price and Channel are below 200 EMA + MACD Histogram is negative + Price breaks below 15 EMA Low.
日本語説明
このインジケーターは、200EMAによる環境認識に加え、15EMA(High/Low)のチャネルとMACDを組み合わせた順張り専用のトレンドフォローツールです。利確・損切りのラインを自動描写する機能を備えており、視覚的にトレードプランを立てることが可能です。
主な機能:
トレンドフィルター: 200EMAより上で買い、下で売りに限定。
ダイナミックチャネル: 15EMAの上下限をブレイクアウトのトリガーとして使用。
モメンタム確認: MACDヒストグラムが0ラインの適切な側にあることを条件に追加。
出口戦略の可視化: 損切り(チャネルの反対側)と利確(リスクリワード比に基づく)を自動表示。
柔軟なアラート: 価格とMACDのクロスが数本ズレても検知できる有効期限設定付き。
This indicator is a trend-following tool designed to identify high-probability entry points by combining a 200 EMA trend filter with a 15 EMA (High/Low) channel and MACD momentum. It also features automatic Stop Loss (SL) and Take Profit (TP) line plotting based on a customizable risk-reward ratio.
Key Features:
Trend Filter: Uses 200 EMA to determine the major trend direction.
Dynamic Channel: Uses 15 EMA High/Low as a "trading zone" to identify breakouts.
Momentum Confirmation: Uses MACD Histogram to ensure momentum is in your favor.
SL/TP Visualization: Automatically plots exit levels. Stop Loss is set at the opposite side of the EMA channel.
Flexible Alerts: Built-in alerts for both Buy and Sell signals with a customizable lookback period for signal alignment.
How to Use:
Long: Price and Channel are above 200 EMA + MACD Histogram is positive + Price breaks above 15 EMA High.
Short: Price and Channel are below 200 EMA + MACD Histogram is negative + Price breaks below 15 EMA Low.
日本語説明
このインジケーターは、200EMAによる環境認識に加え、15EMA(High/Low)のチャネルとMACDを組み合わせた順張り専用のトレンドフォローツールです。利確・損切りのラインを自動描写する機能を備えており、視覚的にトレードプランを立てることが可能です。
主な機能:
トレンドフィルター: 200EMAより上で買い、下で売りに限定。
ダイナミックチャネル: 15EMAの上下限をブレイクアウトのトリガーとして使用。
モメンタム確認: MACDヒストグラムが0ラインの適切な側にあることを条件に追加。
出口戦略の可視化: 損切り(チャネルの反対側)と利確(リスクリワード比に基づく)を自動表示。
柔軟なアラート: 価格とMACDのクロスが数本ズレても検知できる有効期限設定付き。
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.