111D SMA / (350D SMA * 2)Indicator: Pi Cycle Ratio
This custom technical indicator calculates a ratio between two moving averages that are used for the PI Cycle Top indicator. The PI Cycle Top indicator triggers when the 111-day simple moving average (111D SMA) crosses up with the 350-day simple moving average (350D SMA *2).
The line value is ratio is calculated as:
Line Value = 111DSMA / (350D SMA × 2)
When the 111D SMA crosses with the 350D SMA triggering the PI Cycle Top, the value of the ratio between the two lines is 1.
This visualizes the ratio between the two moving averages into a single line. This indicator can be used for technical analysis for historical and future moves.
Cycles
Stop Loss / Take Profit Table // (\_/)
// ( •.•)
// (")_(")
Simple Take profit system
for Crypto , forex and stock .
BTC High-Win Strategy### 📌 **BTC High-Win Strategy (Short Only) - TradingView Indicator**
This **short-only** indicator is designed for Bitcoin traders who focus on high-probability shorting opportunities. It integrates multiple confirmation signals to ensure **accurate entry and exit points** in bearish conditions.
### **🔹 Key Features:**
✅ **Trend Confirmation:** Uses the **200 EMA** to ensure trades align with the dominant bearish trend.
✅ **Momentum & Reversal Signals:** Detects overbought conditions with **RSI (Relative Strength Index) & Bollinger Bands**.
✅ **Breakout Confirmation:** Uses **VWAP (Volume-Weighted Average Price) & ATR** for volatility-based entries.
✅ **Sell Signals:**
- **Sell (Trend-Following):** When **MACD crosses below Signal Line**, price is under **200 EMA**, and RSI < 50.
- **Sell (Reversal):** When price hits the **upper Bollinger Band**, RSI > 70, and crosses down.
🔴 **Red Down Arrows** → Strong Short Entry
🟠 **Orange Down Arrows** → Overbought Short Entry
### **📌 How to Use:**
1️⃣ Copy and paste the script into **TradingView’s Pine Editor**.
2️⃣ Click **Add to Chart** to activate it.
3️⃣ **Enter Shorts** when a signal appears and confirm with volume analysis.
4️⃣ **Exit** based on next support level or **RSI returning to neutral**.
Would you like me to optimize it further for **scalping or swing trading?** 🚀
MACD + RSI + ADX + EMA Strategy PROThis strategy combines MACD crossovers, RSI momentum, ADX trend strength, EMA trend bias, and ATR-based filters to generate high-quality entries. It includes risk-based position sizing, trailing stops, and optional higher-timeframe confirmation for smarter, cleaner trades. Great for crypto, forex, and trending markets on intraday timeframes.
Custom Vertical & HTF Range with Time-Span High/LowEs sit ein Indicator wo man eine Zeitspanne manuell einstellen kann
Fractal & Weierstrass Trend Reversal ZonesThe script combines weierstrass function and fractal dimension index to search for possible ends of the waves in Eliott Waves analysis.
Experimental. DYOR. Feel free to play with settings or suggest improvements.
HOSSA High-Low LevelsHOSSA High-Low Levels – How It Works and How to Use It
The HOSSA High-Low Levels indicator gives you three different ways to plot key price levels on your chart, all based on a higher timeframe candle you select. It can help you spot important support and resistance zones, potential expansion levels, or key reference points (high, low, open, close) to aid in your technical analysis.
1. Modes of Operation
Resistance
In this mode, the indicator measures the range between the previous candle’s high and low (on your chosen higher timeframe).
It then projects multiple lines above and below that range (both “positive” and “negative” expansions).
This allows you to visualize potential resistance/support areas at intervals like +25%, +50%, +100%, -25%, -50%, etc., relative to that candle’s range.
Fibonacci
This mode also takes the candle’s high and low, then applies Fibonacci retracement and extension levels (including negative extensions).
You’ll see levels such as 0.236, 0.382, 0.5, 0.618, 1.272, 1.618, and more plotted on your chart.
These can be useful for identifying potential reversal or continuation zones based on Fibonacci theory.
High-Low-Open-Close
In this simpler mode, the script plots just four lines at the higher timeframe candle’s high, low, open, and close.
This gives you clean reference levels for intraday trading or any lower timeframe analysis.
2. Selecting Your Higher Timeframe
Higher Timeframe Input: The script uses the high, low, open, and close of the candle from the timeframe you choose (default is 240 minutes, i.e., 4 hours).
These reference points form the basis of how the indicator calculates its lines in each mode.
3. How to Use It in Your Analysis
Detect Potential Support/Resistance
In Resistance or Fibonacci mode, look for price reactions around these plotted lines. If price stalls or reverses, those levels may act as support or resistance.
Identify Trade Targets and Stop Areas
Projected lines (especially in Resistance or Fibonacci mode) can serve as logical areas for placing stop-loss or take-profit orders.
Combine with Price Action
If using High-Low-Open-Close, you might watch for breakouts or bounces near the higher timeframe candle’s open/close.
Combining these key levels with candlestick patterns or volume can enhance your conviction for entries or exits.
Multi-Timeframe Context
While your main chart might be on a shorter timeframe (e.g., 15 minutes), the lines from a higher timeframe candle (e.g., 4 hours) add valuable “bigger picture” context to refine your trades.
4. Tips for Best Practice
Experiment with Different Timeframes: If the 4-hour candle levels aren’t aligning well with your style, consider daily or weekly candles to see broader market structure.
Color Coding: The script automatically colors lines based on their significance in each mode (e.g., highs in one color, lows in another). This makes it easier to quickly identify critical price references.
Alert Combinations: Although this script doesn’t directly create alerts, you can combine it with TradingView’s alert system (e.g., “Crossing” a plotted level) to get notified if price tests a key zone.
By using HOSSA High-Low Levels, you’ll have a flexible tool to easily project important price lines on your chart – whether those lines are expansions of a range, Fibonacci retracements and extensions, or simply the previous candle’s high, low, open, and close. This can help you trade more confidently by giving you clear, higher timeframe reference points.
Request to Share My Work
Dear Users,
I kindly ask for your support in sharing my work with your friends and networks. Every like, share, or recommendation is extremely valuable to me and helps reach a wider audience.
I would be immensely grateful for any form of support and engagement! Thanks to your help, I can continue developing this project and bring more ideas to life.
With sincere appreciation,
TICK Bias Timer with EMA Position📌 Description
This indicator tracks the time in minutes that the Exponential Moving Average (EMA) of the NYSE USI:TICK remains above or below the zero line. It serves as a powerful market breadth confirmation tool to support your intraday directional bias.
Rather than focusing on momentary TICK spikes, this tool emphasizes duration and persistence of buying/selling pressure across the entire NYSE – helping traders stay on the right side of the flow.
🔧 Features
✅ Measures how long the EMA of TICK stays above or below 0
✅ Visual plots of upward and downward pressure duration (in minutes)
✅ Background color changes based on EMA position relative to 0
✅ Automatic daily reset at a customizable time (e.g. 15:30 for RTH open)
✅ Gap filter to avoid spikes during overnight or weekend sessions
✅ Clean, minimalist design – built for real-time decision making
🎯 How to Use
EMA > 0 for 10+ minutes → sustained bullish breadth → intraday bullish bias
EMA < 0 for 10+ minutes → sustained bearish breadth → intraday bearish bias
Frequent flip between sides → uncertain or choppy market → trade with caution
Can be used in confluence with Volume Profile, VWAP, price action, and Bookmap to reinforce trade setups.
💡 Ideal For:
Scalpers looking for flow confirmation
Day traders who want to filter fake strength/weakness
Professionals using TICK, USI:ADD , USI:VOLD , and other internals for decision-making
DIR Pro (ʘ‿ʘ)ノMomentum System
Detection: Uses ta.barssince() to count consecutive closes above/below EMA25
Threshold: Requires ≥7 consecutive bars (momentum_length)
Output: Directional integer (-1/0/1) + duration count
Intensity Metric
pinescript
Copy
intensity = sum(last 3 bars' distance > historical reference) × 0.5
Comparison Window: Current vs momentum start period (3-bar rolling window)
Scaling: 0.5 points per confirmation (max 1.5)
Score Weighting
Copy
Total = (Base × 70%) + (Momentum × 20%) + (Intensity × 10%)
Base (70%): Long-term EMA25 positioning (144-period exponential decay)
Momentum (20%): Trend persistence confirmation
Intensity (10%): Short-term acceleration strength
Key Fixes Applied
NaN Protection: Added ternary checks (peso_total != 0 ?) in all metric calculations
Position Adjustment:
Horizontal: bar_index + 12 (moved 3cm right)
Vertical: high * 1.015 (moved 3cm up from price)
Metric Visibility: Explicit inclusion of AvgD/Body in Section A
Precision Formatting: #.0 format for 1-decimal consistency
VIX bottom/top with color scale [Ox_kali]📊 Introduction
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The “VIX Bottom/Top with Color Scale” script is designed to provide an intuitive, color-coded visualization of the VIX (Volatility Index), helping traders interpret market sentiment and volatility extremes in real time.
It segments the VIX into clear threshold zones, each associated with a specific market condition—ranging from fear to calm—using a dynamic color-coded system.
This script offers significant value for the following reasons:
Intuitive Risk Interpretation: Color-coded zones make it easy to interpret market sentiment at a glance.
Dynamic Trend Detection: A 200-period SMA of the VIX is plotted and dynamically colored based on trend direction.
Customization and Flexibility: All colors are editable in the parameters panel, grouped under “## Color parameters ##”.
Visual Clarity: Key thresholds are marked with horizontal lines for quick reference.
Practical Trading Tool: Helps identify high-risk and low-risk environments based on volatility levels.
🔍 Key Indicators
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
VIX (CBOE Volatility Index) : Measures market volatility and investor fear.
SMA 200 : Long-term trendline of the VIX, with color-coded direction (green = uptrend, red = downtrend).
Color-coded VIX Levels:
🔴 33+ → Something bad just happened
🟠 23–33 → Something bad is happening
🟡 17–23 → Something bad might happen
🟢 14–17 → Nothing bad is happening
✅ 12–14 → Nothing bad will ever happen
🔵 <12 → Something bad is going to happen
🧠 Originality and Purpose
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Unlike traditional VIX indicators that only plot a line, this script enhances interpretation through visual segmentation and dynamic trend tracking.
It serves as a risk-awareness tool that transforms the VIX into a simple, emotional market map.
This is the first version of the script, and future updates may include alerts, background fills, and more advanced features.
⚙️ How It Works
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The script maps the current VIX value to a range and applies the corresponding color.
It calculates a SMA 200 and colors it green or red depending on its slope.
It displays horizontal dotted lines at key thresholds (12, 14, 17, 23, 33).
All colors are configurable via input parameters under the group: "## Color parameters ##".
🧭 Indicator Visualization and Interpretation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The VIX line changes color based on market condition zones.
The SMA line shows long-term direction with dynamic color.
Horizontal threshold lines visually mark the transitions between volatility zones.
Ideal for quickly identifying periods of fear, caution, or stability.
🛠️ Script Parameters
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Grouped under “## Color parameters ##”, the following elements are customizable:
🎨 VIX Zone Colors:
33+ → Red
23–33 → Orange
17–23 → Yellow
14–17 → Light Green
12–14 → Dark Green
<12 → Blue
📈 SMA Colors:
Uptrend → Green
Downtrend → Red
These settings allow users to match the script’s visuals to their preferred chart style or theme.
✅ Conclusion
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The “VIX Bottom/Top with Color Scale” is a clean, powerful script designed to simplify how traders view volatility.
By combining long-term trend data with real-time color-coded sentiment analysis, this script becomes a go-to reference for managing risk, timing trades, or simply staying in tune with market mood.
🧪 Notes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This is version 1 of the script. More features such as alert conditions, background fill, and dashboard elements may be added soon. Feedback is welcome!
💡 Color code concept inspired by the original VIX interpretation chart by @nsquaredvalue on Twitter. Big thanks for the visual clarity! 💡
⚠️ Disclaimer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This script is a visual tool designed to assist in market analysis. It does not guarantee future performance and should be used in conjunction with proper risk management. Past performance is not indicative of future results.
Golden Cross & Death Cross Strategy with SL & TPGolden Cross (BUY Signal):
• Enter long when 50 EMA crosses above 200 EMA
• Stop-Loss = 1% below entry price
• Take-Profit = 2x risk (default 1:2 ratio)
✅ Death Cross (SELL Signal):
• Enter short when 50 EMA crosses below 200 EMA
• Stop-Loss = 1% above entry price
• Take-Profit = 2x risk
Daily ProtractorDaily Protractor Indicator
Overview
The Daily Protractor is a visually intuitive tool designed for traders who want to analyze price action through angular measurements on a 5-minute chart. By overlaying a protractor on the chart, this indicator helps identify potential support, resistance, and trend directions based on angular relationships from the first 5-minute candle of each day. It’s particularly useful for intraday traders looking to incorporate geometric analysis into their strategies for spot or strike charts.
Key Features
Dynamic Protractor Overlay: Draws a protractor centered on the low of the first 5-minute candle of each day, with customizable radius in both bars (horizontal) and price units (vertical).
Angular Measurements: Displays angles in 5-degree increments, covering a full 360° circle or a 105° to -105° (91° to 269°) half-circle, depending on user preference.
Customizable Display:
Adjust the number of days to display protractors (up to 5 days).
Customize line colors for different angle ranges (0° to 180°, 180° to 360°, and 0° specifically).
Modify line thickness, label size, and label colors for better visibility.
Center Point Highlight: Marks the center of each protractor with a labeled point for easy reference.
Efficient Design:
Optimized with max_lines_count, max_labels_count, and max_bars_back to ensure smooth performance on TradingView.
How It Works
The indicator identifies the first 5-minute candle of each day and uses its low price as the center point for a protractor. It then draws lines at 5-degree intervals, radiating from the center, with each line representing an angle from 0° to 360°. Labels at the end of each line display the angle in degrees, with negative values shown for angles between 195° and 345° (e.g., 270° is displayed as -90°). The protractor’s radius can be adjusted in both time (bars) and price units, allowing traders to scale the tool to their chart’s characteristics.
Usage Instructions
Add to Chart:
Apply the indicator to a 5-minute chart of your chosen instrument (e.g., spot or strike charts).
Interpret the Protractor:
Use the angular lines to identify potential price levels or trend directions.
The 0° line (horizontal) can act as a reference for horizontal support/resistance.
Angles between 0° and 180° (upper half) and 180° and 360° (lower half) are color-coded for quick identification.
Customize Settings:
Toggle the Show 105° to -105° option to display a half-circle (91° to 269°) instead of a full 360° protractor.
Adjust the Radius in Bars and Radius in Price Units to scale the protractor to your chart.
Set the Maximum Days to Display to control how many daily protractors are shown.
Modify line thickness, colors, and label settings to suit your visual preferences.
Customization Options
Protractor Settings:
Show 105° to -105° (91° to 269°): Toggle between a full circle or a half-circle protractor.
Radius in Bars: Set the horizontal span of the protractor (default: 75 bars).
Radius in Price Units: Set the vertical span in price units (default: 1000.0).
Maximum Days to Display: Limit the number of protractors shown (default: 5 days).
Line Settings:
Line Thickness: Adjust the thickness of the protractor lines (1 or 2).
Line Color (0° to 180°): Color for the upper half (default: light blue).
Line Color (180° to 360°): Color for the lower half (default: light red).
Line Color (0°): Color for the 0° line (default: black).
Label Settings:
Label Size: Choose between small, normal, or large labels.
Label Color (0° to 180°): Color for labels in the upper half (default: red).
Label Color (180° to 360°): Color for labels in the lower half (default: green).
Notes
The indicator was designed with the help of Grok3 for use on 5-minute charts only, as it relies on the first 5-minute candle of the day to set the protractor’s center.
For best results, adjust the radius settings to match the volatility and price scale of your instrument. However, where the price is in single digits it is advised to switch off the labels or I would suggest not to use the same.
The protractor can be used alongside other technical tools to confirm trends, reversals, or key price levels.
Limitations: This cannot be used on instruments that trade for more than 75 candles with a timeframe of 5 minutes as the angles would not cover the entire trading window. I am working coming up with a script to address this limitation.
Feedback
I’d love to hear your thoughts! If you find the Daily Protractor helpful or have suggestions for improvements, please leave a comment or reach out. Happy trading!
Big 7 NASDAQ📊 Big 7 NASDAQ % Change Heatmap with Trend Arrows
This indicator displays a real-time performance table for the "Big 7" NASDAQ stocks:
Apple (AAPL), Microsoft (MSFT), Amazon (AMZN), Google (GOOGL), Meta (META), Tesla (TSLA), and Nvidia (NVDA).
🔎 Features:
Live Daily % Change: Calculates the percentage change between today’s open and the current price.
Color Gradient: Background color intensity reflects the strength of the move (from mild to strong bullish/bearish).
Trend Arrows: Visual arrows 🔺 (up) and 🔻 (down) represent the direction of movement.
Position Mode Selector:
"Buy" – highlights with green tones
"Sell" – highlights with red tones
"Neutral" – uses dynamic coloring based on individual stock moves
📍 Placement:
The table is positioned in the top-right corner of the chart for easy reference without cluttering your main view.
[COG]Adaptive Volatility Bands# Adaptive Volatility Bands (AVB) Indicator Guide for Traders
## Special Acknowledgment 🙌
This script is inspired by and builds upon the foundational work of **DonovanWall**, a respected contributor to the trading community. His innovative approach to adaptive indicators has been instrumental in developing this advanced trading tool.
## What is the Adaptive Volatility Bands Indicator?
The Adaptive Volatility Bands (AVB) is a sophisticated technical analysis tool designed to help traders understand market dynamics by creating dynamic, responsive price channels that adapt to changing market conditions. Unlike traditional static indicators, this script uses advanced mathematical techniques to create flexible bands that adjust to market volatility in real-time.
## Key Features and Inputs
### 1. Price and Filtering Options
- **Price Source**: Determines the base price used for calculations (default is HLC3 - Average of High, Low, and Close)
- **Filter Poles**: Controls the smoothness of the indicator (1-9 poles)
- Lower values: More responsive, more noise
- Higher values: Smoother, but slower to react
### 2. Volatility and Band Settings
- **Sample Length**: Determines how many bars are used to calculate volatility (default 144)
- **Volatility Multiplier**: Adjusts the width of the main bands (default 1.414)
- **Outer Band Multiplier**: Controls the width of the outer bands (default 2.5)
- **Inner Band Ratio**: Positions the inner bands between the center and outer bands (default 0.25)
### 3. Advanced Processing Options
- **Lag Reduction Mode**: Helps reduce indicator delay
- **Fast Response Mode**: Makes the indicator more responsive to recent price changes
### 4. Signal and Visualization Options
- **Show Entry Signals**: Displays buy and sell signals
- **Signal Display Style**: Choose between labels or shapes
- **Range Filter**: Adds an additional filter for signal validation
## How the Indicator Works
The Adaptive Volatility Bands create a dynamic price channel with three key components:
1. **Center Line**: Represents the core trend direction
2. **Inner Bands**: Closer to the center line
3. **Outer Bands**: Wider bands that show broader price potential
### Color Dynamics
- The indicator uses a smart color gradient system
- Colors change based on price position within the bands
- Helps visualize bullish (green/blue) and bearish (red) market conditions
## Trading Strategies for Beginners
### Basic Entry Signals
- **Buy Signal**:
- Price touches the center line from below
- Candle is bullish (closes higher than it opens)
- Price is above the center line
- Trend is upward
- **Sell Signal**:
- Price touches the center line from above
- Candle is bearish (closes lower than it opens)
- Price is below the center line
- Trend is downward
### Risk Management Tips
1. Use the bands to identify:
- Potential trend changes
- Volatility levels
- Support and resistance areas
2. Combine with other indicators for confirmation
3. Always use stop-loss orders
4. Adjust parameters to match your trading style and asset
## When to Use This Indicator
Best suited for:
- Trending markets
- Swing trading
- Identifying potential entry and exit points
- Understanding market volatility
### Recommended Markets
- Stocks
- Forex
- Cryptocurrencies
- Futures
## Customization
The script offers extensive customization:
- Adjust smoothness
- Change band multipliers
- Modify color schemes
- Enable/disable features like lag reduction
## Important Considerations for Beginners
🚨 **Disclaimer**:
- No indicator guarantees profits
- Always practice with a demo account first
- Learn and understand the indicator before live trading
- Market conditions change, so continually adapt your strategy
## Getting Started
1. Add the script to your TradingView chart
2. Experiment with different settings
3. Backtest on historical data
4. Start with small positions
5. Continuously learn and improve
Happy Trading! 📈🔍
Dow Theory Trend StrategyDow Theory Trend Strategy (Pine Script)
Overview
This Pine Script implements a trading strategy based on the core principles of Dow Theory. It visually identifies trends (uptrend, downtrend) by analyzing pivot highs and lows and executes trades when the trend direction changes. This script is an improved version that features refined trend determination logic and strategy implementation.
Core Concept: Dow Theory
The script uses a fundamental Dow Theory concept for trend identification:
Uptrend: Characterized by a series of Higher Highs (HH) and Higher Lows (HL).
Downtrend: Characterized by a series of Lower Highs (LH) and Lower Lows (LL).
How it Works
Pivot Point Detection:
It uses the built-in ta.pivothigh() and ta.pivotlow() functions to identify significant swing points (potential highs and lows) in the price action.
The pivotLookback input determines the number of bars to the left and right required to confirm a pivot. Note that this introduces a natural lag (equal to pivotLookback bars) before a pivot is confirmed.
Improved Trend Determination:
The script stores the last two confirmed pivot highs and the last two confirmed pivot lows.
An Uptrend (trendDirection = 1) is confirmed only when the latest pivot high is higher than the previous one (HH) AND the latest pivot low is higher than the previous one (HL).
A Downtrend (trendDirection = -1) is confirmed only when the latest pivot high is lower than the previous one (LH) AND the latest pivot low is lower than the previous one (LL).
Key Improvement: If neither a clear uptrend nor a clear downtrend is confirmed based on the latest pivots, the script maintains the previous trend state (trendDirection := trendDirection ). This differs from simpler implementations that might switch to a neutral/range state (e.g., trendDirection = 0) more frequently. This approach aims for smoother trend following, acknowledging that trends often persist through periods without immediate new HH/HL or LH/LL confirmations.
Trend Change Detection:
The script monitors changes in the trendDirection variable.
changedToUp becomes true when the trend shifts to an Uptrend (from Downtrend or initial state).
changedToDown becomes true when the trend shifts to a Downtrend (from Uptrend or initial state).
Visualizations
Background Color: The chart background is colored to reflect the currently identified trend:
Blue: Uptrend (trendDirection == 1)
Red: Downtrend (trendDirection == -1)
Gray: Initial state or undetermined (trendDirection == 0)
Pivot Points (Optional): Small triangles (shape.triangledown/shape.triangleup) can be displayed above pivot highs and below pivot lows if showPivotPoints is enabled.
Trend Change Signals (Optional): Labels ("▲ UP" / "▼ DOWN") can be displayed when a trend change is confirmed (changedToUp / changedToDown) if showTrendChange is enabled. These visually mark the potential entry points for the strategy.
Strategy Logic
Entry Conditions:
Enters a long position (strategy.long) using strategy.entry("L", ...) when changedToUp becomes true.
Enters a short position (strategy.short) using strategy.entry("S", ...) when changedToDown becomes true.
Position Management: The script uses strategy.entry(), which automatically handles position reversal. If the strategy is long and a short signal occurs, strategy.entry() will close the long position and open a new short one (and vice-versa).
Inputs
pivotLookback: The number of bars on each side to confirm a pivot high/low. Higher values mean pivots are confirmed later but may be more significant.
showPivotPoints: Toggle visibility of pivot point markers.
showTrendChange: Toggle visibility of the trend change labels ("▲ UP" / "▼ DOWN").
Key Improvements from Original
Smoother Trend Logic: The trend state persists unless a confirmed reversal pattern (opposite HH/HL or LH/LL) occurs, reducing potential whipsaws in choppy markets compared to logic that frequently resets to neutral.
Strategy Implementation: Converted from a pure indicator to a strategy capable of executing backtests and potentially live trades based on the Dow Theory trend changes.
Disclaimer
Dow Theory signals are inherently lagging due to the nature of pivot confirmation.
The effectiveness of the strategy depends heavily on the market conditions and the chosen pivotLookback setting.
This script serves as a basic template. Always perform thorough backtesting and implement proper risk management (e.g., stop-loss, take-profit, position sizing) before considering any live trading.
NHPF (Normalized Hodrick-Prescott Filter)This indicator applies a normalized Hodrick–Prescott filter (NHPF) to Bitcoin’s price data. It separates the underlying trend from short-term cyclical fluctuations by recursively smoothing the price using a user-defined lambda (HP Filter Period). The raw trend is then normalized by calculating a ratio between the trend and the current price, which is scaled and shifted according to subjective parameters (Mean and Scale). The result is a dimensionless value that highlights deviations from the long-term trend—serving as a signal for potential overbought (positive values) or oversold (negative values) market conditions. A zero line provides a clear reference, allowing traders to visually gauge when Bitcoin’s price is significantly above or below its expected trajectory.
Feel free to adjust the inputs to best match your analysis preferences.
CCI with Subjective NormalizationCCI (Commodity Channel Index) with Subjective Normalization
This indicator computes the classic CCI over a user-defined length, then applies a subjective mean and scale to transform the raw CCI into a pseudo Z‑score range. By adjusting the “Subjective Mean” and “Subjective Scale” inputs, you can shift and rescale the oscillator to highlight significant tops and bottoms more clearly in historical data.
1. CCI Calculation:
- Uses the standard formula \(\text{CCI} = \frac{\text{price} - \text{SMA(price, length)}}{0.015 \times \text{mean deviation}}\) over a user-specified length (default 500 bars).
2. Subjective Normalization:
- After CCI is calculated, it is divided by “Subjective Scale” and offset by “Subjective Mean.”
- This step effectively re-centers and re-scales the oscillator, helping you align major lows or highs at values like –2 or +2 (or any desired range).
3. Usage Tips:
- CCI Length controls how far back the script measures average price and deviation. Larger values emphasize multi-year cycles.
- Subjective Mean and Scale let you align the oscillator’s historical lows and highs with numeric levels you prefer (e.g., near ±2).
- Adjust these parameters to fit your particular market analysis or to match known cycle tops/bottoms.
4. Plot & Zero Line:
- The indicator plots the normalized CCI in yellow, along with a zero line for quick reference.
- Positive values suggest price is above its long-term mean, while negative values suggest it’s below.
This approach offers a straightforward momentum oscillator (CCI) combined with a customizable normalization, making it easier to spot historically significant overbought/oversold conditions without writing complex code yourself.
ES vs Bond ROCThis Pine Script plots the Relative Rate of Change (ROC) between the S&P 500 E-mini Futures (ES) and 30-Year Treasury Bond Futures (ZB) over a specified period. It helps identify when equities are overperforming or underperforming relative to long-term bonds—an insight often used to detect risk-on/risk-off sentiment shifts in the market.
DOPT---
## 🔍 **DOPT - Daily Open & Price Time Markers**
This script is designed to support directional bias development and price behavior analysis around key time-based reference points on the **1H and 4H timeframes**.
### ✨ **What It Does**
- **1800 Open Marker** (6 PM NY time): Plots the **daily open** from 1800 in **black dotted lines**.
- **0000 Open Marker** (Midnight NY time): Plots the **midnight open** in **blue dotted lines**.
- **Day Letters**: Each 1800 open is labeled with the corresponding **day of the week** (e.g., M, T, W...), helping visually segment your chart.
- **Hour Labels**: Select specific candles (e.g., 0000 = '0', 0800 = '8') to be labeled above the bar. These are fully customizable.
- **Candle Midpoints**: Option to mark the **50% level** of a specific candle (good for CE or CRT references).
- **CRT High/Low Tracking**: Ability to plot **extended high and low lines** from a selected candle back (e.g., for CRT modeling).
- **4H Timeframe Candle Numbering**: Helpful when analyzing sequences on the 4-hour timeframe. Candles are numbered `1`, `5`, and `9` for reference.
---
### 🧠 **How I Use It**
- I mostly use this on the **1-hour timeframe** to decide **directional bias** for the day:
- If price **closes above 1800 open**, I consider that a **green daily close** — potential bullish sentiment.
- If price **closes below**, I treat it as a **red daily close** — potential bearish behavior.
- Price often uses these opens as **support/resistance**, so I watch for reactions there.
- On the **4H**, the candle numbers help track structure and flow.
- Combine with CRT tools to mark **key candle highs/lows** and their **equilibrium (50%)** — great for refining entries or understanding how price is respecting a particular candle.
---
### ⚠️ **Note on Daylight Savings**
This is a **daylight saving time-dependent script**. When DST kicks in or out, you’ll need to **adjust the time inputs** accordingly to keep the opens accurate (e.g., 1800 might shift to 1700 depending on the season).
---
### 🔁 **Backtesting & Reference**
- The **1800 and 0000 opens** are plotted for **as far back** as your chart loads, making it great for backtesting historical reactions.
- The CRT marking tools only go back **50 candles max**, so use that for recent structure only.
---
Bitcoin Polynomial Regression ModelThis is the main version of the script. Click here for the Oscillator part of the script.
💡Why this model was created:
One of the key issues with most existing models, including our own Bitcoin Log Growth Curve Model , is that they often fail to realistically account for diminishing returns. As a result, they may present overly optimistic bull cycle targets (hence, we introduced alternative settings in our previous Bitcoin Log Growth Curve Model).
This new model however, has been built from the ground up with a primary focus on incorporating the principle of diminishing returns. It directly responds to this concept, which has been briefly explored here .
📉The theory of diminishing returns:
This theory suggests that as each four-year market cycle unfolds, volatility gradually decreases, leading to more tempered price movements. It also implies that the price increase from one cycle peak to the next will decrease over time as the asset matures. The same pattern applies to cycle lows and the relationship between tops and bottoms. In essence, these price movements are interconnected and should generally follow a consistent pattern. We believe this model provides a more realistic outlook on bull and bear market cycles.
To better understand this theory, the relationships between cycle tops and bottoms are outlined below:https://www.tradingview.com/x/7Hldzsf2/
🔧Creation of the model:
For those interested in how this model was created, the process is explained here. Otherwise, feel free to skip this section.
This model is based on two separate cubic polynomial regression lines. One for the top price trend and another for the bottom. Both follow the general cubic polynomial function:
ax^3 +bx^2 + cx + d.
In this equation, x represents the weekly bar index minus an offset, while a, b, c, and d are determined through polynomial regression analysis. The input (x, y) values used for the polynomial regression analysis are as follows:
Top regression line (x, y) values:
113, 18.6
240, 1004
451, 19128
655, 65502
Bottom regression line (x, y) values:
103, 2.5
267, 211
471, 3193
676, 16255
The values above correspond to historical Bitcoin cycle tops and bottoms, where x is the weekly bar index and y is the weekly closing price of Bitcoin. The best fit is determined using metrics such as R-squared values, residual error analysis, and visual inspection. While the exact details of this evaluation are beyond the scope of this post, the following optimal parameters were found:
Top regression line parameter values:
a: 0.000202798
b: 0.0872922
c: -30.88805
d: 1827.14113
Bottom regression line parameter values:
a: 0.000138314
b: -0.0768236
c: 13.90555
d: -765.8892
📊Polynomial Regression Oscillator:
This publication also includes the oscillator version of the this model which is displayed at the bottom of the screen. The oscillator applies a logarithmic transformation to the price and the regression lines using the formula log10(x) .
The log-transformed price is then normalized using min-max normalization relative to the log-transformed top and bottom regression line with the formula:
normalized price = log(close) - log(bottom regression line) / log(top regression line) - log(bottom regression line)
This transformation results in a price value between 0 and 1 between both the regression lines. The Oscillator version can be found here.
🔍Interpretation of the Model:
In general, the red area represents a caution zone, as historically, the price has often been near its cycle market top within this range. On the other hand, the green area is considered an area of opportunity, as historically, it has corresponded to the market bottom.
The top regression line serves as a signal for the absolute market cycle peak, while the bottom regression line indicates the absolute market cycle bottom.
Additionally, this model provides a predicted range for Bitcoin's future price movements, which can be used to make extrapolated predictions. We will explore this further below.
🔮Future Predictions:
Finally, let's discuss what this model actually predicts for the potential upcoming market cycle top and the corresponding market cycle bottom. In our previous post here , a cycle interval analysis was performed to predict a likely time window for the next cycle top and bottom:
In the image, it is predicted that the next top-to-top cycle interval will be 208 weeks, which translates to November 3rd, 2025. It is also predicted that the bottom-to-top cycle interval will be 152 weeks, which corresponds to October 13th, 2025. On the macro level, these two dates align quite well. For our prediction, we take the average of these two dates: October 24th 2025. This will be our target date for the bull cycle top.
Now, let's do the same for the upcoming cycle bottom. The bottom-to-bottom cycle interval is predicted to be 205 weeks, which translates to October 19th, 2026, and the top-to-bottom cycle interval is predicted to be 259 weeks, which corresponds to October 26th, 2026. We then take the average of these two dates, predicting a bear cycle bottom date target of October 19th, 2026.
Now that we have our predicted top and bottom cycle date targets, we can simply reference these two dates to our model, giving us the Bitcoin top price prediction in the range of 152,000 in Q4 2025 and a subsequent bottom price prediction in the range of 46,500 in Q4 2026.
For those interested in understanding what this specifically means for the predicted diminishing return top and bottom cycle values, the image below displays these predicted values. The new values are highlighted in yellow:
And of course, keep in mind that these targets are just rough estimates. While we've done our best to estimate these targets through a data-driven approach, markets will always remain unpredictable in nature. What are your targets? Feel free to share them in the comment section below.
Bitcoin Polynomial Regression OscillatorThis is the oscillator version of the script. Click here for the other part of the script.
💡Why this model was created:
One of the key issues with most existing models, including our own Bitcoin Log Growth Curve Model , is that they often fail to realistically account for diminishing returns. As a result, they may present overly optimistic bull cycle targets (hence, we introduced alternative settings in our previous Bitcoin Log Growth Curve Model).
This new model however, has been built from the ground up with a primary focus on incorporating the principle of diminishing returns. It directly responds to this concept, which has been briefly explored here .
📉The theory of diminishing returns:
This theory suggests that as each four-year market cycle unfolds, volatility gradually decreases, leading to more tempered price movements. It also implies that the price increase from one cycle peak to the next will decrease over time as the asset matures. The same pattern applies to cycle lows and the relationship between tops and bottoms. In essence, these price movements are interconnected and should generally follow a consistent pattern. We believe this model provides a more realistic outlook on bull and bear market cycles.
To better understand this theory, the relationships between cycle tops and bottoms are outlined below:https://www.tradingview.com/x/7Hldzsf2/
🔧Creation of the model:
For those interested in how this model was created, the process is explained here. Otherwise, feel free to skip this section.
This model is based on two separate cubic polynomial regression lines. One for the top price trend and another for the bottom. Both follow the general cubic polynomial function:
ax^3 +bx^2 + cx + d.
In this equation, x represents the weekly bar index minus an offset, while a, b, c, and d are determined through polynomial regression analysis. The input (x, y) values used for the polynomial regression analysis are as follows:
Top regression line (x, y) values:
113, 18.6
240, 1004
451, 19128
655, 65502
Bottom regression line (x, y) values:
103, 2.5
267, 211
471, 3193
676, 16255
The values above correspond to historical Bitcoin cycle tops and bottoms, where x is the weekly bar index and y is the weekly closing price of Bitcoin. The best fit is determined using metrics such as R-squared values, residual error analysis, and visual inspection. While the exact details of this evaluation are beyond the scope of this post, the following optimal parameters were found:
Top regression line parameter values:
a: 0.000202798
b: 0.0872922
c: -30.88805
d: 1827.14113
Bottom regression line parameter values:
a: 0.000138314
b: -0.0768236
c: 13.90555
d: -765.8892
📊Polynomial Regression Oscillator:
This publication also includes the oscillator version of the this model which is displayed at the bottom of the screen. The oscillator applies a logarithmic transformation to the price and the regression lines using the formula log10(x) .
The log-transformed price is then normalized using min-max normalization relative to the log-transformed top and bottom regression line with the formula:
normalized price = log(close) - log(bottom regression line) / log(top regression line) - log(bottom regression line)
This transformation results in a price value between 0 and 1 between both the regression lines.
🔍Interpretation of the Model:
In general, the red area represents a caution zone, as historically, the price has often been near its cycle market top within this range. On the other hand, the green area is considered an area of opportunity, as historically, it has corresponded to the market bottom.
The top regression line serves as a signal for the absolute market cycle peak, while the bottom regression line indicates the absolute market cycle bottom.
Additionally, this model provides a predicted range for Bitcoin's future price movements, which can be used to make extrapolated predictions. We will explore this further below.
🔮Future Predictions:
Finally, let's discuss what this model actually predicts for the potential upcoming market cycle top and the corresponding market cycle bottom. In our previous post here , a cycle interval analysis was performed to predict a likely time window for the next cycle top and bottom:
In the image, it is predicted that the next top-to-top cycle interval will be 208 weeks, which translates to November 3rd, 2025. It is also predicted that the bottom-to-top cycle interval will be 152 weeks, which corresponds to October 13th, 2025. On the macro level, these two dates align quite well. For our prediction, we take the average of these two dates: October 24th 2025. This will be our target date for the bull cycle top.
Now, let's do the same for the upcoming cycle bottom. The bottom-to-bottom cycle interval is predicted to be 205 weeks, which translates to October 19th, 2026, and the top-to-bottom cycle interval is predicted to be 259 weeks, which corresponds to October 26th, 2026. We then take the average of these two dates, predicting a bear cycle bottom date target of October 19th, 2026.
Now that we have our predicted top and bottom cycle date targets, we can simply reference these two dates to our model, giving us the Bitcoin top price prediction in the range of 152,000 in Q4 2025 and a subsequent bottom price prediction in the range of 46,500 in Q4 2026.
For those interested in understanding what this specifically means for the predicted diminishing return top and bottom cycle values, the image below displays these predicted values. The new values are highlighted in yellow:
And of course, keep in mind that these targets are just rough estimates. While we've done our best to estimate these targets through a data-driven approach, markets will always remain unpredictable in nature. What are your targets? Feel free to share them in the comment section below.
Master Litecoin Miner Sell PressureBrief Description:
Purpose: The indicator overlays on a chart to highlight periods of high miner sell pressure for Litecoin.
Data Sources:
miner_out: Fetches daily Litecoin miner outflows (amount of LTC moved out by miners) using the INTOTHEBLOCK:LTC_MINEROUTFLOWS dataset.
miner_res: Fetches daily Litecoin miner reserves (amount of LTC held by miners) using the INTOTHEBLOCK:LTC_MINERRESERVES dataset.
Calculation:
Computes a ratio m by taking the 14-day sum of miner outflows and dividing it by the 14-day simple moving average (SMA) of miner reserves.
Calculates Bollinger Bands around m:
bbl: Lower band (200-day SMA of m minus 1 standard deviation).
bbu: Upper band (200-day SMA of m plus 1 standard deviation).
Visualization:
If the ratio m exceeds the upper Bollinger Band (bbu), the background is colored blue with 30% opacity, indicating potential high sell pressure from miners.
Fourier Trend Energy (Prototype)Fourier Trend Energy (Prototype)
This indicator brings the logic of Fourier-based trend analysis into Pine Script.
It estimates two key components:
Low-Frequency Energy — representing the strength of the underlying trend
High-Frequency Energy — representing noise, volatility, or deviation from the trend
🔹 Green line → trend strength
🔸 Orange line → short-term noise
🟩🟥 Background color → shows whether trend energy is increasing or decreasing
You can use it to:
Detect early trend formation
Filter fakeouts during consolidation
Spot momentum shifts based on energy crossovers
This is not a traditional oscillator — it’s a frequency-inspired tool to help you understand when the market is charging for a move.