OPEN-SOURCE SCRIPT
byquan GP maxmin+Supertrend

🔍 Overview
The GP MaxMin + Supertrend indicator is an advanced trend-following tool that combines the power of the Supertrend indicator with a multi-timeframe Stochastic RSI (SRSI) filter.
It aims to generate high-confidence buy and sell signals by confirming Supertrend breakouts only when the market’s momentum (based on SRSI) supports them.
In other words:
Supertrend gives you trend direction,
and SRSI ensures you only trade when the market is ready to move.
⚙️ How It Works
The indicator operates in three main layers:
1. SRSI Channel Analysis
It calculates Stochastic RSI values on four price sources:
Open
High
Low
Close
From these, it extracts both minimum (oversold) and maximum (overbought) SRSI readings.
To make the signal more robust, the script collects SRSI data from four different timeframes:
3 hours (180 minutes)
6 hours (360 minutes)
12 hours (720 minutes)
1 day
These multi-timeframe readings are averaged and normalized between 0 and 100.
Key thresholds:
Below 5 → Oversold zone (potential BUY zone)
Above 95 → Overbought zone (potential SELL zone)
2. Supertrend Core
The indicator uses a standard Supertrend logic:
ATR Period: 10
ATR Multiplier: 3.0
It dynamically plots the Supertrend line that shifts between bullish and bearish zones.
When the price crosses the Supertrend line, a trend change is detected:
From bearish to bullish → Buy signal
From bullish to bearish → Sell signal
3. SRSI-Based Signal Filtering
To avoid false breakouts, the Supertrend signals are filtered through the SRSI logic.
Here’s how it works:
When the market becomes oversold, the script records that event.
If a Supertrend Buy signal appears within a certain number of bars (default = 30) after that oversold event → the signal is validated.
The same applies for Sell signals after an overbought event.
This creates a smart “confirmation window,” ensuring that only those Supertrend signals that align with market momentum are displayed.
🧭 How to Use It
✅ Step 1: Add to Your Chart
Copy and paste the script into a new Pine Script editor window in TradingView, then click “Add to chart.”
✅ Step 2: Configure Parameters
SRSI Settings
K, D, RSI Length, S Length: Standard SRSI parameters.
Alert Min Level and Alert Max Level: Define overbought/oversold zones (default 5 and 95).
Timeframes: You can adjust the four MTF levels if you want faster or slower momentum confirmation.
Supertrend Settings
ATR Period: A higher value smooths the trend.
ATR Multiplier: Controls signal sensitivity (lower = more signals, higher = fewer).
Filter Settings
Signal Filter Window: Defines how long after an overbought/oversold event a Supertrend signal remains valid (default = 30 bars).
✅ Step 3: Interpret Signals
Signal Type Condition Interpretation
Buy Supertrend flips to bullish and SRSI was recently oversold Start of an uptrend
Sell Supertrend flips to bearish and SRSI was recently overbought Start of a downtrend
Each signal is marked on the chart:
🟢 Green “Buy” label → potential long entry
🔴 Red “Sell” label → potential short entry
You can also enable or disable background highlighting to visually track bullish/bearish zones.
✅ Step 4: Set Alerts
You can create alerts using the built-in alert condition:
SRSI-Filtered SuperTrend Signal Triggered!
This triggers whenever a filtered Buy or Sell signal appears.
💡 Trading Tips
Combine this indicator with price action or volume confirmation for best results.
Adjust the filter window to fit your preferred timeframe (short-term vs swing trading).
Avoid trading against higher-timeframe Supertrend direction.
⚖️ Advantages
✅ Filters out false Supertrend signals
✅ Uses multi-timeframe momentum confirmation
✅ Clean visual layout with clear entry markers
✅ Supports alerts for automation or notifications
⚠️ Limitations
⚠️ The indicator is computationally heavy due to multi-timeframe requests.
⚠️ It’s a confirmation tool — not a standalone strategy.
⚠️ Results depend on correct parameter tuning for your market and timeframe.
📈 Summary
The GP MaxMin + Supertrend is a hybrid indicator that blends trend detection with momentum filtering.
It helps traders:
Avoid false breakouts
Enter trades at better timing
Stay aligned with both trend and momentum
Perfect for swing traders, crypto traders, and anyone who wants cleaner Supertrend signals with deeper confirmation logic.
The GP MaxMin + Supertrend indicator is an advanced trend-following tool that combines the power of the Supertrend indicator with a multi-timeframe Stochastic RSI (SRSI) filter.
It aims to generate high-confidence buy and sell signals by confirming Supertrend breakouts only when the market’s momentum (based on SRSI) supports them.
In other words:
Supertrend gives you trend direction,
and SRSI ensures you only trade when the market is ready to move.
⚙️ How It Works
The indicator operates in three main layers:
1. SRSI Channel Analysis
It calculates Stochastic RSI values on four price sources:
Open
High
Low
Close
From these, it extracts both minimum (oversold) and maximum (overbought) SRSI readings.
To make the signal more robust, the script collects SRSI data from four different timeframes:
3 hours (180 minutes)
6 hours (360 minutes)
12 hours (720 minutes)
1 day
These multi-timeframe readings are averaged and normalized between 0 and 100.
Key thresholds:
Below 5 → Oversold zone (potential BUY zone)
Above 95 → Overbought zone (potential SELL zone)
2. Supertrend Core
The indicator uses a standard Supertrend logic:
ATR Period: 10
ATR Multiplier: 3.0
It dynamically plots the Supertrend line that shifts between bullish and bearish zones.
When the price crosses the Supertrend line, a trend change is detected:
From bearish to bullish → Buy signal
From bullish to bearish → Sell signal
3. SRSI-Based Signal Filtering
To avoid false breakouts, the Supertrend signals are filtered through the SRSI logic.
Here’s how it works:
When the market becomes oversold, the script records that event.
If a Supertrend Buy signal appears within a certain number of bars (default = 30) after that oversold event → the signal is validated.
The same applies for Sell signals after an overbought event.
This creates a smart “confirmation window,” ensuring that only those Supertrend signals that align with market momentum are displayed.
🧭 How to Use It
✅ Step 1: Add to Your Chart
Copy and paste the script into a new Pine Script editor window in TradingView, then click “Add to chart.”
✅ Step 2: Configure Parameters
SRSI Settings
K, D, RSI Length, S Length: Standard SRSI parameters.
Alert Min Level and Alert Max Level: Define overbought/oversold zones (default 5 and 95).
Timeframes: You can adjust the four MTF levels if you want faster or slower momentum confirmation.
Supertrend Settings
ATR Period: A higher value smooths the trend.
ATR Multiplier: Controls signal sensitivity (lower = more signals, higher = fewer).
Filter Settings
Signal Filter Window: Defines how long after an overbought/oversold event a Supertrend signal remains valid (default = 30 bars).
✅ Step 3: Interpret Signals
Signal Type Condition Interpretation
Buy Supertrend flips to bullish and SRSI was recently oversold Start of an uptrend
Sell Supertrend flips to bearish and SRSI was recently overbought Start of a downtrend
Each signal is marked on the chart:
🟢 Green “Buy” label → potential long entry
🔴 Red “Sell” label → potential short entry
You can also enable or disable background highlighting to visually track bullish/bearish zones.
✅ Step 4: Set Alerts
You can create alerts using the built-in alert condition:
SRSI-Filtered SuperTrend Signal Triggered!
This triggers whenever a filtered Buy or Sell signal appears.
💡 Trading Tips
Combine this indicator with price action or volume confirmation for best results.
Adjust the filter window to fit your preferred timeframe (short-term vs swing trading).
Avoid trading against higher-timeframe Supertrend direction.
⚖️ Advantages
✅ Filters out false Supertrend signals
✅ Uses multi-timeframe momentum confirmation
✅ Clean visual layout with clear entry markers
✅ Supports alerts for automation or notifications
⚠️ Limitations
⚠️ The indicator is computationally heavy due to multi-timeframe requests.
⚠️ It’s a confirmation tool — not a standalone strategy.
⚠️ Results depend on correct parameter tuning for your market and timeframe.
📈 Summary
The GP MaxMin + Supertrend is a hybrid indicator that blends trend detection with momentum filtering.
It helps traders:
Avoid false breakouts
Enter trades at better timing
Stay aligned with both trend and momentum
Perfect for swing traders, crypto traders, and anyone who wants cleaner Supertrend signals with deeper confirmation logic.
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.