EMA Stacking Indicator with VWAP, MACD and ConfirmationEMA Stacking Indicator with VWAP & MACD Confirmation
This indicator combines EMA stacking, VWAP positioning, and MACD crossovers to help identify potential trend continuation and reversal points.
Features:
✅ EMA Stacking Strategy – Uses 10, 20, and 50 EMA to detect bullish and bearish trends.
✅ VWAP Confirmation – Ensures price is above VWAP for bullish signals and below for bearish signals.
✅ MACD Crossovers – Highlights bullish and bearish MACD crossovers with arrows for extra confirmation.
✅ Custom Colors & Signals – Clearly plotted moving averages and buy/sell markers to improve chart visibility.
How It Works:
A bullish trend is detected when the 10 EMA > 20 EMA > 50 EMA, and price is above VWAP.
A bearish trend is detected when the 10 EMA < 20 EMA < 50 EMA, and price is below VWAP.
MACD Bullish Crossovers (green arrows) indicate potential uptrend momentum.
MACD Bearish Crossovers (red arrows) suggest possible downtrend shifts.
This tool is perfect for traders looking to combine moving averages with volume-weighted confirmation and MACD momentum shifts for stronger trade setups.
🔹 Let me know your thoughts and feedback! 🚀
Indicadores e estratégias
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.
---
Advanced Swing High/Low Trend Lines with MA Filter# Advanced Swing High/Low Trend Lines Indicator
## Overview
This advanced indicator identifies and draws trend lines based on swing highs and lows across three different timeframes (large, middle, and small trends). It's designed to help traders visualize market structure and potential support/resistance levels at multiple scales simultaneously.
## Key Features
- *Multi-Timeframe Analysis*: Simultaneously tracks trends at large (200-bar), middle (100-bar), and small (50-bar) scales
- *Customizable Visualization*: Different colors, widths, and styles for each trend level
- *Trend Confirmation System*: Requires minimum consecutive pivot points to validate trends
- *Trend Filter Option*: Can align trends with 200 EMA direction for consistency
## Recommended Settings
### For Long-Term Investors:
- Large Swing Length: 200-300
- Middle Swing Length: 100-150
- Small Swing Length: 50-75
- Enable Trend Filter: Yes
- Confirmation Points: 4-5
### For Swing Traders:
- Large Swing Length: 100
- Middle Swing Length: 50
- Small Swing Length: 20-30
- Enable Trend Filter: Optional
- Confirmation Points: 3
### For Day Traders:
- Large Swing Length: 50
- Middle Swing Length: 20
- Small Swing Length: 5-10
- Enable Trend Filter: No
- Confirmation Points: 2-3
## How to Use
### Identification:
1. *Large Trend Lines* (Red/Green): Show major market structure
2. *Middle Trend Lines* (Purple/Aqua): Intermediate levels
3. *Small Trend Lines* (Orange/Blue): Short-term price action
### Trading Applications:
- *Breakout Trading*: Watch for price breaking through multiple trend lines
- *Bounce Trading*: Look for reactions at confluence of trend lines
- *Trend Confirmation*: Aligned trends across timeframes suggest stronger moves
### Best Markets:
- Works well in trending markets (forex, indices)
- Effective in higher timeframes (1H+)
- Can be used in ranging markets to identify boundaries
## Customization Tips
1. For cleaner charts, reduce line widths in congested markets
2. Use dotted styles for smaller trends to reduce visual clutter
3. Adjust confirmation points based on market volatility (higher for noisy markets)
## Limitations
- May repaint on current swing points
- Works best in trending conditions
- Requires sufficient historical data for longer swing lengths
This indicator provides a comprehensive view of market structure across multiple timeframes, helping traders make more informed decisions by visualizing the hierarchy of support and resistance levels.
SMA & EMA Trend IndicatorIndicator that will use SMA and EMA to determine the price direction. The logic is:
If EMA (fast) is above SMA (slow) → uptrend (up arrow).
If EMA is below SMA → downtrend (down arrow).
ALTIN - XAUTRYG % Fiyat Farkı AlarmıThis indicator calculates the percentage difference between GOLD and XAUTRYG prices, displays it visually as a label and generates an alarm when it goes below the threshold value you set.
🔍 Features:
✅ Calculates the **percentage price difference** between GOLD and XAUTRYG
✅ User-defined 3 level colour threshold: e.g. 1-2-3% → green-yellow-orange-red
✅ Increase/decrease indication with **🔼 / 🔽 direction arrow** according to the changing difference
✅ Comment based on its position in the last 20 bars:
- (**HIGHEST** of the last 20 bars)
- (**LOWEST** of the last 20 bars)
✅ Only visible on **GOLD** or **XAUTRYG** chart
✅ Alarm condition: Triggered when the difference falls below the set percentage threshold value
💡 What does it do?
This tool is ideal for investors who want to analyse the price difference between gram gold mint and spot gold, observe **arbitrage opportunities** and receive **alerts** at certain levels.
📈 Quickly recognise when the price gap widens or narrows.
🔔 Don't miss opportunities by setting an alarm if you wish!
💬 I welcome your improvement suggestions and feedback.
Trading Capital Management for Option SellingTrading Capital Management for Option Selling
This Pine Script indicator helps manage trading capital allocation for option selling strategies based on price percentile ranking. It provides dynamic allocation recommendations for index options (NIFTY and BANKNIFTY) and individual stock positions.
Key Features:
- Dynamic buying power (BP) allocation based on close price percentile
- Flexible index allocation between NIFTY and BANKNIFTY
- Automated calculation of recommended number of stock positions
- Risk management through position size limits
- Real-time INDIA VIX monitoring
Main Parameters:
1. Window Length: Period for percentile calculation (default: 252 days)
2. Thresholds: Low (30%) and High (70%) percentile thresholds
3. Capital Settings:
- Trading Capital: Total capital available
- Max BP% per Stock: Maximum allocation per stock position
4. Buying Power Range:
- Low Percentile BP%: Base BP usage at low percentile
- High Percentile BP%: Maximum BP usage at high percentile
5. Index Allocation:
- NIFTY/BANKNIFTY split ratio
- Minimum and maximum allocation thresholds
Display:
The indicator shows two tables:
1. Common Metrics:
- Total BP Usage with percentage
- Current INDIA VIX value
- Current Close Price Percentile
2. Capital Allocation:
- Index-wise BP allocation (NIFTY and BANKNIFTY)
- Stock allocation pool
- Recommended number of stock positions with BP per stock
Usage:
This indicator helps traders:
1. Scale positions based on market conditions using price percentile
2. Maintain balanced exposure between indices and stocks
3. Optimize capital utilization while managing risk
4. Adjust position sizing dynamically with market volatility
Volume Pro Indicator## Volume Pro Indicator
A powerful volume indicator that visualizes volume distribution across different price levels. This tool helps you easily identify where trading activity concentrates within the price range.
### Key Features:
- **Volume visualization by price levels**: Green (lower zone), Magenta (middle zone), Cyan (upper zone)
- **VPOC (Volume Point of Control)**: Shows the price level with the highest volume concentration
- **High and Low lines**: Highlights the extreme levels of the analyzed price range
- **Customizable historical analysis**: Configurable number of days for calculation
### How to use it:
- Colored volumes show where trading activity concentrates within the price range
- The VPOC helps identify the most significant price levels
- Different colors allow you to quickly visualize volume distribution in different price areas
Customizable with numerous options, including analysis period, calculation resolution, colors, and visibility of different components.
### Note:
This indicator works best on higher timeframes (1H, 4H, 1D) and liquid markets. It's a visual analysis tool that enhances your understanding of market structure.
#volume #vpoc #distribution #volumeprofile #trading #analysis #indicator #professional #pricelevels #volumedistribution
Currency Futures vs USD Basket ComparisonCurrency Futures vs USD Basket
An indicator that normalizes and compares the USD Basket (DXY) vs futures for other currencies.
volume profile ranking indicator📌 Introduction
This script implements a volume profile ranking indicato for TradingView. It is designed to visualize the distribution of traded volume over price levels within a defined historical window. Unlike TradingView’s built-in Volume Profile, this script gives full customization of the profile drawing logic, binning, color gradient, and the ability to anchor the profile to a specific date.
⚙️ How It Works (Logic)
1. Inputs
➤POC Lookback Days (lookback): Defines how many bars (days) to look back from a selected point to calculate the volume distribution.
➤Bin Count (bin_count): Determines how many price bins (horizontal levels) the price range will be divided into.
➤Use Custom Lookback Date (useCustomDate): Enables/disables manually selecting a backtest start date.
➤Custom Lookback Date (customDate): When enabled, the profile will calculate volume based on this date instead of the most recent bar.
2. Target Bar Determination
➤If a custom date is selected, the script searches for the bar closest to that date within 1000 bars.
➤If not, it defaults to the latest bar (bar_index).
➤The profile is drawn only when the current bar is close to the target bar (within ±2 bars), to avoid unnecessary recalculations and performance issues.
3. Volume Binning
➤The price range over the lookback window is divided into bin_count segments.
➤For each bar within the lookback window, its volume is added to the appropriate bin based on price.
➤If the price falls outside the expected range, it is clamped to the first or last bin.
4. Ranking and Sorting
➤A bubble sort ranks each bin by total volume.
➤The most active bin (POC, or Point of Control) is highlighted with a thicker bar.
5. Rendering
➤Horizontal bars (line.new) represent volume intensity in each price bin.
➤Each bar is color-coded by volume heat: more volume = more intense color.
➤Labels (label.new) show:
➤Total volume
➤Rank
➤Percentage of total volume
➤Price range of the bin
🧑💻 How to Use
1. Add the Script to Your Chart
➤Copy the code into TradingView’s Pine Script editor and add it to your chart.
2. Set Lookback Period
➤Default is 252 bars (about one year for daily charts), but can be changed via the input.
3. (Optional) Use Custom Date
●Toggle "Use Custom Lookback Date" to true.
➤Pick a date in the "Custom Lookback Date" input to anchor the profile.
4. Analyze the Volume Distribution
➤The longest (thickest) red/orange bar represents the Point of Control (POC) — the price with the most volume traded.
➤Other bars show volume distribution across price.
➤Labels display useful metrics to evaluate areas of high/low interest.
✅ Features
🔶 Customizable anchor point (custom date).
🔶Adjustable bin count and lookback length.
🔶 Clear visualization with heatmap coloring.
🔶 Lightweight and performance-optimized (especially with the shouldDrawProfile filter)
Enhanced Trading Strategy with RSI, MACD, TP/SL📌 Enhanced Trading Strategy with RSI, MACD, TP/SL
This Pine Script strategy identifies high-probability trading signals using multiple confluences, including Engulfing & Pin Bar candle patterns, trend filtering with EMA, momentum confirmation with RSI & MACD, and an ATR-based risk management system.
🔹 Key Features:
1. **EMA Trend Filter (50-period EMA)**
- Helps determine market direction.
- Buy signals are valid only above EMA 50.
- Sell signals are valid only below EMA 50.
2. **Candle Pattern Detection**
- **Bullish Engulfing** & **Bearish Engulfing** confirm strong reversals.
- **Bullish Pin Bar** & **Bearish Pin Bar** indicate rejection zones.
3. **Momentum Confirmation (RSI & MACD)**
- RSI prevents overbought/oversold trades.
- MACD ensures trend momentum aligns with the trade.
4. **Risk Management (ATR-based TP & SL)**
- Take Profit and Stop Loss levels dynamically adjust based on ATR.
- Helps optimize risk-to-reward ratios.
5. **Trade Execution & Alerts**
- The script generates buy/sell orders when all conditions align.
- Alerts notify traders when a signal is triggered.
📊 Best Timeframe & Win Rate for BTC
✅ **4H (Best for Swing Trading)**
✅ **1H (Balanced for Day Trading)**
✅ **15M (Scalping Possible but More Noise)**
**Estimated Win Rate:**
- Backtesting on BTC/USD (4H timeframe) suggests a **win rate of 60-75%**, depending on market conditions.
- The strategy performs **best in trending markets** and may require additional filtering during sideways movements.
🚀 **Optimize further?** Consider adding Bollinger Bands, Volume, or Trend Strength filters.
Advanced Trading Metrics DashboardThe Advanced Trading Metrics Dashboard provides traders with a comprehensive set of key market metrics in an elegant, easy-to-read format. This professional-grade indicator combines five critical trading metrics into one unified dashboard:
ADX (14): Measures trend strength with color-coded ratings
Volatility: Displays ATR as a percentage with visual classification
Volume Ratio: Analyzes buy/sell volume balance with bullish/bearish indicators
Trend: Evaluates overall market trend using EMA alignment, RSI, and MACD
Breakout: Detects and rates potential breakout opportunities
Each metric includes a visual bar chart, precise value, and qualitative rating to help you make informed trading decisions at a glance. The indicator features both a detailed data table and plot lines with appropriate scaling.
Perfect for day traders, swing traders, and technical analysts who need a quick overview of market conditions without cluttering their charts.
Customize colors and thresholds to match your trading strategy. Built with optimized Pine Script code for reliable performance.
TREND and ZL FLOWHow It Helps Traders
Trend Identification with T3 Moving Average
The script calculates a T3 moving average using a smoother version of traditional moving averages, reducing lag and providing a clearer view of trend direction.
A histogram is plotted, where green bars indicate an uptrend and red bars signal a downtrend. This helps traders visually confirm the market trend and avoid false signals.
Zero Lag Moving Average (ZLMA) for Faster Reversals
The ZLMA is designed to react more quickly to price changes while minimizing lag. It helps traders spot trend reversals sooner than traditional moving averages.
The line color changes green for bullish momentum and red for bearish momentum, making it easier to spot shifts in direction.
Overall, this indicator is useful for trend-following traders who want to capture momentum shifts efficiently. It can be particularly helpful for day traders and swing traders looking for early trend confirmation and automated trade signals.
Bitcoin Power LawThis is the main body version of the script. The Oscillator version can be found here .
Firstly, we would like to give credit to @apsk32 and @x_X_77_X_x as part of the code originates from their work. Additionally, @apsk32 is widely credited with applying the Power Law concept to Bitcoin and popularizing this model within the crypto community. Additionally, the visual layout is fully inspired by @apsk32's designs, and we think it looks amazing. So much so that we had to turn it into a TradingView script. Thank you!
Understanding the Bitcoin Power Law Model
Also called the Long-Term Bitcoin Power Law Model. The Bitcoin Power Law model tries to capture and predict Bitcoin's price growth over time. It assumes that Bitcoin's price follows an exponential growth pattern, where the price increases over time according to a mathematical relationship.
By fitting a power law to historical data, the model creates a trend line that represents this growth. It then generates additional parallel lines (support and resistance lines) to show potential price boundaries, helping to visualize where Bitcoin’s price could move within certain ranges.
In simple terms, the model helps us understand Bitcoin's general growth trajectory and provides a framework to visualize how its price could behave over the long term.
The Bitcoin Power Law has the following function:
Power Law = 10^(a + b * log10(d))
Consisting of the following parameters:
a: Power Law Intercept (default: -17.668).
b: Power Law Slope (default: 5.926).
d: Number of days since a reference point(calculated by counting bars from the reference point with an offset).
Explanation of the a and b parameters:
Roughly explained, the optimal values for the a and b parameters are determined through a process of linear regression on a log-log scale (after applying a logarithmic transformation to both the x and y axes). On this log-log scale, the power law relationship becomes linear, making it possible to apply linear regression. The best fit for the regression is then evaluated using metrics like the R-squared value, residual error analysis, and visual inspection. This process can be quite complex and is beyond the scope of this post.
Applying vertical shifts to generate the other lines:
Once the initial power-law is created, additional lines are generated by applying a vertical shift . This shift is achieved by adding a specific number of days (or years in case of this script) to the d-parameter. This creates new lines perfectly parallel to the initial power law with an added vertical shift, maintaining the same slope and intercept.
In the case of this script, shifts are made by adding +365 days, +2 * 365 days, +3 * 365 days, +4 * 365 days, and +5 * 365 days, effectively introducing one to five years of shifts. This results in a total of six Power Law lines, as outlined below (From lowest to highest):
Base Power Law Line (no shift)
1-year shifted line
2-year shifted line
3-year shifted line
4-year shifted line
5-year shifted line
The six power law lines:
Bitcoin Power Law Oscillator
This publication also includes the oscillator version of the Bitcoin Power Law. This version applies a logarithmic transformation to the price, Base Power Law Line, and 5-year shifted line using the formula log10(x) .
The log-transformed price is then normalized using min-max normalization relative to the log-transformed Base Power Law Line and 5-year shifted line with the formula:
normalized price = log(close) - log(Base Power Law Line) / log(5-year shifted line) - log(Base Power Law Line)
Finally, the normalized price was multiplied by 5 to map its value between 0 and 5, aligning with the shifted lines.
Interpretation of the Bitcoin Power Law Model:
The shifted Power Law lines provide a framework for predicting Bitcoin's future price movements based on historical trends. These lines are created by applying a vertical shift to the initial Power Law line, with each shifted line representing a future time frame (e.g., 1 year, 2 years, 3 years, etc.).
By analyzing these shifted lines, users can make predictions about minimum price levels at specific future dates. For example, the 5-year shifted line will act as the main support level for Bitcoin’s price in 5 years, meaning that Bitcoin’s price should not fall below this line, ensuring that Bitcoin will be valued at least at this level by that time. Similarly, the 2-year shifted line will serve as the support line for Bitcoin's price in 2 years, establishing that the price should not drop below this line within that time frame.
On the other hand, the 5-year shifted line also functions as an absolute resistance , meaning Bitcoin's price will not exceed this line prior to the 5-year mark. This provides a prediction that Bitcoin cannot reach certain price levels before a specific date. For example, the price of Bitcoin is unlikely to reach $100,000 before 2021, and it will not exceed this price before the 5-year shifted line becomes relevant. After 2028, however, the price is predicted to never fall below $100,000, thanks to the support established by the shifted lines.
In essence, the shifted Power Law lines offer a way to predict both the minimum price levels that Bitcoin will hit by certain dates and the earliest dates by which certain price points will be reached. These lines help frame Bitcoin's potential future price range, offering insight into long-term price behavior and providing a guide for investors and analysts. Lets examine some examples:
Example 1:
In Example 1 it can be seen that point A on the 5-year shifted line acts as major resistance . Also it can be seen that 5 years later this price level now corresponds to the Base Power Law Line and acts as a major support (Note: Vertical yearly grid lines have been added for this purpose👍).
Example 2:
In Example 2, the price level at point C on the 3-year shifted line becomes a major support three years later at point C, now aligning with the Base Power Law Line.
Finally, let's explore some future price predictions, as this script provides projections on the weekly timeframe :
Example 3:
In Example 3, the Bitcoin Power Law indicates that Bitcoin's price cannot surpass approximately $808K before 2030 as can be seen at point E, while also ensuring it will be at least $224K by then (point F).
Bitcoin Power Law OscillatorThis is the oscillator version of the script. The main body of the script can be found here .
Firstly, we would like to give credit to @apsk32 and @x_X_77_X_x as part of the code originates from their work. Additionally, @apsk32 is widely credited with applying the Power Law concept to Bitcoin and popularizing this model within the crypto community. Additionally, the visual layout is fully inspired by @apsk32's designs, and we think it looks amazing. So much so that we had to turn it into a TradingView script. Thank you!
Understanding the Bitcoin Power Law Model
Also called the Long-Term Bitcoin Power Law Model. The Bitcoin Power Law model tries to capture and predict Bitcoin's price growth over time. It assumes that Bitcoin's price follows an exponential growth pattern, where the price increases over time according to a mathematical relationship.
By fitting a power law to historical data, the model creates a trend line that represents this growth. It then generates additional parallel lines (support and resistance lines) to show potential price boundaries, helping to visualize where Bitcoin’s price could move within certain ranges.
In simple terms, the model helps us understand Bitcoin's general growth trajectory and provides a framework to visualize how its price could behave over the long term.
The Bitcoin Power Law has the following function:
Power Law = 10^(a + b * log10(d))
Consisting of the following parameters:
a: Power Law Intercept (default: -17.668).
b: Power Law Slope (default: 5.926).
d: Number of days since a reference point(calculated by counting bars from the reference point with an offset).
Explanation of the a and b parameters:
Roughly explained, the optimal values for the a and b parameters are determined through a process of linear regression on a log-log scale (after applying a logarithmic transformation to both the x and y axes). On this log-log scale, the power law relationship becomes linear, making it possible to apply linear regression. The best fit for the regression is then evaluated using metrics like the R-squared value, residual error analysis, and visual inspection. This process can be quite complex and is beyond the scope of this post.
Applying vertical shifts to generate the other lines:
Once the initial power-law is created, additional lines are generated by applying a vertical shift . This shift is achieved by adding a specific number of days (or years in case of this script) to the d-parameter. This creates new lines perfectly parallel to the initial power law with an added vertical shift, maintaining the same slope and intercept.
In the case of this script, shifts are made by adding +365 days, +2 * 365 days, +3 * 365 days, +4 * 365 days, and +5 * 365 days, effectively introducing one to five years of shifts. This results in a total of six Power Law lines, as outlined below (From lowest to highest):
Base Power Law Line (no shift)
1-year shifted line
2-year shifted line
3-year shifted line
4-year shifted line
5-year shifted line
The six power law lines:
Bitcoin Power Law Oscillator
This publication also includes the oscillator version of the Bitcoin Power Law. This version applies a logarithmic transformation to the price, Base Power Law Line, and 5-year shifted line using the formula log10(x) .
The log-transformed price is then normalized using min-max normalization relative to the log-transformed Base Power Law Line and 5-year shifted line with the formula:
normalized price = log(close) - log(Base Power Law Line) / log(5-year shifted line) - log(Base Power Law Line)
Finally, the normalized price was multiplied by 5 to map its value between 0 and 5, aligning with the shifted lines.
Interpretation of the Bitcoin Power Law Model:
The shifted Power Law lines provide a framework for predicting Bitcoin's future price movements based on historical trends. These lines are created by applying a vertical shift to the initial Power Law line, with each shifted line representing a future time frame (e.g., 1 year, 2 years, 3 years, etc.).
By analyzing these shifted lines, users can make predictions about minimum price levels at specific future dates. For example, the 5-year shifted line will act as the main support level for Bitcoin’s price in 5 years, meaning that Bitcoin’s price should not fall below this line, ensuring that Bitcoin will be valued at least at this level by that time. Similarly, the 2-year shifted line will serve as the support line for Bitcoin's price in 2 years, establishing that the price should not drop below this line within that time frame.
On the other hand, the 5-year shifted line also functions as an absolute resistance , meaning Bitcoin's price will not exceed this line prior to the 5-year mark. This provides a prediction that Bitcoin cannot reach certain price levels before a specific date. For example, the price of Bitcoin is unlikely to reach $100,000 before 2021, and it will not exceed this price before the 5-year shifted line becomes relevant. After 2028, however, the price is predicted to never fall below $100,000, thanks to the support established by the shifted lines.
In essence, the shifted Power Law lines offer a way to predict both the minimum price levels that Bitcoin will hit by certain dates and the earliest dates by which certain price points will be reached. These lines help frame Bitcoin's potential future price range, offering insight into long-term price behavior and providing a guide for investors and analysts. Lets examine some examples:
Example 1:
In Example 1 it can be seen that point A on the 5-year shifted line acts as major resistance . Also it can be seen that 5 years later this price level now corresponds to the Base Power Law Line and acts as a major support (Note: Vertical yearly grid lines have been added for this purpose👍).
Example 2:
In Example 2, the price level at point C on the 3-year shifted line becomes a major support three years later at point C, now aligning with the Base Power Law Line.
Finally, let's explore some future price predictions, as this script provides projections on the weekly timeframe :
Example 3:
In Example 3, the Bitcoin Power Law indicates that Bitcoin's price cannot surpass approximately $808K before 2030 as can be seen at point E, while also ensuring it will be at least $224K by then (point F).
52-Week Breakout w/10%SL - Created by Sai DhakshinThis plots the 52 week high and entry on breakout keeping the 10% stoploss that is market below the LTP of the asset and the breakout of the 52 week high
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.
TREND and ZL - TFTTREND and ZL - TFT
How It Helps Traders
Trend Identification with T3 Moving Average
The script calculates a T3 moving average using an 8-period length and a volume factor of 0.7. The T3 MA is a smoother version of traditional moving averages, reducing lag and providing a clearer view of trend direction.
A histogram is plotted, where green bars indicate an uptrend and red bars signal a downtrend. This helps traders visually confirm the market trend and avoid false signals.
Zero Lag Moving Average (ZLMA) for Faster Reversals
The ZLMA is designed to react more quickly to price changes while minimizing lag. It helps traders spot trend reversals sooner than traditional moving averages.
The line color changes green for bullish momentum and red for bearish momentum, making it easier to spot shifts in direction.
Overall, this indicator is useful for trend-following traders who want to capture momentum shifts efficiently. It can be particularly helpful for day traders and swing traders looking for early trend confirmation and automated trade signals.
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.
Buy on 5% dip strategy with time adjustment
This script is a strategy called "Buy on 5% Dip Strategy with Time Adjustment 📉💡," which detects a 5% drop in price and triggers a buy signal 🔔. It also automatically closes the position once the set profit target is reached 💰, and it has additional logic to close the position if the loss exceeds 14% after holding for 230 days ⏳.
Strategy Explanation
Buy Condition: A buy signal is triggered when the price drops 5% from the highest price reached 🔻.
Take Profit: The position is closed when the price hits a 1.22x target from the average entry price 📈.
Forced Sell Condition: If the position is held for more than 230 days and the loss exceeds 14%, the position is automatically closed 🚫.
Leverage & Capital Allocation: Leverage is adjustable ⚖️, and you can set the percentage of capital allocated to each trade 💸.
Time Limits: The strategy allows you to set a start and end time ⏰ for trading, making the strategy active only within that specific period.
Code Credits and References
Credits: This script utilizes ideas and code from @QuantNomad and jangdokang for the profit table and algorithm concepts 🔧.
Sources:
Monthly Performance Table Script by QuantNomad:
ZenAndTheArtOfTrading's Script:
Strategy Performance
This strategy provides risk management through take profit and forced sell conditions and includes a performance table 📊 to track monthly and yearly results. You can compare backtest results with real-time performance to evaluate the strategy's effectiveness.
The performance numbers shown in the backtest reflect what would have happened if you had used this strategy since the launch date of the SOXL (the Direxion Daily Semiconductor Bull 3x Shares ETF) 📅. These results are not hypothetical but based on actual performance from the day of the ETF’s launch 📈.
Caution ⚠️
No Guarantee of Future Results: The results are based on historical performance from the launch of the SOXL ETF, but past performance does not guarantee future results. It’s important to approach with caution when applying it to live trading 🔍.
Risk Management: Leverage and capital allocation settings are crucial for managing risk ⚠️. Make sure to adjust these according to your risk tolerance ⚖️.
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.
Short-Term Volume + MACD Trend Indicator
### How It Works
1. **VROC (Volume Rate of Change)**:
- Tracks short-term volume momentum (5-bar default).
- Positive VROC (>5%) supports uptrends; negative VROC (<-5%) supports downtrends.
2. **VMA (Volume Moving Average)**:
- 10-period SMA of volume.
- Volume > VMA confirms trend strength; volume ≤ VMA leans toward sideways.
3. **MACD**:
- Uses faster settings (9, 21, 5) for short-term responsiveness (vs. standard 12, 26, 9).
- `macdLine > signalLine` signals bullish momentum; `macdLine < signalLine` signals bearish momentum.
4. **Trend Logic**:
- **Uptrend (Green)**: MACD bullish (macdLine > signalLine) + volume > VMA + VROC > 5% → Strong buying momentum.
- **Downtrend (Red)**: MACD bearish (macdLine < signalLine) + volume > VMA + VROC < -5% → Strong selling momentum.
- **Sideways (Gray)**: Any condition where uptrend or downtrend criteria aren’t fully met (e.g., MACD flat, volume low, or VROC neutral).
5. **Visualization**:
- Plots volume, VMA, VROC, and MACD histogram for reference.
- Background colors (green, red, gray) highlight trends.
---
### Why This Improves Signals
- **MACD Filter**: Adds momentum confirmation, reducing false signals from volume alone (e.g., a volume spike without price movement won’t trigger an uptrend).
- **Volume Confirmation**: Ensures trends have participation (volume > VMA), filtering out weak MACD signals.
- **Short-Term Focus**: Faster MACD settings (9, 21, 5) and short VROC (5 bars) align with 1-minute or 5-minute chart dynamics.
---
### How to Use It
1. **Setup**:
- Paste the code into TradingView’s Pine Editor, save, and add to a 1-minute or 5-minute chart.
2. **Interpretation**:
- **Green (Uptrend)**: Look for long entries, especially if price breaks resistance or aligns with a fast EMA (e.g., 9-period).
- **Red (Downtrend)**: Consider shorts or exits, particularly on support breaks.
- **Gray (Sideways)**: Avoid trend trades; wait for a breakout or use range strategies.
3. **Confirmation**:
- Pair with price action (e.g., candlestick patterns) or a 9-EMA for stronger signals.
- Example: Green + price above 9-EMA = high-probability uptrend.
---
### Customization
- **1-Minute Scalping**:
- Set `vrocLength = 3`, `macdFast = 5`, `macdSlow = 13`, `macdSignal = 3` for ultra-fast signals.
- **5-Minute Trading**:
- Keep defaults or increase `vrocThreshold` to 10% for stricter momentum.
- **Sensitivity**:
- Lower `vmaLength` to 5 for quicker volume response; raise `vrocThreshold` to 8% for stronger trends.
---
### Example (5-Minute Chart)
- **Uptrend**: Price rises, MACD crosses above signal, volume > VMA, VROC at 7% → Green background.
- **Downtrend**: Price drops, MACD below signal, volume > VMA, VROC at -8% → Red background.
- **Sideways**: Price flattens, MACD near signal, volume < VMA, VROC at 2% → Gray background.
This combo gives you a robust short-term indicator with better signal quality. Test it on your chart, and let me know if you want tweaks—like adding buy/sell volume separation or adjusting thresholds!
Pairs Trading Pétrole-OrPair between gold and oil. When the blue line passes below the lowest green line, oil becomes undervalued relative to gold and a long on oil would become interesting until the blue line goes back over the orange line. The logic is the same for the opposite.
Master Global Liquidity Shifted 75 DaysThe Global Liquidity Index is a Pine Script (version 5) technical indicator designed to measure and visualize global financial liquidity by aggregating data from various central bank balance sheets and money supply metrics. The indicator is plotted as an overlay on the price chart using the left scale, with the entire line shifted left by 75 days.
Key features:
Data Sources: Incorporates balance sheet data from major central banks including the Federal Reserve (FED), European Central Bank (ECB), People's Bank of China (PBC), Bank of Japan (BOJ), and other central banks, along with optional M2 money supply data from various countries.
Components: Includes options to toggle specific liquidity factors such as FED balance sheet, Treasury General Account (TGA), Reverse Repurchase Agreements (RRP), and regional M2 money supplies, all converted to USD.
75-Day Shift: The indicator's output is shifted left by 75 days on the chart, aligning historical liquidity data with earlier price action, with this shift period adjustable via the "Shift Days Left" input.
Calculations:
Computes a total liquidity value by summing enabled central bank and M2 data (adjusted for RRP and TGA as drains)
Scales the total by dividing by 1 trillion (10^12)
Applies a Simple Moving Average (SMA) and Rate of Change (ROC) with user-defined periods
Final output is either the SMA of ROC or SMA alone, depending on ROC length
Visualization: Plots the shifted result as a yellow line with a linewidth of 2.