Skip to main content

Multi Time Frame Supertrend (Advanced Pine) – Mirrorpip Integration Guide

Overview

The Multi Time Frame Supertrend (Advanced Pine) strategy allows traders to combine Supertrend signals from up to four different timeframes and generate highly filtered trade entries. Unlike a standard Supertrend strategy that relies on a single timeframe, this version requires alignment across multiple timeframes before entering a trade, helping reduce false signals and improve trend confirmation. Mirrorpip integration is already included in the script, so no code modifications are required. here is the source code of the strategy\

Key Features

1. Multiple Timeframe Selection

You can select between 1 and 4 different timeframes. Examples:
  • 5 Minute
  • 15 Minute
  • 1 Hour
  • 4 Hour
Use only the timeframes that fit your trading style.

2. Independent Supertrend Parameters

Each selected timeframe can have its own:
  • ATR Period
  • Multiplier
Example: This flexibility allows you to create customized trend filters for every timeframe.

Entry Logic

Buy Entry

A Buy signal is generated only when: ✅ Supertrend is bullish on Timeframe 1 AND ✅ Supertrend is bullish on Timeframe 2 AND ✅ Supertrend is bullish on Timeframe 3 AND ✅ Supertrend is bullish on Timeframe 4 (Only the timeframes enabled by the user are considered.) If even one selected timeframe is bearish, no Buy trade will be taken.

Short Entry

A Short signal is generated only when: ✅ Supertrend is bearish on all selected timeframes. This ensures complete trend alignment before entering a short trade.

Exit Logic

The strategy exits a position immediately if any one of the selected Supertrends reverses direction.

Long Position Exit

Exit occurs when:
  • Any selected Supertrend turns bearish
OR
  • Target is reached
OR
  • Stop Loss is hit
OR
  • Trailing Stop Loss is triggered
Whichever occurs first.

Short Position Exit

Exit occurs when:
  • Any selected Supertrend turns bullish
OR
  • Target is reached
OR
  • Stop Loss is hit
OR
  • Trailing Stop Loss is triggered
Whichever occurs first.

Risk Management Options

The strategy supports:

Target (TGT)

Profit booking level. Can be configured in:
  • Points
  • Percentage

Stop Loss (SL)

Risk protection level. Can be configured in:
  • Points
  • Percentage

Trailing Stop Loss (TSL)

Locks profits as the trade moves in your favor. Can be configured in:
  • Points
  • Percentage

Mirrorpip Setup

Mirrorpip integration is already built into the strategy. No code changes are required.

Step 1: Add the Strategy

Add the Multi Time Frame Supertrend strategy to your TradingView chart.

Step 2: Configure Exchange

Open strategy settings and select your preferred exchange from the Mirrorpip parameters. Examples:
  • Binance
  • Bybit
  • OKX
  • Delta Exchange
  • Other supported exchanges
Select the exchange where Mirrorpip should execute orders.

Step 3: Configure Strategy Parameters

Set:
  • Number of timeframes to use
  • Timeframe values
  • ATR periods
  • Multipliers
  • Target
  • Stop Loss
  • Trailing Stop Loss

Step 4: Create TradingView Alert

  1. Click Create Alert
  2. Select the strategy alert condition
  3. Choose Any alert() function call
  4. Enable webhook URL
  5. Enter your Mirrorpip webhook URL
Use the webhook URL provided in your Mirrorpip account dashboard.

Step 5: Activate

Save the alert and ensure it remains active. Once enabled:
  • Buy entries will be sent automatically when all selected Supertrends are bullish.
  • Short entries will be sent automatically when all selected Supertrends are bearish.
  • Exit orders will be sent automatically whenever Target, Stop Loss, Trailing Stop Loss, or a Supertrend reversal condition occurs.

Best Use Cases

This strategy is ideal for traders who want:
  • Strong trend confirmation
  • Reduced false entries
  • Multi-timeframe analysis
  • Fully automated execution through Mirrorpip
  • Built-in risk management with TGT, SL, and TSL
By requiring alignment across multiple timeframes, the strategy helps traders participate only in high-conviction trends while maintaining disciplined exits through both trend reversals and predefined risk controls.