The Lazy Trader - Index (ETF) Trend Following Robot50/150 moving average, index (ETF) trend following robot. Coded for people who cannot psychologically handle dollar-cost-averaging through bear markets and extreme drawdowns (although DCA can produce better results eventually), this robot helps you to avoid bear markets. Be a fair-weathered friend of Mr Market, and only take up his offer when the sun is shining! Designed for the lazy trader who really doesn't care...
Recommended Chart Settings:
Asset Class: ETF
Time Frame: Daily
Necessary ETF Macro Conditions:
a) Country must have healthy demographics, good ratio of young > old
b) Country population must be increasing
c) Country must be experiencing price-inflation
Default Robot Settings:
Slow Moving Average: 50 (integer) //adjust to suit your underlying index
Fast Moving Average: 150 (integer) //adjust to suit your underlying index
Bullish Slope Angle: 5 (degrees) //up angle of moving averages
Bearish Slope Angle: -5 (degrees) //down angle of moving averages
Average True Range: 14 (integer) //input for slope-angle formula
Risk: 100 (%) //100% risk means using all equity per trade
ETF Test Results (Default Settings):
SPY (1993 to 2020, 27 years), 332% profit, 20 trades, 6.4 profit factor, 7% drawdown
EWG (1996 to 2020, 24 years), 310% profit, 18 trades, 3.7 profit factor, 10% drawdown
EWH (1996 to 2020, 24 years), 4% loss, 26 trades, 0.9 profit factor, 36% drawdown
QQQ (1999 to 2020, 21 years), 232% profit, 17 trades, 3.6 profit factor, 2% drawdown
EEM (2003 to 2020, 17 years), 73% profit, 17 trades, 1.1 profit factor, 3% drawdown
GXC (2007 to 2020, 13 years), 18% profit, 14 trades, 1.3 profit factor, 26% drawdown
BKF (2009 to 2020, 11 years), 11% profit, 13 trades, 1.2 profit factor, 33% drawdown
A longer time in the markets is better, with the exception of EWH. 6 out of 7 tested ETFs were profitable, feel free to test on your favourite ETF (default settings) and comment below.
Risk Warning:
Not tested on commodities nor other financial products like currencies (code will not work), feel free to leave comments below.
Moving Average Slope Angle Formula:
Reproduced and modified from source:
Search in scripts for "科创50成分股"
50 & 200 SMA + RSI Average Strategy (Long Only, Single Trade)It works better in trending markets. It delivers its best performance in the 4-hour to 1-day timeframes.
50-Minute Opening Range BreakoutThis is a test of the opening range with Bearish/Bullish confirmation
50-Line Oscillator // (\_/)
// ( •.•)
// (")_(")
25-Line Oscillator
Description:
The 25-Line Oscillator is a sophisticated technical analysis tool designed to visualize market trends through the use of multiple Simple Moving Averages (SMAs). This indicator computes a series of 26 SMAs, incrementally increasing the base length, providing traders with a comprehensive view of price dynamics.
Features:
Customizable Base Length: Adjust the base length of the SMAs according to trading preferences, enhancing versatility for different market conditions.
Rainbow Effect: The indicator employs a visually appealing rainbow color scheme to differentiate between the various trend lines, making it easy to identify crossovers and momentum shifts.
Crossovers Detection: The script includes logic to detect crossover events between consecutive trend lines, which can serve as signals for potential entry or exit points in trading.
Clear Visualization: Suitable for both novice and seasoned traders, the plots enable quick interpretation of trends and market behavior.
How to Use:
Add the indicator to your chart and customize the base length as desired.
Observe the rainbow-colored lines for trend direction.
Look for crossover events between the SMAs as potential trading signals.
Application: This indicator is particularly useful for swing traders and trend followers who aim to capitalize on market momentum and identify reversals. By monitoring the behavior of multiple SMAs, traders can gain insights into the strength and direction of price movements over various time frames.
AK Simple Moving Average 50 days Simple Moving average suitable for Intraday on 1Hr,30Min.15Min Time frames
1. When candle crossing above SMA Line - Go for Long Entries
2. When candle crossing below SMA Line - Go for short Entries
50 SMA / 200 EMA / 128EMA Moving Average CrossFound success using 50SMA vs 200EMA.
128 EMA also charted for it's BTC relevance.
50/100/200 Moving Averages (Pine Script For Copy)by fresca
SCRIPT LANGUAGE
Copy script below and adjust based on your preferences.
-function (change function from "sma" to "ema", "wma" and more)
-length (25 Day, 150 Day or add more averages to the three in this script.)
-color, (red, yellow, etc. or use color hex codes i.e. #FEDA15, #FFAD8F, etc.)
-transparency (set to desired level 1-100)
Or add more options.
RESOURCES
Color hex codes site: www.canva.com
Trading View Pine Script Editor Reference Guide: www.tradingview.com
Taint's Multi Time Frame MA50-100-200 SMA with two 200 EMA's all with the ability choose a time frame for each.
Multi-MA + RSI Pullback Strategy (Jordan)1️⃣ Strategy logic I’ll code
From your screenshots:
Indicators
• EMAs: 600 / 200 / 100 / 50
• RSI: length 6, levels 80 / 20
Rules (simplified so a script can handle them):
• Use a higher-timeframe trend filter (15m or 1h) using the EMAs.
• Take entries on the chart timeframe (you can use 1m or 5m).
• Long:
• Higher-TF trend is up.
• Price is pulling back into a zone (between 50 EMA and 100 EMA on the entry timeframe – this approximates your 50–61% retrace).
• RSI crosses below 20 (oversold).
• Short:
• Higher-TF trend is down.
• Price pulls back between 50 & 100 EMAs.
• RSI crosses above 80 (overbought).
• Exits: ATR-based stop + take-profit with adjustable R:R (2:1 or 3:1).
• Max 4 trades per day.
News filter & “only trade gold” you handle manually (run it on XAUUSD and avoid news times yourself – TradingView can’t read the economic calendar from code).
In-Range Rolling SL
In-Range Rolling SL Indicator Guide
The In-Range Rolling SL indicator is a dynamic stop-loss system designed for intraday trading that identifies squeeze conditions and trade entry opportunities based on rolling price windows.
Core Concept
The indicator analyzes the highest high and lowest low over a defined lookback period (default: 2 candles) to establish an "in-range" zone. When price stays within this range without breaking either boundary, it creates a squeeze condition—signaling potential breakout opportunities.
Trading Strategy
Wait for the Squeeze Setup
The most effective approach is to wait for the in-range stop-loss squeeze to form. This occurs when both the long SL (green line) and short SL (red line) are active simultaneously, indicated by the yellow status dot (🟡) in the indicator table. Analyze the wick high/close relationship against the in-range SL while price remains compressed—this setup identifies which side is more likely to break first.
Entry Timing and Risk Management
Long Entry: Enter when a candle closes above the in-range short SL (red line) without any wick above it. This "perfect breakout candle" confirms bullish momentum. Your entry should be around the region, with your stop-loss placed just below the top of the breakout candle's high.
Short Entry: Enter when a candle closes below the in-range long SL (green line). The stop-loss for short trades should be set 34.26 points above your entry for appropriate risk protection.
Risk-Reward Considerations
If you enter at the low of a breakout candle, expect only 8.26 points of drawdown potential. However, if you accidentally go long and your stop gets hit, you'll experience the full in-range stop-loss distance as your loss.
Advanced Techniques
Failed Breakout Trap: If a follow-up candle doesn't make a higher high after the initial breakout, consider adding a "winner" for compensation rather than holding for a trap. When your buy-stop sits on top of the breakout candle high, this isn't a valid long trade setup.
Flip Trade Opportunity: In-range stop-loss attempts to flip often provide ideal entry points. If the up candle doesn't break the previous low, this validates the long continuation.
Long Scalp Trading: A failed long scalp can be traded if you missed the initial market open down-up-down trend. With a stop-loss of 34 points and potential profit exceeding 50 points, this provides favorable risk-reward ratios.
Sustained Loss Management: Stop-loss for long positions should target 26 points maximum loss. The indicator automatically invalidates stop-losses when price violates them, keeping your chart clean for the next setup.
-------------------------
In-Range Rolling SL Indicator Guide
The In-Range Rolling SL indicator is a dynamic stop-loss system designed for intraday trading that identifies squeeze conditions and breakout opportunities based on rolling price windows.
How the Indicator Works
The indicator tracks the highest high and lowest low over your selected lookback period (default: 2 candles) to establish dynamic support and resistance levels. These levels create an "in-range" zone that adapts as new price action develops.
Visual Components
Green Line (Long SL): The rolling window's lowest low - your stop-loss level for long positions
Red Line (Short SL): The rolling window's highest high - your stop-loss level for short positions
Status Indicators:
🟡 Yellow: Squeeze condition (both SLs active)
🟢 Green: Long-only setup
🔴 Red: Short-only setup
⚪ White: Neutral (no active SLs)
The Squeeze Setup Strategy
Step 1: Wait for the Squeeze
The most effective way to use the In-Range Rolling SL is to wait for the in-range stop-loss squeeze to form. During the squeeze, both the green and red lines are active, meaning price has stayed within the rolling window without breaking either boundary. This compression phase indicates that it's "go time" to prepare your trade.
While in the squeeze, analyze the wick high/close relationship against the in-range SL levels. This analysis helps you determine which side is more likely to split when the breakout occurs.
Step 2: Identify the Perfect Breakout
Long Breakout: A perfect breakout candle should close above the in-range stop-loss high (red line) without any wick above it. This clean breakout demonstrates strong momentum and reduces the risk of a false breakout.
Short Breakout: Look for a candle that closes below the in-range SL low (green line), indicating a short-side trade is coming up.
Step 3: Entry Execution
Long Entry: Your entry should be around the region of the breakout. Position your stop-loss just below the top of the breakout candle's high. This placement protects you from failed breakouts while giving the trade room to develop.
Short Entry: Enter as the candle closes below the in-range SL low. The stop-loss for short-side trades is typically 34.26 points of potential loss based on the indicator's measurements.
Risk-Reward Analysis
Entry at Breakout Low
If you enter here at the low of the breakout candle, you're looking at only 8.26 points of drawdown potential. This represents your best-case entry scenario.
Accidental Wrong-Side Entry
However, if you accidentally go long here and your stop gets hit, you'll experience the full in-range stop-loss distance as your loss. This emphasizes the importance of waiting for clear breakout confirmation.
Long Scalp Opportunity
A failed long scalp can be traded here if you missed the market open down-up-down trend. With a stop-loss of 34 points and potential profit greater than 50 points, this setup offers a favorable risk-reward ratio of approximately 1:1.5.
Advanced Trade Management
Failed Breakout Recognition
Follow-Up Candle Validation: If a follow-up candle did not make a higher high than the breakout candle, this could be a trap. Your buy-stop on top of the breakout candle high is not a valid long trade setup in this scenario. Consider adding a "winner" for compensation rather than holding through the potential reversal.
Flip Trade Opportunities
In-range stop-loss tries to flip to the other side often provide excellent entries. If the up candle did not break the previous low, this validates the long continuation and suggests the squeeze is resolving to the upside.
Sustained Position Management
Stop-Loss Guidelines: Stop-loss for long positions should be 26 points of maximum loss. The indicator table displays the delta (Δ) showing your real-time distance to the active stop-loss, helping you manage risk dynamically.
Entry Timing: Your entry should be around the region where the breakout confirms, rather than chasing price after a large move. In order to prepare your trade, position your stop-loss on top of the breakout candle's high for long trades.
Practical Example from the Chart
Looking at the MNQ1! chart, you can see multiple squeeze formations throughout the session. The most notable sequence shows:
An initial downtrend creating a squeeze setup
A perfect breakout candle closing above the red line without upper wick
The subsequent candle validating the move
Later, a failed breakout attempt that created a short opportunity
Multiple flip attempts that provided re-entry points for scalpers
The indicator's table in the top-right continuously updates with the current SL levels, gap size, candle size, and delta values - giving you all the information needed to assess each trade's risk-reward profile in real-time.
Trend Following $BTC - Multi-Timeframe Structure + ReversTREND FOLLOWING STRATEGY - MULTI-TIMEFRAME STRUCTURE BREAKOUT SYSTEM
Strategy Overview
This is an enhanced Turtle Trading system designed for cryptocurrency spot trading. It combines Donchian Channel breakouts with multi-timeframe structure filtering and ATR-based dynamic risk management. The strategy trades both long and short positions using reverse signal exits to maximize trend capture.
Core Features
Multi-Timeframe Structure Filtering
The strategy uses Swing High/Low analysis to identify market structure trends. You can customize the structure timeframe (default: 3 minutes) to match your trading style. Only enters trades aligned with the identified trend direction, avoiding counter-trend positions that often lead to losses.
Reverse Signal Exit System
Instead of using fixed stop-losses or time-based exits, this strategy exits positions only when a reverse entry signal triggers. This approach maximizes trend profits and reduces premature exits during normal market retracements.
ATR Dynamic Pyramiding
Automatically adds positions when price moves 0.5 ATR in your favor. Supports up to 2 units maximum (adjustable). This pyramid scaling enhances profitability during strong trends while maintaining disciplined risk management.
Complete Risk Management
Fixed position sizing at 5000 USD per unit. Includes realistic commission fees of 0.06% (Binance spot rate). Initial capital set at 10,000 USD. All backtest parameters reflect real-world trading conditions.
Trading Logic
Entry Conditions
Long Entry: Close price breaks above the 20-period high AND structure trend is bullish (price breaks above Swing High)
Short Entry: Close price breaks below the 20-period low AND structure trend is bearish (price breaks below Swing Low)
Position Scaling
Long positions: Add when price rises 0.5 ATR or more
Short positions: Add when price falls 0.5 ATR or more
Maximum 2 units including initial entry
Exit Conditions
Long Exit: Triggers when short entry signal appears (price breaks 20-period low + structure turns bearish)
Short Exit: Triggers when long entry signal appears (price breaks 20-period high + structure turns bullish)
Default Parameters
Channel Settings
Entry Channel Period: 20 (Donchian Channel breakout period)
Exit Channel Period: 10 (reserved parameter)
ATR Settings
ATR Period: 20
Stop Loss ATR Multiplier: 2.0
Add Position ATR Multiplier: 0.5
Structure Filter
Swing Length: 300 (Swing High/Low calculation period)
Structure Timeframe: 3 minutes
Adjust these based on your trading timeframe and asset volatility
Position Management
Maximum Units: 2 (including initial entry)
Capital Per Unit: 5000 USD
Visualization Features
Background Colors
Light Green: Bullish market structure
Light Red: Bearish market structure
Dark Green: Long position entry
Dark Red: Short position entry
Optional Display Elements (Default: OFF)
Entry and exit channel lines
Structure high/low reference lines
ATR stop-loss indicator
Next position add level
Entry/exit labels
Alert Message Format
The strategy sends notifications with the following format:
Entry: "5m Long EP:90450.50"
Add Position: "15m Add Long 2/2 EP:91000.25"
Exit: "5m Close Long Reverse Signal"
Where the first part shows your current chart timeframe and EP indicates Entry Price
Backtest Settings
Capital Allocation
Initial Capital: 10,000 USD
Per Entry: 5,000 USD (split into 2 potential entries)
Leverage: 0x (spot trading only)
Trading Costs
Commission: 0.06% (Binance spot VIP0 rate)
Slippage: 0 (adjust based on your experience)
Best Use Cases
Ideal Scenarios
Trending markets with clear directional movement
Moderate to high volatility assets
Timeframes from 1-minute to 4-hour charts
Best suited for major cryptocurrencies with good liquidity
Not Recommended For
Highly volatile choppy/ranging markets
Low liquidity small-cap coins
Extreme market conditions or black swan events
Usage Recommendations
Timeframe Guidelines
1-5 minute charts: Use for scalping, consider Swing Length 100-160
15-30 minute charts: Good for short-term trading, Swing Length 50-100
1-4 hour charts: Suitable for swing trading, Swing Length 20-50
Optimization Tips
Always backtest on historical data before live trading
Adjust swing length based on asset volatility and your timeframe
Different cryptocurrencies may require different parameter settings
Enable visualization options initially to understand entry/exit points
Monitor win rate and drawdown during backtesting
Technical Details
Built on Pine Script v6
No repainting - uses proper bar referencing with offset
Prevents lookahead bias with lookahead=off parameter
Strategy mode with accurate commission and slippage modeling
Multi-timeframe security function for structure analysis
Proper position state tracking to avoid duplicate signals
Risk Disclaimer
This strategy is provided for educational and research purposes only. Past performance does not guarantee future results. Backtesting results may differ from live trading due to slippage, execution delays, and changing market conditions. The strategy performs best in trending markets and may experience drawdowns during ranging conditions. Always practice proper risk management and never risk more than you can afford to lose. It is recommended to paper trade first and start with small position sizes when going live.
How to Use
Add the strategy to your TradingView chart
Select your desired timeframe (1m to 4h recommended)
Adjust parameters based on your risk tolerance and trading style
Review backtest results in the Strategy Tester tab
Set up alerts for automated notifications
Consider paper trading before risking real capital
Tags
Trend Following, Turtle Trading, Donchian Channel, Structure Breakout, ATR, Cryptocurrency, Spot Trading, Risk Management, Pyramiding, Multi-Timeframe Analysis
---
Strategy Name: Trend Following BTC
Version: v1.0
Pine Script Version: v6
Last Updated: December 2025
Tomb Reversal Signal Engulfing + RSI Momentum DetectorTomb is a fast and minimalistic reversal-detection indicator built to capture high-probability turning points in the market.
It combines engulfing candlestick patterns, a strong candle body filter, and RSI momentum analysis to generate precise BUY and SELL signals with minimal noise.
🔍 How it Works
The indicator triggers:
✅ BUY Signal
Bullish engulfing pattern appears
Candle body strength > 50% of total range (real momentum)
RSI below 50 (bearish momentum weakening)
Price decreasing over the last 5 bars (down-trend exhaustion)
✅ SELL Signal
Bearish engulfing pattern
Candle body shows strength
RSI above 50 (bullish momentum weakening)
Price increasing over the last 5 bars (up-trend exhaustion)
⚡ Why Tomb Works
Filters out weak signals using candle structure
Detects momentum shifts early
Works on all markets: Crypto, Forex, Indices, Stocks
Ideal for scalping, day trading, or swing trading
🎯 Purpose
To highlight the exact moments where the market shows exhaustion and is ready to reverse—before most traders see it.
📌 Recommended Use
For best performance:
Combine with trend tools such as EMA 200 or market structure
Look for signals at support/resistance or liquidity zones
Trend Following $ZEC - Multi-Timeframe Structure Filter + Revers# Trend Following CRYPTOCAP:ZEC - Strategy Guide
## 📊 Strategy Overview
Trend Following CRYPTOCAP:ZEC is an enhanced Turtle Trading system designed for cryptocurrency spot trading, combining Donchian Channel breakouts, multi-timeframe structure filtering, and ATR-based dynamic risk management for both long and short positions.
---
## 🎯 Core Features
1. Multi-Timeframe Structure Filtering
- Uses Swing High/Low to identify market structure
- Customizable structure timeframe (default: 1 minute)
- Only enters trades in the direction of the trend, avoiding counter-trend positions
2. Reverse Signal Exit
- No fixed stop-loss or fixed-period exits
- Exits only when a reverse entry signal triggers
- Maximizes trend profits, reduces premature exits
3. ATR Dynamic Pyramiding
- Adds positions when price moves 0.5 ATR in favorable direction
- Supports up to 2 units maximum (adjustable)
- Pyramid scaling to enhance profitability
4. Complete Risk Management
- Fixed position size (5000 USD per unit)
- Commission fee 0.06% (Binance spot rate)
- Initial capital 10,000 USD
---
## 📈 Trading Logic
Entry Conditions
✅ Long Entry:
- Close price breaks above 20-period high
- Structure trend is bullish (price breaks above Swing High)
✅ Short Entry:
- Close price breaks below 20-period low
- Structure trend is bearish (price breaks below Swing Low)
Add Position Conditions
- Long: Price rises ≥ 0.5 ATR
- Short: Price falls ≥ 0.5 ATR
- Maximum 2 units including initial entry
Exit Conditions
- Long Exit: When short entry signal triggers (price breaks 20-period low + structure turns bearish)
- Short Exit: When long entry signal triggers (price breaks 20-period high + structure turns bullish)
---
## ⚙️ Parameter Settings
Channel Settings
- Entry Channel Period: 20 (Donchian Channel breakout period)
- Exit Channel Period: 10 (reserved parameter, actually uses reverse signal exit)
ATR Settings
- ATR Period: 20
- Stop Loss ATR Multiplier: 2.0 (reserved parameter)
- Add Position ATR Multiplier: 0.5
Structure Filter
- Swing Length: 160 (Swing High/Low calculation period)
- Structure Timeframe: 1 minute (can change to 5/15/60, etc.)
Position Management
- Maximum Units: 2 (including initial entry)
- Capital Per Unit: 5000 USD
---
## 🎨 Visualization Features
Background Colors
- Light Green: Bullish structure
- Light Red: Bearish structure
- Dark Green: Long entry
- Dark Red: Short entry
Optional Display (Default: OFF)
- Entry/exit channel lines
- Structure high/low lines
- ATR stop-loss line
- Next add position indicator
- Entry/exit labels
---
## 📱 Alert Message Format
Strategy sends notifications on entry/exit with the following format:
- Entry: `1m Long EP:428.26`
- Add Position: `15m Add Long 2/2 EP:429.50`
- Exit: `1m Close Long Reverse Signal`
Where:
- `1m`/`15m` = Current chart timeframe
- `EP` = Entry Price
---
## 💰 Backtest Settings
Capital Allocation
- Initial Capital: 10,000 USD
- Per Entry: 5,000 USD (split into 2 entries)
- Leverage: 0x (spot trading)
Trading Costs
- Commission: 0.06% (Binance spot VIP0)
- Slippage: 0
---
## 🎯 Use Cases
✅ Best Scenarios
- Trending markets
- Moderate volatility assets
- 1-minute to 4-hour timeframes
⚠️ Not Suitable For
- Highly volatile choppy markets
- Low liquidity small-cap coins
- Extreme market conditions (black swan events)
---
## 📊 Usage Recommendations
Timeframe Suggestions
| Timeframe | Trading Style | Suggested Parameter Adjustment |
|-----------|--------------|-------------------------------|
| 1-5 min | Scalping | Swing Length 100-160 |
| 15-30 min | Short-term | Swing Length 50-100 |
| 1-4 hour | Swing Trading | Swing Length 20-50 |
Optimization Tips
1. Adjust swing length based on backtest results
2. Different coins may require different parameters
3. Recommend backtesting on 1-minute chart first before live trading
4. Enable labels to observe entry/exit points
---
## ⚠️ Risk Disclaimer
1. Past Performance Does Not Guarantee Future Results
- Backtest data is for reference only
- Live trading may be affected by slippage, delays, etc.
2. Market Condition Changes
- Strategy performs better in trending markets
- May experience frequent stops in ranging markets
3. Capital Management
- Do not invest more than you can afford to lose
- Recommend setting total capital stop-loss threshold
4. Commission Impact
- Frequent trading accumulates commission fees
- Recommend using exchange discounts (BNB fee reduction, etc.)
---
## 🔧 Troubleshooting
Q: No entry signals?
A: Check if structure filter is too strict, adjust swing length or timeframe
Q: Too many labels displayed?
A: Turn off "Show Labels" option in settings
Q: Poor backtest performance?
A:
1. Check if the coin is suitable for trend-following strategies
2. Adjust parameters (swing length, channel period)
3. Try different timeframes
Q: How to set alerts?
A:
1. Click "Alert" in top-right corner of chart
2. Condition: Select "Strategy - Trend Following CRYPTOCAP:ZEC "
3. Choose "Order filled"
4. Set notification method (Webhook/Email/App)
---
## 📞 Contact Information
Strategy Name: Trend Following CRYPTOCAP:ZEC
Version: v1.0
Pine Script Version: v6
Last Updated: December 2025
---
## 📄 Copyright Notice
This strategy is for educational and research purposes only.
All risks of using this strategy for live trading are borne by the user.
Commercial use without authorization is prohibited.
---
## 🎓 Learning Resources
To understand the strategy principles in depth, recommended reading:
- "The Complete TurtleTrader" - Curtis Faith
- "Trend Following" - Michael Covel
- TradingView Pine Script Official Documentation
---
Happy Trading! Remember to manage your risk 📈
Crypto Leverage Index(OI Norm. + FR)Crypto Leverage Index (OI Z-Score + Funding Rate Signals)
(A tool for detecting speculative extremes and leverage load in crypto derivatives markets.)
Hello, fellow traders around the globe!
In today's crypto futures market, often perceived as a 'playground for large players' (whales/smart money), catching extreme leverage behavior is crucial for survival. I wanted to come up with an indicator to quickly identify such market extremes by focusing on the two most potent indicators of leveraged action: Open Interest (OI) and Funding Rate (FR). The goal is to ride on the shoulders of the market movers by anticipating their next liquidity-driven actions. hope this helps.
❗ IMPORTANT NOTE: This indicator works exclusively on Perpetual Futures or Swap Charts that provide Open Interest (OI) data.
⚪ Overview
This indicator provides a standardized view of speculative activity by calculating the Open Interest (OI) Z-Score . This score reveals when the current level of open leverage is abnormally high (premium) or low (discount) relative to its historical mean and volatility. The index is also augmented with Extreme Funding Rate Signals , which plot simple White Dots on the chart when derivative positioning (long or short bias) reaches an unsustainable, overheated level. The combination of OI volume and positioning bias offers a good method to identify potential market reversal zones driven by leverage liquidation risks (short/long squeezes).
⚪ Score Components
Open Interest Z-Score (Leverage Load)
The primary component standardizes the Open Interest value over a defined lookback `Period` (default 50). This calculation reveals the statistical deviation of current leverage from the norm.
OI Z-Score = (OI - Mean(OI)) / StDev(OI)
Funding Rate (Positioning Bias)
Calculates the approximate funding rate using a TWAP (Time-Weighted Average Price) of the Perpetual Futures Premium, combined with the standard 0.01% Interest Rate.
⚪ Extreme Condition Detection
OI Z-Score Extremes
* Premium Zone (Red Fill) : OI Z-Score is above the user-defined `Threshold` (default 2.0). Indicates high/overstretched leverage.
* Discount Zone (Green Fill) : OI Z-Score is below the user-defined negative threshold (default -2.0). Indicates low/unwinded leverage.
Funding Rate Extreme Signals (White Dots)
These appear as small White Dots ( · ) plotted at fixed levels within the indicator pane. The position indicates the bias:
* Top Dot (Excessive Longs) : Triggered when Funding Rate is greater than Abnormal Funding Rate Threshold (e.g. 0.03%). Indicates excessive Long positioning/greed and potential for a short-term reversal (Long Squeeze risk). The dot is plotted at the positive `FR Signal Plot Level`.
* Bottom Dot (Excessive Shorts) : Triggered when Funding Rate is lower than -Abnormal Funding Rate Threshold(e.g. -0.03%). Indicates excessive Short positioning/fear and potential for a short-term reversal (Short Squeeze risk). The dot is plotted at the negative `FR Signal Plot Level`.
⚪ Leverage Case Scenarios (Price, OI Dynamics & Context)
The OI Z-Score reflects the premium/discount state of *leverage* (Open Interest) , not the price. The price may not be in a premium or discount area simply because the OI is. OI only indicates the volume of outstanding futures positions. You must observe price action and candlestick patterns alongside the OI movements to determine the true contextual hint. Understanding the relationship between price and Open Interest (OI) change is key to interpreting market movements. The cases listed below represent the most common and thinkable patterns, but do not exhaust all possible market behaviors.
1. Long Build-Up (Price ▲, OI ▲): New long positions enter, confirming the rising trend.
2. Short Build-Up (Price ▼, OI ▲): New short positions enter, confirming the falling trend. Due to the inherently long-biased nature of the crypto market, this scenario is less frequently observed than Long Build-Up.
3. Long Covering/liquidation (Price ▼, OI ▼): Existing longs are closed/liquidated. This activity usually results from Panic Selling or forced long liquidation.
4. Short Covering (Price ▲, OI ▼): Existing shorts are forced to close (Short Squeeze).
5. Long Trap (Price ▲, OI ▲ or ▼): Price rises, but OI suggests new positioning that might be trapping longs. Bearish candle pattern can be often shown with the sweep.
6. Short Trap (Price ▼, OI ▲ or ▼): Warning Sign - Price falls, but OI suggests new positioning that might be trapping shorts.
⚪ Key Input Parameters
OI Z-Score
* Period (Default: 50)
Determines how many recent bars are used to calculate the rolling mean and volatility (standard deviation) of the Open Interest data.
* Z-Score Threshold (Default: 2.0)
The critical level that the OI Z-Score must cross to be considered 'extreme' (overstretched leverage).
Funding Rate
* Abnormal FR Threshold (Default: 0.03)
The absolute percentage value (e.g., 0.03%) that the Funding Rate must exceed or fall below to trigger an extreme signal dot.
* FR Signal Plot Level (Default: 4.0)
Sets the fixed vertical position (Y-level) on the Z-Score chart where the Funding Rate signal dots will appear. (e.g., 4.0 plots the dot at the Z-Score +-4.0 level).
Disclaimer
This script is for educational and informational purposes only and does not constitute financial advice or investment recommendations. Trading cryptocurrencies involves significant risk and you are solely responsible for your own investment decisions, based on your financial situation, objectives, and risk tolerance. The author assumes no liability for losses arising from the use of this indicator.






















