OPEN-SOURCE SCRIPT

Dual-Supertrend with MACD - Strategy [presentTrading]

## Introduction and How it is Different

The Dual-Supertrend with MACD strategy offers an amalgamation of two trend-following indicators (Supertrend 1 & 2) with a momentum oscillator (MACD). It aims to provide a cohesive and systematic approach to trading, eliminating the need for discretionary decision-making.

Key advantages over traditional single-indicator strategies:

- Dual Supertrend Validation: Utilizes two Supertrend indicators with different ATR periods and factors to confirm the trend direction. This double-check mechanism minimizes false signals.
- Momentum Confirmation: The MACD histogram acts as a momentum filter, confirming entries and exits, thus adding an extra layer of validation.
- Objective Entry and Exit: The strategy generates buy and sell signals based on a combination of trend direction and momentum, leaving no room for subjective interpretation.
- Automated Trade Management: The strategy includes built-in settings for commission, slippage, and initial capital, automating the trade execution process.
- Adaptability: The strategy allows for easy customization of all its parameters, adapting to a trader's specific needs and varying market conditions.

BTCUSD 8hr chart Long Condition
快照

BTCUSD 6hr chart Long Short Condition
快照

## Strategy, How it Works

The strategy operates on a set of clearly defined rules, primarily focusing on the trend direction confirmed by the Dual-Supertrend and the momentum as indicated by the MACD histogram.

### Entry Rules

- Long Entry: When both Supertrend indicators are bullish and the MACD histogram is above zero.
- Short Entry: When both Supertrend indicators are bearish and the MACD histogram is below zero.

### Exit Rules

- Exit long positions when either of the Supertrends turn bearish or the MACD histogram drops below zero.
- Exit short positions when either of the Supertrends turn bullish or the MACD histogram rises above zero.

### Trade Management

- The strategy uses a fixed commission rate and slippage in its calculations.
- Automated risk management features are integrated to avoid overexposure.

## Trade Direction

The strategy allows for trading in both bullish and bearish markets. Users can select their preferred trading direction ("long", "short", or "both") to align with their market outlook and trading objectives.

## Usage

- The strategy is best applied on timeframes where the trend is evident.
- Users can modify the ATR periods, factors for Supertrends, and MACD settings to suit their trading needs.

## Default Settings

- ATR Period for Supertrend 1: 10
- Factor for Supertrend 1: 3.0
- ATR Period for Supertrend 2: 20
- Factor for Supertrend 2: 5.0
- MACD Fast Length: 12
- MACD Slow Length: 26
- MACD Signal Smoothing: 9
- Commission: 0.1%
- Slippage: 1 point
- Trading Direction: Both

The strategy comes with these default settings to offer a balanced trading approach but can be customized according to individual trading preferences.
Moving Average Convergence / Divergence (MACD)presenttradingstrategysupertrendTrend Analysis

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?


Watch patiently/ then trade
更多:

免責聲明