Bitcoin Cycles IndicatorTrack Bitcoin's cyclical price patterns across multiple timeframes with this cycle analysis tool. The indicator automatically identifies cycle lows and highs, marking them with clear visual labels that show cycle day counts and failed cycle detection.
Key Features:
 
   Multi-Time frame Support - Optimized settings for Daily, Weekly, Monthly, and Custom time frames
   Cycle Tracking - Identifies and labels cycle lows (green) and highs (red) with day counts
   Failed Cycle Detection - Highlights when cycles break below previous lows
   Customizable Settings - Adjust cycle lengths, colors, and display options for each timeframe
   Info Box - Real-time cycle information display with current cycle day count
   Projection Boxes - Visual cycle length projections for better analysis
   
Perfect for Bitcoin traders and analysts who want to understand market cycles and timing. Works best on Daily charts for short-term cycles and Weekly/Monthly charts for longer-term analysis.
Cari dalam skrip untuk "weekly"
TPO Levels [VAH/POC/VAL] with Poor H/L, Single Prints & NPOCs### ๐ฏ Advanced Market Profile & Key Level Analysis
This script is a unique and comprehensive technical analysis tool designed to help traders understand market structure, value, and key liquidity levels using the principles of **Auction Market Theory** and **Market Profile**.
 This script is unique   (and shouldn't be censored)   because :
It allows large history of levels to be displayed  
Accurate as possible tick size
Doesn't draw a profile but only the actual levels
Supports multi-timeframe levels even on the daily mode giving macro context
 There is no indicator out there that does it 
While these concepts are universal, this indicator was built primarily for the dynamic, 24/7 nature of the **cryptocurrency market**. It helps you move beyond simple price action to understand *why* the market is moving, which is especially crucial in the volatile crypto space.
### ## ๐ The Concepts Behind the Calculations
To use this script effectively, it's important to understand the core concepts it is built upon. The entire script is self-contained and does not require other indicators.
* **What is Market Profile?**
    Market Profile is a unique charting technique that organizes price and time data to reveal market structure. It's built from **Time Price Opportunities (TPOs)**, which are 30-minute periods of market activity. By stacking these TPOs, the script builds a distribution, showing which price levels were most accepted (heavily traded) and which were rejected (lightly traded) during a session.
* **What is the Value Area (VA)?**
    The Value Area is the heart of the profile. It represents the price range where **70%** of the session's trading volume occurred. This is considered the "fair value" zone where both buyers and sellers were in general agreement.
    * **Point of Control (POC):** The single price level with the most TPOs. This was the most accepted or "fairest" price of the session and acts as a gravitational line for price.
    * **Value Area High (VAH):** The upper boundary of the 70% value zone.
    * **Value Area Low (VAL):** The lower boundary of the 70% value zone.
    VAH and VAL are dynamic support and resistance levels. Trading outside the previous session's value area can signal the start of a new trend.
***
### ## ๐ Key Features Explained
This script automatically calculates and displays the following critical market-generated information:
* **Multi-Timeframe Market Profile**
    Automatically draws Daily, Weekly, and Monthly profiles, allowing you to analyze market structure across different time horizons. The script preserves up to 20 historical sessions to provide deep market context.
* **Naked Point of Control (nPOC)**
    A "Naked" POC is a Point of Control from a previous session that has **not** been revisited by price. These levels often act as powerful magnets for price, representing areas of unfinished business that the market may seek to retest. The script tracks and displays Daily, Weekly, and Monthly nPOCs until they are touched.
* **Single Prints (Imbalance Zones)**
    A Single Print is a price level where only one TPO traded during the session's development. This signifies a rapid, aggressive price move and an imbalanced market. These areas, like gaps in a traditional chart, are frequently revisited as the market seeks to "fill in" these thin parts of the profile.
* **Poor Structure (Unfinished Auctions)**
    A **Poor High** or **Poor Low** occurs when the top or bottom of a profile is flat, with two or more TPOs at the extreme price. This suggests that the auction in that direction was weak and inconclusive. These weak structures often signal a high probability that price will eventually break that high or low.
***
### ## ๐ก How to Use This Indicator
This tool is not a signal generator but an analytical framework to improve your trading decisions.
1.  **Determine Market Context:** Start by asking: Is the current price trading *inside* or *outside* the previous session's Value Area?
    * **Inside VA:** The market is in a state of balance or range-bound. Look for trades between the VAH and VAL.
    * **Outside VA:** The market is in a state of imbalance and may be starting a trend. Look for continuation or acceptance of prices outside the prior value.
2.  **Identify Key Levels:**
    * Use historical **nPOCs** as potential profit targets or areas to watch for a price reaction.
    * Treat historical **VAH** and **VAL** levels as significant support and resistance zones.
    * Note where **Single Prints** are. These are often price magnets that may get "filled" in the future.
3.  **Spot Weakness:**
    * A **Poor High** suggests weak resistance that may be easily broken.
    * A **Poor Low** suggests weak support, signaling a potential for a continued move lower if broken.
***
### ## โ๏ธ Customization & Crypto Presets
The indicator is highly customizable, allowing you to change colors, transparency, the number of historical sessions, and more.
To help traders get started quickly, the indicator includes **built-in layout presets** specifically calibrated for major cryptocurrencies: **  BINANCE:BTCUSDT.P ,  BINANCE:ETHUSDT.P  , and  BINANCE:SOLUSDT.P  **. These presets automatically adjust key visual parameters to better suit the unique price characteristics and volatility of each asset, providing an optimized view right out of the box.
***
### ## โ ๏ธ Disclaimer
This indicator is a tool for market analysis and should not be interpreted as direct buy or sell signals. It provides information based on historical price action, which does not guarantee future results. Trading involves significant risk, and you should always use proper risk management. This script is designed for use on standard chart types (e.g., Candlesticks, Bar) and may produce misleading information on non-standard charts.
[blackcat] L2 Trend LinearityOVERVIEW 
The L2 Trend Linearity indicator is a sophisticated market analysis tool designed to help traders identify and visualize market trend linearity by analyzing price action relative to dynamic support and resistance zones. This powerful Pine Script indicator utilizes the Arnaud Legoux Moving Average (ALMA) algorithm to calculate weighted price calculations and generate dynamic support/resistance zones that adapt to changing market conditions. By visualizing market zones through colored candles and histograms, the indicator provides clear visual cues about market momentum and potential trading opportunities. The script generates buy/sell signals based on zone crossovers, making it an invaluable tool for both technical analysis and automated trading strategies. Whether you're a day trader, swing trader, or algorithmic trader, this indicator can help you identify market regimes, support/resistance levels, and potential entry/exit points with greater precision.
 FEATURES 
Dynamic Support/Resistance Zones: Calculates dynamic support (bear market zone) and resistance (bull market zone) using weighted price calculations and ALMA smoothing
Visual Market Representation: Color-coded candles and histograms provide immediate visual feedback about market conditions
Smart Signal Generation: Automatic buy/sell signals generated from zone crossovers with clear visual indicators
Customizable Parameters: Four different ALMA smoothing parameters for various timeframes and trading styles
Multi-Timeframe Compatibility: Works across different timeframes from 1-minute to weekly charts
Real-time Analysis: Provides instant feedback on market momentum and trend direction
Clear Visual Cues: Green candles indicate bullish momentum, red candles indicate bearish momentum, and white candles indicate neutral conditions
Histogram Visualization: Blue histogram shows bear market zone (below support), aqua histogram shows bull market zone (above resistance)
Signal Labels: "B" labels mark buy signals (price crosses above resistance), "S" labels mark sell signals (price crosses below support)
Overlay Functionality: Works as an overlay indicator without cluttering the chart with unnecessary elements
Highly Customizable: All parameters can be adjusted to suit different trading strategies and market conditions
 HOW TO USE 
Add the Indicator to Your Chart
Open TradingView and navigate to your desired trading instrument
Click on "Indicators" in the top menu and select "New"
Search for "L2 Trend Linearity" or paste the Pine Script code
Click "Add to Chart" to apply the indicator
Configure the Parameters
ALMA Length Short: Set the short-term smoothing parameter (default: 3). Lower values provide more responsive signals but may generate more false signals
ALMA Length Medium: Set the medium-term smoothing parameter (default: 5). This provides a balance between responsiveness and stability
ALMA Length Long: Set the long-term smoothing parameter (default: 13). Higher values provide more stable signals but with less responsiveness
ALMA Length Very Long: Set the very long-term smoothing parameter (default: 21). This provides the most stable support/resistance levels
Understand the Visual Elements
Green Candles: Indicate bullish momentum when price is above the bear market zone (support)
Red Candles: Indicate bearish momentum when price is below the bull market zone (resistance)
White Candles: Indicate neutral market conditions when price is between support and resistance zones
Blue Histogram: Shows bear market zone when price is below support level
Aqua Histogram: Shows bull market zone when price is above resistance level
"B" Labels: Mark buy signals when price crosses above resistance
"S" Labels: Mark sell signals when price crosses below support
Identify Market Regimes
Bullish Regime: Price consistently above resistance zone with green candles and aqua histogram
Bearish Regime: Price consistently below support zone with red candles and blue histogram
Neutral Regime: Price oscillating between support and resistance zones with white candles
Generate Trading Signals
Buy Signals: Look for price crossing above the bull market zone (resistance) with confirmation from green candles
Sell Signals: Look for price crossing below the bear market zone (support) with confirmation from red candles
Confirmation: Always wait for confirmation from candle color changes before entering trades
Optimize for Different Timeframes
Scalping: Use shorter ALMA lengths (3-5) for 1-5 minute charts
Day Trading: Use medium ALMA lengths (5-13) for 15-60 minute charts
Swing Trading: Use longer ALMA lengths (13-21) for 1-4 hour charts
Position Trading: Use very long ALMA lengths (21+) for daily and weekly charts
 LIMITATIONS 
Whipsaw Markets: The indicator may generate false signals in choppy, sideways markets where price oscillates rapidly between support and resistance
Lagging Nature: Like all moving average-based indicators, there is inherent lag in the calculations, which may result in delayed signals
Not a Standalone Tool: This indicator should be used in conjunction with other technical analysis tools and risk management strategies
Market Structure Dependency: Performance may vary depending on market structure and volatility conditions
Parameter Sensitivity: Different markets may require different parameter settings for optimal performance
No Volume Integration: The indicator does not incorporate volume data, which could provide additional confirmation signals
Limited Backtesting: Pine Script limitations may restrict comprehensive backtesting capabilities
Not Suitable for All Instruments: May perform differently on stocks, forex, crypto, and futures markets
Requires Confirmation: Signals should always be confirmed with other indicators or price action analysis
Not Predictive: The indicator identifies current market conditions but does not predict future price movements
 NOTES 
ALMA Algorithm: The indicator uses the Arnaud Legoux Moving Average (ALMA) algorithm, which is known for its excellent smoothing capabilities and reduced lag compared to traditional moving averages
Weighted Price Calculations: The bear market zone uses (2low + close) / 3, while the bull market zone uses (high + 2close) / 3, providing more weight to recent price action
Dynamic Zones: The support and resistance zones are dynamic and adapt to changing market conditions, making them more responsive than static levels
Color Psychology: The color scheme follows traditional trading psychology - green for bullish, red for bearish, and white for neutral
Signal Timing: The signals are generated on the close of each bar, ensuring they are based on complete price action
Label Positioning: Buy signals appear below the bar (red "B" label), while sell signals appear above the bar (green "S" label)
Multiple Timeframes: The indicator can be applied to multiple timeframes simultaneously for comprehensive analysis
Risk Management: Always use proper risk management techniques when trading based on indicator signals
Market Context: Consider the overall market context and trend direction when interpreting signals
Confirmation: Look for confirmation from other indicators or price action patterns before entering trades
Practice: Test the indicator on historical data before using it in live trading
Customization: Feel free to experiment with different parameter combinations to find what works best for your trading style
 THANKS 
Special thanks to the TradingView community and the Pine Script developers for creating such a powerful and flexible platform for technical analysis. This indicator builds upon the foundation of the ALMA algorithm and various moving average techniques developed by technical analysis pioneers. The concept of dynamic support and resistance zones has been refined over decades of market analysis, and this script represents a modern implementation of these timeless principles. We acknowledge the contributions of all traders and developers who have contributed to the evolution of technical analysis and continue to push the boundaries of what's possible with algorithmic trading tools.
BTC Power-Law Decay Channel Oscillator (0โ100)๐  BTC Power-Law Decay Channel Oscillator (0โ100)
This indicator calculates Bitcoinโs position inside its long-term power-law decay channel and normalizes it into an easy-to-read 0โ100 oscillator.
๐ Concept
Bitcoinโs long-term price trajectory can be modeled by a log-log power-law channel.
A baseline is fitted, then an upper band (excess/euphoria) and a lower band (capitulation/fear).
The oscillator shows where the current price sits between those bands:
0 = near the lower band (historical bottoms)
100 = near the upper band (historical tops)
๐ How to Read
Oscillator > 80 โ euphoric excess, often cycle tops
Oscillator < 20 โ capitulation, often cycle bottoms
Works best on weekly or bi-weekly timeframes.
โ๏ธ Adjustable Parameters
Anchor date: starting point for the power-law fit (default: 2011).
Smoothing days: moving average applied to log-price (default: 365 days).
Upper / Lower multipliers: scale the bands to align with historical highs and lows.
โ
 Best Use
Combine with other cycle signals (dominance ratios, macro indicators, sentiment).
Designed for long-term cycle analysis, not intraday trading.
Algo + Trendlines :: Medium PeriodThis indicator helps me to avoid overlooking Trendlines / Algolines. So far it doesn't search explicitly for Algolines (I don't consider volume at all), but it's definitely now already not horribly bad.
These are meant to be used on logarithmic charts btw! The lines would be displayed wrong on linear charts.
The biggest challenge is that there are some technical restrictions in TradingView, f. e. a script stops executing if a for-loop would take longer than 0.5 sec.
So in order to circumvent this and still be able to consider as many candles from the past as possible, I've created multiple versions for different purposes that I use like this:
 
   Algo + Trendlines :: Medium Period : This script looks for "temporary highs / lows" (meaning the bar before and after has lower highs / lows) on the daily chart, connects them and shows the 5 ones that are the closest to the current price (=most relevant). This one is good to find trendlines more thoroughly, but only up to 4 years ago.
   Algo + Trendlines :: Long Period : This version looks instead at the weekly charts for "temporary highs / lows" and finds out which days caused these highs / lows and connects them, Taking data from the weekly chart means fewer data points to check whether a trendline is broken, which allows to detect trendlines from up to 12 years ago! Therefore it misses some trendlines. Personally I prefer this one with "Only Confirmed" set to true to really show only the most relevant lines. This means at least 3 candle highs / lows touched the line. These are more likely stronger resistance / support lines compared to those that have been touched only twice.
 
 Very important:  sometimes you might see dotted lines that suddenly stop after a few months (after 100 bars to be precise). This indicates you need to zoom further out for TradingView to be able to load the full line. Unfortunately TradingView doesn't render lines if the starting point was too long ago, so this is my workaround. This is also the script's biggest advantage: showing you lines that you might have missed otherwise since the starting bars were outside of the screen, and required you to scroll f. e back to 2015..
One more thing to know:
 
  Weak colored line = only 2 "collision" points with candle highs/lows (= not confirmed)
  Usual colored line = 3+ "collision" points (= confirmed)
 
Make sure to move this indicator above the ticker in the Object Tree, so that it is drawn on top of the ticker's candles!
More infos:  www.reddit.com
Algo + Trendlines :: Long PeriodThis indicator helps me to avoid overlooking Trendlines / Algolines. So far it doesn't search explicitly for Algolines (I don't consider volume at all), but it's definitely now already not horribly bad.
These are meant to be used on logarithmic charts btw! The lines would be displayed wrong on linear charts.
The biggest challenge is that there are some technical restrictions in TradingView, f. e. a script stops executing if a for-loop would take longer than 0.5 sec.
So in order to circumvent this and still be able to consider as many candles from the past as possible, I've created multiple versions for different purposes that I use like this:
 
   Algo + Trendlines :: Medium Period : This script looks for "temporary highs / lows" (meaning the bar before and after has lower highs / lows) on the daily chart, connects them and shows the 5 ones that are the closest to the current price (=most relevant). This one is good to find trendlines more thoroughly, but only up to 4 years ago.
   Algo + Trendlines :: Long Period : This version looks instead at the weekly charts for "temporary highs / lows" and finds out which days caused these highs / lows and connects them, Taking data from the weekly chart means fewer data points to check whether a trendline is broken, which allows to detect trendlines from up to 12 years ago! Therefore it misses some trendlines. Personally I prefer this one with "Only Confirmed" set to true to really show only the most relevant lines. This means at least 3 candle highs / lows touched the line. These are more likely stronger resistance / support lines compared to those that have been touched only twice.
 
 Very important:  sometimes you might see dotted lines that suddenly stop after a few months (after 100 bars to be precise). This indicates you need to zoom further out for TradingView to be able to load the full line. Unfortunately TradingView doesn't render lines if the starting point was too long ago, so this is my workaround. This is also the script's biggest advantage: showing you lines that you might have missed otherwise since the starting bars were outside of the screen, and required you to scroll f. e back to 2015..
One more thing to know:
 
  Weak colored line = only 2 "collision" points with candle highs/lows (= not confirmed)
  Usual colored line = 3+ "collision" points (= confirmed)
 
Make sure to move this indicator above the ticker in the Object Tree, so that it is drawn on top of the ticker's candles!
More infos:  www.reddit.com
Market State Momentum OscillatorMarket State Momentum Oscillator (MSMO)
Overview
The MSMO combines three elements in one panel:
Momentum oscillator (gray/blue area with aqua signal line)
Market State filter (green/red background area)
Money Flow Index (orange line)
Works on all markets and all timeframes. Non-repainting at bar close.
Colors and meaning
Gray area: Momentum above 0 (bullish bias)
Blue area: Momentum below 0 (bearish bias)
Aqua line: Signal line smoothing the oscillator
Green background: Market state bullish (price above moving average)
Red background: Market state bearish (price below moving average)
Orange line: Money Flow Index (volume-weighted momentum)
How to use
Always wait for confirmation of the green or red market state before acting.
Trend alignment: Watch the slope of the Weekly and Daily 200 MA and Weekly and Daily 50 MA to understand higher-timeframe trend direction. Trade only in alignment with the broader trend.
Entries:
Long: Green state + gray histogram rising + MFI trending up
Short: Red state + blue histogram falling + MFI trending down
Exits: Histogram crossing back through 0, or state background flips against the position.
Users can add chart alerts on plot crossings if needed.
Inputs
Lengths for oscillator pivot, signal smoothing, state moving average, trend weight, return %, and Money Flow Index. Defaults work for most charts.
Note
Educational use only. Not financial advice.
Tags
trend, oscillator, market state, momentum, money flow, crypto, forex, stocks, indices, futures
UDVR + OBV Combo โ MTF (v6)The UDVR + OBV Combo is a multi-timeframe volume analysis tool that blends the Up/Down Volume Ratio with a normalized On-Balance Volume signal. It highlights when accumulation or distribution truly supports price action, adds higher-timeframe context, and shades the background when both indicators align. Use it to confirm breakouts, spot divergences, and filter trades with the backing of real volume flows. 
 1.Up/Down Volume Ratio (UDVR) 
โขCompares the rolling sum of up-volume (bars where price closed higher) vs down-volume (bars where price closed lower).
โขA ratio > 1.0 = more accumulation (bullish pressure).
โขA ratio < 1.0 = more distribution (bearish pressure).
โขOptional histogram shows deviations from the 1.0 baseline.
โขCustomizable handling of equal closes (count as up, down, split, or ignore).
โขConfigurable lookback length and optional EMA smoothing.
 2.	On-Balance Volume (OBV) 
โขClassic cumulative OBV implemented natively (adds volume on up-bars, subtracts on down-bars).
โขNormalized with a z-score so it can be compared across different symbols/timeframes.
โขIncludes an EMA signal line for slope detection.
โขAlignment of OBV vs its EMA highlights rising or waning participation.
 3.	Multi-Timeframe Support 
โขBoth UDVR and OBV can be plotted from a higher timeframe (HTF) (e.g. Daily UDVR shown on a 1h chart).
โขLets you see big-money accumulation/distribution while trading intraday.
โขShaded background when current TF and HTF agree (both bullish or both bearish).
 How to read it 
โข Bullish confirmation  = UDVR > 1 (accumulation) and OBV above EMA (rising participation).
โข Bearish confirmation  = UDVR < 1 (distribution) and OBV below EMA (falling participation).
โข Mixed signals  (e.g. UDVR > 1 but OBV falling) = caution; price may lack conviction.
โข Divergences : If price makes a new high but OBV or UDVR does not, itโs a warning of weakening trend.
โข Higher timeframe context : set HTF = Daily or Weekly and watch how short-term signals align with institutional flows. A long trade on the 15m chart is stronger when Daily UDVR is also above 1.
 Inputs 
โขUDVR Lookback: number of bars for rolling volume sums.
โขSmoothing EMA: smooths UDVR for stability.
โขEqual Close Handling: decide how equal closes affect UDVR.
โขSignal Band: optional UDVR extreme thresholds.
โขShow Histogram: toggle UDVR histogram around baseline.
โขHigher Timeframe UDVR: overlay Daily/Weekly UDVR on lower timeframe charts.
โขOBV EMA length: slope proxy for normalized OBV.
โขOBV Normalization window: controls z-score sensitivity.
โขHigher Timeframe OBV: overlay higher timeframe OBV.
 Alerts 
โขUDVR Bullish/Bearish cross at the 1.0 baseline.
โขOBV slope up/down when OBV crosses its EMA.
โขAlignment signals when UDVR and OBV agree (both confirm bullish or bearish conditions).
 Why itโs useful 
โขCombines trend, momentum, and participation in one place.
โขHelps avoid false breakouts by checking if volume supports the move.
โขLets you spot accumulation/distribution shifts before they show up in price.
โขGives a higher timeframe context so youโre not trading against the โbig picture.โ
Once applied, the indicator creates a dedicated pane below price with the following components:
 UDVR Line (green/red) 
โข	Green when UDVR > 1.0 (more up-volume than down-volume โ accumulation).
โข	Red when UDVR < 1.0 (more down-volume โ distribution).
 UDVR Baseline and Bands 
โข	Grey baseline at 1.0 = balance between buying and selling volume.
โข	Optional upper/lower bands (default 1.5 and 0.67) highlight extreme imbalances.
โข	Shaded areas between baseline and bands provide visual context for strength/weakness.
 UDVR Histogram (optional) 
โข	Columns around the baseline showing (UDVR โ 1.0).
โข	Quick way to gauge how far above/below balance the ratio is.
 Higher-Timeframe UDVR (teal line) 
โข	Overlays the UDVR from a higher timeframe (e.g. Daily) on your intraday chart.
โข	Lets you see whether institutional flows support your shorter-term signals.
 OBV Normalized (blue/orange line) 
โข	Classic OBV, but normalized with a z-score so it stays readable across assets.
โข	Blue when OBV is above its EMA (rising participation).
โข	Orange when below its EMA (waning participation).
 OBV EMA (grey line) 
โข	Signal line showing the slope of OBV.
โข	Crosses between OBV and this line mark shifts in participation.
 Higher-Timeframe OBV (purple line, optional) 
โข	Plots OBV from a higher timeframe for additional context.
 Background Shading 
โข	Light green = both UDVR > 1 and OBV > OBV-EMA (bullish alignment).
โข	Light red = both UDVR < 1 and OBV < OBV-EMA (bearish alignment).
Statistical FootprintStatistical Footprint - Behavioral Support & Resistance 
This indicator identifies key price levels based on actual market behavior rather than traditional pivot calculations. It analyzes how bulls and bears have historically moved price from session opens, creating statistical zones where future reactions are most likely.
The concept is simple: track how far bullish candles typically push above the open versus how far bearish candles drop below it. These patterns reveal the market's behavioral "footprint" - showing where momentum typically stalls and reverses.
 Key Features: 
  - Separate analysis for daily and weekly timeframes
  - Smart zone merging when levels cluster together (within 5 points)
  - Uses both mean and median calculations for more robust levels
  - XGBoost-optimized lookback periods for maximum statistical significance
  - Clean zone-only display focused on actionable price areas
 How it Works: 
The code separates bullish and bearish sessions, measuring their typical range extensions from the open. It then projects these statistical ranges forward from current session opens, creating "behavioral zones" where the market has historically shown consistent reactions.
When daily and weekly levels align closely, they merge into combined zones with enhanced significance. Labels show both the mean and median values when they differ meaningfully.
 Best Used For: 
  - Identifying high-probability reversal zones
  - Setting profit targets based on historical behavior
  - Understanding market sentiment shifts at key levels
  - Confluence analysis between different timeframes
 The lookback periods have been optimized using machine learning to find the most predictive historical sample sizes for current market conditions.
MK_OSFT-Multi-Timeframe MA Dashboard & Smart Alerts-v2๐  Multi-Timeframe MA Dashboard & Smart Alerts v2.0 
Transform your trading with the ultimate moving average monitoring system that tracks up to 8 different MA configurations across multiple timeframes simultaneously.
๐ฏ  What This Indicator Does 
This advanced dashboard eliminates the need to constantly switch between timeframes by displaying all your critical moving averages on a single chart. Whether you're scalping on 5-minute charts or swing trading on daily timeframes, you'll instantly see the big picture.
โญ  Key Features 
๐ Multi-Timeframe Moving Averages
 
 Monitor up to **8 different MA configurations** simultaneously
 Support for **SMA and EMA** across 6 timeframes (5m, 15m, 1h, 4h, Daily, Weekly)
 Each MA fully customizable: length, color, alert settings, and visibility
 Smart visual representation with labeled horizontal lines and connecting plots
 ๐จ Intelligent Alert System 
 Cross-over/Cross-under alerts  for price vs MA interactions
 Three alert modes : No alerts, Once only, or Once per bar close
 Smart batching system  prevents alert spam during volatile periods
 Queue management  with 3-second delays between alerts for optimal performance
 Easy alert reset functionality for "once only" alerts
 ๐  Real-Time Information Dashboard 
 Live countdown timers  showing time remaining until each timeframe closes
 Color-coded progress bars  with gradient visualization (green โ yellow โ orange โ red)
 Instant cross-over detection  with up/down arrow indicators
 Price vs MA relationship  clearly displayed (above/below coloring)
 
๐จ  Professional Visualization 
 
 Anti-overlap technology  prevents labels from clustering
 Customizable label positioning  and sizing options
 Drawing order control  (larger timeframes first/last)
 Connecting lines  link current price to MA values
 Status line integration  for quick value reference
 
๐ก  Perfect For 
 
 Multi-timeframe traders [/b who need complete market context
 Trend followers  monitoring key MA levels across timeframes  
 Breakout traders  waiting for price to cross critical moving averages
 Risk managers  using MAs as dynamic support/resistance levels
 Anyone wanting organized, clutter-free MA monitoring 
 
โ๏ธ  Highly Configurable 
 Moving Average Settings 
 Individual enable/disable  for each of 8 MA slots
 Flexible timeframe selection : 5m, 15m, 1h, 4h, Daily, Weekly
 MA type choice : SMA or EMA for each configuration
 Custom lengths  from 1 to any desired period
 Color customization  for each MA line and label
 
 Alert Management   
 
 Per-MA alert configuration : Choose which MAs trigger alerts
 Source selection : Current bar vs last confirmed bar calculations
 Frequency control : Prevent over-alerting with smart queuing
 Reset functionality : Easily reactivate "fired" once-only alerts
 
 Display Options 
 
 Table positioning : Top-right, bottom-left, or bottom-right
 Label styling : Size, offset, and gap control
 Line customization : Width and extension options
 Timezone adjustment : Align timestamps with your local time
 
๐ง  Technical Excellence 
 
 Optimized performance  with efficient array management and single-pass calculations
 Real-time vs historical mode  handling for accurate backtesting
 Memory-efficient  label and line management prevents accumulation
 Robust error handling  and edge case management
 Clean, well-documented code  following Pine Script best practices
 
๐  How to Use 
 
 Add to chart  and configure your desired MA combinations
 Set alert preferences  for each MA (none/once/per bar)
 Create TradingView alert  using "Any alert() function calls"
 Monitor the dashboard  for cross-over signals and timeframe progress
 Use the info table  to track all MA values and alert statuses at a glance
 
๐  Educational Value 
This indicator serves as an excellent educational tool for understanding:
 Multi-timeframe analysis principles
 Moving average confluence and divergence
 Alert system design and management
 Professional indicator development techniques 
---
Transform your trading workflow with this professional-grade multi-timeframe MA monitoring system. No more chart hopping - get the complete moving average picture in one powerful dashboard!
 ยฉ  MK_OSF_TRADING  | Pine Script v6 | Mozilla Public License 2.0
Custom Volume + Buyer & Price %Title: Custom Volume + Buyer & Price %
Description:
This indicator helps you see who is controlling the market โ buyers or sellers โ using volume and price action. It works even if your chart is on a small timeframe (like 5-min or 15-min), by showing Daily, Weekly, and Monthly information from the higher timeframe volume charts.
Key Features & How It Works:
Buyer % (B%):
Measures where the closing price is within the high-low range of a candle.
Calculation:
\text{Buyer %} = \frac{\text{Close} - \text{Low}}{\text{High} - \text{Low}} \times 100
Interpretation:
> 50% โ Buyers are stronger
< 50% โ Sellers are stronger
50% โ Balanced
Volume Coloring:
Volume bars are colored based on Buyer %, not price movement:
Green โ Buyers dominate
Red โ Sellers dominate
Yellow โ Balanced day
Higher Timeframe Insight:
Displays Daily, Weekly, and Monthly volume & Buyer % even if your chart is on a smaller timeframe.
Lets you understand long-term buying or selling pressure while trading intraday.
21-Day Average:
Shows average Buyer % and average volume over the past 21 days for trend context.
Why Itโs Useful:
Quickly visualize whether the market is buyer-driven or seller-driven.
Identify strong accumulation or distribution days.
Works on any chart timeframe while giving higher timeframe perspective.
Ideal for traders who want easy, visual insight into market sentiment.
VWAP with period (rajib127)VWAP with Adjustable Period  (rajib127)
This advanced VWAP (Volume Weighted Average Price) indicator offers enhanced functionality with customizable anchor periods and multiple standard deviation bands.
Key Features:
Adjustable Anchor Period: Unlike standard VWAP that resets daily, this indicator allows you to set custom anchor timeframes (Daily, Weekly, Monthly) to match your trading strategy
Multiple Deviation Bands: Display up to 3 sets of bands with customizable multipliers for better support/resistance identification
Dual Calculation Modes: Choose between Standard Deviation or Percentage-based band calculations
Flexible Price Sources: Select from 7 different price calculation methods (Typical, Close, High, Low, Median, Weighted, Open)
Timeframe Visibility Control: Option to hide VWAP on higher timeframes (Daily and above) for cleaner charts
Visual Enhancements: Color-coded bands with fill areas and real-time value display table
Trading Applications:
Identify dynamic support and resistance levels
Spot mean reversion opportunities when price deviates from bands
Use different anchor periods for swing trading vs day trading strategies
Combine with other indicators for confluence-based entries
 Unique Advantage:
The ability to adjust the VWAP reset period makes this indicator versatile for various trading styles - from intraday scalping with hourly resets to swing trading with weekly anchors.
Perfect for traders who want more control over their VWAP analysis beyond the standard daily reset limitation.
Advanced Volume Profile Pro  Delta + POC + VAH/VAL# Advanced Volume Profile Pro - Delta + POC + VAH/VAL Analysis System
## WHAT THIS SCRIPT DOES
This script creates a comprehensive volume profile analysis system that combines traditional volume-at-price distribution with delta volume calculations, Point of Control (POC) identification, and Value Area (VAH/VAL) analysis. Unlike standard volume indicators that show only total volume over time, this script analyzes volume distribution across price levels and estimates buying vs selling pressure using multiple calculation methods to provide deeper market structure insights.
## WHY THIS COMBINATION IS ORIGINAL AND USEFUL
**The Problem Solved:** Traditional volume indicators show when volume occurs but not where price finds acceptance or rejection. Standalone volume profiles lack directional bias information, while basic delta calculations don't provide structural context. Traders need to understand both volume distribution AND directional sentiment at key price levels.
**The Solution:** This script implements an integrated approach that:
- Maps volume distribution across price levels using configurable row density
- Estimates delta (buying vs selling pressure) using three different methodologies
- Identifies Point of Control (highest volume price level) for key support/resistance
- Calculates Value Area boundaries where 70% of volume traded
- Provides real-time alerts for key level interactions and volume imbalances
**Unique Features:**
1. **Developing POC Visualization**: Real-time tracking of Point of Control migration throughout the session via blue dotted trail, revealing institutional accumulation/distribution patterns before they complete
2. **Multi-Method Delta Calculation**: Price Action-based, Bid/Ask estimation, and Cumulative methods for different market conditions
3. **Adaptive Timeframe System**: Auto-adjusts calculation parameters based on chart timeframe for optimal performance
4. **Flexible Profile Types**: N Bars Back (precise control), Days Back (calendar-based), and Session-based analysis modes
5. **Advanced Imbalance Detection**: Identifies and highlights significant buying/selling imbalances with configurable thresholds
6. **Comprehensive Alert System**: Monitors POC touches, Value Area entry/exit, and major volume imbalances
## HOW THE SCRIPT WORKS TECHNICALLY
### Core Volume Profile Methodology:
**1. Price Level Distribution:**
- Divides price range into user-defined rows (10-50 configurable)
- Calculates row height: `(Highest Price - Lowest Price) / Number of Rows`
- Distributes each bar's volume across price levels it touched proportionally
**2. Delta Volume Calculation Methods:**
**Price Action Method:**
```
Price Range = High - Low
Buy Pressure = (Close - Low) / Price Range
Sell Pressure = (High - Close) / Price Range
Buy Volume = Total Volume ร Buy Pressure
Sell Volume = Total Volume ร Sell Pressure
Delta = Buy Volume - Sell Volume
```
**Bid/Ask Estimation Method:**
```
Average Price = (High + Low + Close) / 3
Buy Volume = Close > Average ? Volume ร 0.6 : Volume ร 0.4
Sell Volume = Total Volume - Buy Volume
```
**Cumulative Method:**
```
Buy Volume = Close > Open ? Volume : Volume ร 0.3
Sell Volume = Close โค Open ? Volume : Volume ร 0.3
```
**3. Point of Control (POC) Identification:**
- Scans all price levels to find maximum volume concentration
- POC represents the price level with highest trading activity
- Acts as significant support/resistance level
- **Developing POC Feature**: Tracks POC evolution in real-time via blue dotted trail, showing how institutional interest migrates throughout the session. Upward POC migration indicates accumulation patterns, downward migration suggests distribution, providing early trend signals before price confirmation.
**4. Value Area Calculation:**
- Starts from POC and expands up/down to encompass 70% of total volume
- VAH (Value Area High): Upper boundary of value area
- VAL (Value Area Low): Lower boundary of value area
- Expansion algorithm prioritizes direction with higher volume
**5. Adaptive Range Selection:**
Based on profile type and timeframe optimization:
- **N Bars Back**: Fixed lookback period with performance optimization (20-500 bars)
- **Days Back**: Calendar-based analysis with automatic timeframe adjustment (1-365 days)
- **Session**: Current trading session or custom session times
### Performance Optimization Features:
- **Sampling Algorithm**: Reduces calculation load on large datasets while maintaining accuracy
- **Memory Management**: Clears previous drawings to prevent performance degradation
- **Safety Constraints**: Prevents excessive memory usage with configurable limits
## HOW TO USE THIS SCRIPT
### Initial Setup:
1. **Profile Configuration**: Select profile type based on trading style:
   - N Bars Back: Precise control over data range
   - Days Back: Intuitive calendar-based analysis
   - Session: Real-time session development
2. **Row Density**: Set number of rows (30 default) - more rows = higher resolution, slower performance
3. **Delta Method**: Choose calculation method based on market type:
   - Price Action: Best for trending markets
   - Bid/Ask Estimate: Good for ranging markets
   - Cumulative: Smoothed approach for volatile markets
4. **Visual Settings**: Configure colors, position (left/right), and display options
### Reading the Profile:
**Volume Bars:**
- **Length**: Represents relative volume at that price level
- **Color**: Green = net buying pressure, Red = net selling pressure
- **Intensity**: Darker colors indicate volume imbalances above threshold
**Key Levels:**
- **POC (Blue Line)**: Highest volume price - major support/resistance
- **VAH (Purple Dashed)**: Value Area High - upper boundary of fair value
- **VAL (Orange Dashed)**: Value Area Low - lower boundary of fair value
- **Value Area Fill**: Shaded region showing main trading range
**Developing POC Trail:**
- **Blue Dotted Lines**: Show real-time POC evolution throughout the session
- **Migration Patterns**: Upward trail indicates bullish accumulation, downward trail suggests bearish distribution
- **Early Signals**: POC movement often precedes price movement, providing advance warning of institutional activity
- **Institutional Footprints**: Reveals where smart money concentrated volume before final POC establishment
### Trading Applications:
**Support/Resistance Analysis:**
- POC acts as magnetic price level - expect reactions
- VAH/VAL provide intermediate support/resistance levels
- Profile edges show areas of low volume acceptance
**Developing POC Analysis:**
- **Upward Migration**: POC moving higher = institutional accumulation, bullish bias
- **Downward Migration**: POC moving lower = institutional distribution, bearish bias  
- **Stable POC**: Tight clustering = balanced market, range-bound conditions
- **Early Trend Detection**: POC direction change often precedes price breakouts
**Entry Strategies:**
- Buy at VAL with POC as target (in uptrends)
- Sell at VAH with POC as target (in downtrends)
- Breakout plays above/below profile extremes
**Volume Imbalance Trading:**
- Strong buying imbalance (>60% threshold) suggests continued upward pressure
- Strong selling imbalance suggests continued downward pressure
- Imbalances near key levels provide high-probability setups
**Multi-Timeframe Context:**
- Use higher timeframe profiles for major levels
- Lower timeframe profiles for precise entries
- Session profiles for intraday trading structure
## SCRIPT SETTINGS EXPLANATION
### Volume Profile Settings:
- **Profile Type**: Determines data range for calculation
  - N Bars Back: Exact number of bars (20-500 range)
  - Days Back: Calendar days with timeframe adaptation (1-365 days)
  - Session: Trading session-based (intraday focus)
- **Number of Rows**: Profile resolution (10-50 range)
- **Profile Width**: Visual width as chart percentage (10-50%)
- **Value Area %**: Volume percentage for VA calculation (50-90%, 70% standard)
- **Auto-Adjust**: Automatically optimizes for different timeframes
### Delta Volume Settings:
- **Show Delta Volume**: Enable/disable delta calculations
- **Delta Calculation Method**: Choose methodology based on market conditions
- **Highlight Imbalances**: Visual emphasis for significant volume imbalances
- **Imbalance Threshold**: Percentage for imbalance detection (50-90%)
### Session Settings:
- **Session Type**: Daily, Weekly, Monthly, or Custom periods
- **Custom Session Time**: Define specific trading hours
- **Previous Sessions**: Number of historical sessions to display
### Days Back Settings:
- **Lookback Days**: Number of calendar days to analyze (1-365)
- **Automatic Calculation**: Script automatically converts days to bars based on timeframe:
  - Intraday: Accounts for 6.5 trading hours per day
  - Daily: 1 bar per day
  - Weekly/Monthly: Proportional adjustment
### N Bars Back Settings:
- **Lookback Bars**: Exact number of bars to analyze (20-500)
- **Precise Control**: Best for systematic analysis and backtesting
### Visual Customization:
- **Colors**: Bullish (green), Bearish (red), and level colors
- **Profile Position**: Left or Right side of chart
- **Profile Offset**: Distance from current price action
- **Labels**: Show/hide level labels and values
- **Smooth Profile Bars**: Enhanced visual appearance
### Alert Configuration:
- **POC Touch**: Alerts when price interacts with Point of Control
- **VA Entry/Exit**: Alerts for Value Area boundary interactions
- **Major Imbalance**: Alerts for significant volume imbalances
## VISUAL FEATURES
### Profile Display:
- **Horizontal Bars**: Volume distribution across price levels
- **Color Coding**: Delta-based coloring for directional bias
- **Smooth Rendering**: Optional smoothing for cleaner appearance
- **Transparency**: Configurable opacity for chart readability
### Level Lines:
- **POC**: Solid blue line with optional label
- **VAH/VAL**: Dashed colored lines with value displays
- **Extension**: Lines extend across relevant time periods
- **Value Area Fill**: Optional shaded region between VAH/VAL
### Information Table:
- **Current Values**: Real-time POC, VAH, VAL prices
- **VA Range**: Value Area width calculation
- **Positioning**: Multiple table positions available
- **Text Sizing**: Adjustable for different screen sizes
## IMPORTANT USAGE NOTES
**Realistic Expectations:**
- Volume profile analysis provides structural context, not trading signals
- Delta calculations are estimations based on price action, not actual order flow
- Past volume distribution does not guarantee future price behavior
- Combine with other analysis methods for comprehensive market view
**Best Practices:**
- Use appropriate profile types for your trading style:
  - Day Trading: Session or Days Back (1-5 days)
  - Swing Trading: Days Back (10-30 days) or N Bars Back
  - Position Trading: Days Back (60-180 days)
- Consider market context (trending vs ranging conditions)
- Verify key levels with additional technical analysis
- Monitor profile development for changing market structure
**Performance Considerations:**
- Higher row counts increase calculation complexity
- Large lookback periods may affect chart performance
- Auto-adjust feature optimizes for most use cases
- Consider using session profiles for intraday efficiency
**Limitations:**
- Delta calculations are estimations, not actual transaction data
- Profile accuracy depends on available price/volume history
- Effectiveness varies across different instruments and market conditions
- Requires understanding of volume profile concepts for optimal use
**Data Requirements:**
- Requires volume data for accurate calculations
- Works best on liquid instruments with consistent volume
- May be less effective on very low volume or exotic instruments
This script serves as a comprehensive volume analysis tool for traders who need detailed market structure information with integrated directional bias analysis and real-time POC development tracking for informed trading decisions.
RRG Relative Strength# RRG Relative Strength (RRG RS)
Compare any symbol to a benchmark using two RRG-style lines: **RS-Ratio** (trend of relative strength) and **RS-Momentum** (momentum of that trend). Both are centered at **100**:
- **RS-Ratio > 100** โ outperforming the benchmark
- **RS-Ratio < 100** โ underperforming
- **RS-Momentum** often **leads** RS-Ratio (crosses 100 earlier)
# How it works
1) Relative Strength (RS): RS = Close(symbol) / Close(benchmark)
2) Normalize around 100: smooth RS with EMA and divide RS by that EMA
3) RS-Ratio: EMA( RS / EMA(RS, Length), LenSmooth ) * 100
4) RS-Momentum: RS-Ratio / EMA(RS-Ratio, LenSmooth) * 100
# Inputs
- Length (default 14): normalization window for RS
- Length Smooth (default 20): smoothing window for RS-Ratio & RS-Momentum
# Benchmark (auto)
- US: SP:SPX (S&P 500)
- Vietnam: HOSE:VNINDEX
- Crypto: INDEX:BTCUSD
(Modify the mapping if needed, or replace with your own input.symbol().)
# How to read
- Improving: RS-Momentum crosses above 100 while RS-Ratio turns up
- Leading: RS-Ratio > 100 with RS-Momentum โฅ 100
- Weakening: RS-Momentum drops below 100; RS-Ratio often follows
# Timeframes & presets
- Works on Daily and Weekly charts
- Daily (fast): 14 / 20
- Approx. weekly behavior on Daily: 50 / 60
Note: Values usually hover near 100 (e.g., ~90โ110) but are not strictly bounded. Ensure your symbol and benchmark trade in comparable sessions/currencies.
MVRV and RSI Std DevThis indicator provides a comprehensive, long-term view of market risk and opportunity for Bitcoin by combining fundamental on-chain data with classic momentum analysis.
How It Works:
The oscillator's value is calculated by multiplying two key metrics:
MVRV Ratio: An on-chain metric that indicates if the market price is "fair," "overvalued," or "undervalued" relative to the average price at which all coins last moved.
Weekly RSI: The standard Relative Strength Index on a weekly timeframe to measure long-term market momentum and identify overbought/oversold conditions.
Key Features:
Adaptive Risk Bands: Instead of fixed "overbought/oversold" levels, this indicator uses dynamic bands based on a long-term 4 year moving average and standard deviation. These bands automatically adjust to the market's changing volatility and cyclical nature, ensuring the risk/reward zones remain relevant over time.
Gradient Coloring: The oscillator line is colored on a smooth gradient from deep green (high reward/low risk) to bright red (high risk/low reward). This provides an intuitive, at-a-glance visualization of the market's "temperature."
Multi Volume Weighted Average Price1. Three independent VWAP configurations (VWAP 1, 2, and 3). Each can be set up separately
for periods such as: session, daily, weekly, monthly, etc.
2. Previous VWAP closing prices: Closed VWAPs from previous periods remain visible until the
price touches them. At that point, they are removed.
3. Bands: Based on standard deviation or a percentage of VWAP with an adjustable multiplier.
The bands can be turned on or off.
4. Source: OHLC4 is the default setting for an accurate approximation, but it is customizable
(e.g. HLC3).
5. Global Setting: Select 10,000 or 20,000 historical bars to prevent runtime errors for long
periods.
Usage tips:
1. Use VWAP 1 for daily sessions, VWAP 2 for weekly, and VWAP 3 for Monthly analysis to receive
multi-timeframe support.
2. Customize the labels to clearly distinguish them (e.g. D VWAP, W VWAP, M VWAP).
3. If you encounter errors with historical data (e.g. on the M1 chart), minimize the number of
historical bars displayed to 10,000.
Bitcoin Expectile Model [LuxAlgo]The Bitcoin Expectile Model is a novel approach to forecasting Bitcoin, inspired by the popular Bitcoin Quantile Model by PlanC. By fitting multiple Expectile regressions to the price, we highlight zones of corrections or accumulations throughout the Bitcoin price evolution.
While we strongly recommend using this model with the Bitcoin All Time History Index  INDEX:BTCUSD  on the 3 days or weekly timeframe using a logarithmic scale, this model can be applied to any asset using the daily timeframe or superior.
 Please note that here on TradingView, this model was solely designed to be used on the Bitcoin 1W chart, however, it can be experimented on other assets or timeframes if of interest. 
๐ถ  USAGE 
  
The Bitcoin Expectile Model can be applied similarly to models used for Bitcoin, highlighting lower areas of possible accumulation (support) and higher areas that allow for the anticipation of potential corrections (resistance).
By default, this model fits 7 individual Expectiles Log-Log Regressions to the price, each with their respective expectile ( tau ) values (here multiplied by 100 for the user's convenience). Higher tau values will return a fit closer to the higher highs made by the price of the asset, while lower ones will return fits closer to the lower prices observed over time.
  
Each zone is color-coded and has a specific interpretation. The green zone is a buy zone for long-term investing, purple is an anomaly zone for market bottoms that over-extend, while red is considered the distribution zone.
  
The fits can be extrapolated, helping to chart a course for the possible evolution of Bitcoin prices. Users can select the end of the forecast as a date using the "Forecast End" setting.
  
While the model is made for Bitcoin using a log scale, other assets showing a tendency to have a trend evolving in a single direction can be used. See the chart above on QQQ weekly using a linear scale as an example.
  
The Start Date can also allow fitting the model more locally, rather than over a large range of prices. This can be useful to identify potential shorter-term support/resistance areas.
๐ถ  DETAILS 
๐น On Quantile and Expectile Regressions 
Quantile and Expectile regressions are similar; both return extremities that can be used to locate and predict prices where tops/bottoms could be more likely to occur.
The main difference lies in what we are trying to minimize, which, for Quantile regression, is commonly known as Quantile loss (or pinball loss), and for Expectile regression, simply Expectile loss.
You may refer to external material to go more in-depth about these loss functions; however, while they are similar and involve weighting specific prices more than others relative to our parameter tau, Quantile regression involves minimizing a weighted mean absolute error, while Expectile regression minimizes a weighted squared error.
The squared error here allows us to compute Expectile regression more easily compared to Quantile regression, using Iteratively reweighted least squares. For Quantile regression, a more elaborate method is needed.
In terms of comparison, Quantile regression is more robust, and easier to interpret, with quantiles being related to specific probabilities involving the underlying cumulative distribution function of the dataset; on the other expectiles are harder to interpret.
๐น Trimming & Alterations 
It is common to observe certain models ignoring very early Bitcoin price ranges. By default, we start our fit at the date 2010-07-16 to align with existing models.
By default, the model uses the number of time units (days, weeks...etc) elapsed since the beginning of history + 1 (to avoid NaN with log) as independent variable, however the Bitcoin All Time History Index  INDEX:BTCUSD  do not include the genesis block, as such users can correct for this by enabling the "Correct for Genesis block" setting, which will add the amount of missed bars from the Genesis block to the start oh the chart history.
๐ถ  SETTINGS 
 
 Start Date: Starting interval of the dataset used for the fit.
 Correct for genesis block: When enabled, offset the X axis by the number of bars between the Bitcoin genesis block time and the chart starting time.
 
๐น Expectiles 
 
 Toggle: Enable fit for the specified expectile. Disabling one fit will make the script faster to compute.
 Expectile: Expectile (tau) value multiplied by 100 used for the fit. Higher values will produce fits that are located near price tops.
 
๐น Forecast 
 
 Forecast End: Time at which the forecast stops.
 
๐น Model Fit 
 
 Iterations Number: Number of iterations performed during the reweighted least squares process, with lower values leading to less accurate fits, while higher values will take more time to compute.
Dynamic OHLC levels(Day/Week/Month/6M/Year)+Open MarkerThis indicator automatically displays the Open, High, Low, and Close (OHLC) levels from the previous trading period directly on your chart. It's a versatile tool for identifying key support and resistance zones based on historical price action. The indicator offers a unique "Auto" mode that intelligently selects the most relevant time frame (Daily, Weekly, Monthly, 6M, or Yearly) based on your current chart's time frame. Alternatively, you can choose a specific time frame in "Manual" mode.
The indicator is designed to provide traders with clear visual cues for important price levels, helping them make more informed trading decisions. It's a valuable resource for both intraday and swing traders, as these levels often act as significant psychological barriers and turning points in the market.
Key Benefits ๐ฏ
Identifies Key Levels Instantly: Automatically plots crucial support and resistance levels from the previous session, saving you time and effort.
Adaptable & Versatile: The "Auto" mode intelligently adjusts to your chart's time frame, ensuring you always see the most relevant OHLC levels.
Customizable: You have full control over which levels to display (High, Low, Open, Close), their colors, line styles, and thickness.
Visual Clarity: The option to highlight the area between the previous high and low provides a clear visual representation of the past session's range.
Multi-Session Support: It supports both Regular Trading Hours (RTH) and Extended Trading Hours (ETH), with a configurable timezone, making it globally applicable.
Core Features โจ
Dynamic Timeframe Selection:
Auto Mode: Automatically displays previous Day OHLC on intraday charts (e.g., 1-hour), previous Week OHLC on daily charts, and so on.
Manual Mode: Allows you to explicitly choose between previous Day, Week, Month, 6-Month, or Year OHLC levels.
Customizable Visuals:
Show Previous High: Plots the highest price of the previous period.
Show Previous Low: Plots the lowest price of the previous period.
Show Previous Open: Plots the opening price of the previous period.
Show Previous Close: Plots the closing price of the previous period.
Show Current Open Marker Line: A separate line that marks the open of the current period.
Highlight Area: Fills the space between the previous high and low with a customizable color.
Global Trading Support:
Session Mode: Choose to display levels based on Regular Trading Hours, Extended Hours, or both.
Timezone Selection: Configure the session timezone to align with major markets like New York, London, Tokyo, or Kolkata.
Line Styling: Adjust the line thickness, style (Solid, Dashed, Dotted), and transparency for each level to match your chart's aesthetics.
Labels: Toggle on/off text labels that clearly identify each plotted level (e.g., "PDH" for Previous Day High).
Who is this indicator for? ๐ค
This indicator is a powerful tool for a wide range of traders looking to incorporate historical price action into their analysis.
Intraday Traders: Can use the previous Daily OHLC levels to identify potential support/resistance for breakouts and reversals during the trading day.
Swing Traders: Can leverage the previous Weekly, Monthly, or Yearly OHLC levels on higher time frames to spot long-term trend continuation or reversal points.
Day Traders: Use the Previous Daily High/Low to frame the day's trading range and identify key levels for potential mean-reversion trades.
Technical Analysts: Those who rely on key levels and price action will find this indicator invaluable for their analysis.
This indicator simplifies a crucial part of technical analysis, providing a clean, customizable, and adaptive way to visualize and trade off of historical price levels.
Dynamic 5DMA/EMA with Color for Multiple Products๐น Dynamic 5DMA/EMA with Slope-Based Coloring (All Timeframes)
This indicator plots a dynamic 5-period moving average that adapts intelligently to your chart's timeframe and product type โ giving you a clean, slope-sensitive visual edge across intraday, daily, and weekly views.
โ
 Key Features:
๐ Dynamic MA Length Scaling:
On intraday timeframes, the MA adjusts for your selected market session (RTH, ETH, VIX, or Futures), calculating a true 5-day average based on actual session length โ not just a flat bar count.
๐ Automatic Timeframe Detection:
Daily Chart: Uses standard 5DMA or 5EMA.
Weekly Chart: Applies a true 5-week MA.
Intraday Charts: Converts 5 days into bar-length equivalent dynamically.
๐จ Color-Coded Slope Logic:
Green = Rising MA (bullish slope)
Red = Falling MA (bearish slope)
Neutral slope = previous color held for visual continuity
No more guessing โ direction is instantly clear.
โ ๏ธ Built-In Slope Flip Alerts:
Set alerts when the slope of the MA turns up or down. Ideal for timing pullback entries or exits across any product.
โ๏ธ Session Settings for Proper Scaling:
Choose your product's market structure to ensure accurate 5-day conversion on intraday charts:
Stocks - RTH: 390 mins/day
Stocks - ETH: 780 mins/day
VIX: 855 mins/day
Futures: 1440 mins/day
This ensures the MA reflects 5 full trading days, regardless of session irregularities or bar interval.
๐ Why Use This Indicator?
Most MAs misrepresent trend direction on intraday charts because they assume static daily bar counts. This tool corrects that, then adds slope-based coloring to give you a fast, visual read on short-term momentum. Whether youโre swing trading SPY, scalping VIX, or position trading futures, this indicator keeps your view aligned with how institutions see moving averages across timeframes.
๐ง Best For:
VIX & volatility traders
Short-term SPY/SPX traders
Swing traders who value clean setups
Anyone wanting a true 5-day trend anchor on any chart
Bitcoin Logarithmic Growth Curve 2025 Z-Score"The Bitcoin logarithmic growth curve is a concept used to analyze Bitcoin's price movements over time. The idea is based on the observation that Bitcoin's price tends to grow exponentially, particularly during bull markets. It attempts to give a long-term perspective on the Bitcoin price movements.
The curve includes an upper and lower band. These bands often represent zones where Bitcoin's price is overextended (upper band) or undervalued (lower band) relative to its historical growth trajectory. When the price touches or exceeds the upper band, it may indicate a speculative bubble, while prices near the lower band may suggest a buying opportunity.
Unlike most Bitcoin growth curve indicators, this one includes a logarithmic growth curve optimized using the latest 2024 price data, making it, in our view, superior to previous models. Additionally, it features statistical confidence intervals derived from linear regression, compatible across all timeframes, and extrapolates the data far into the future. Finally, this model allows users the flexibility to manually adjust the function parameters to suit their preferences.
The Bitcoin logarithmic growth curve has the following function:
y = 10^(a * log10(x) - b)
In the context of this formula, the y value represents the Bitcoin price, while the x value corresponds to the time, specifically indicated by the weekly bar number on the chart.
How is it made (You can skip this section if youโre not a fan of math):
To optimize the fit of this function and determine the optimal values of a and b, the previous weekly cycle peak values were analyzed. The corresponding x and y values were recorded as follows:
113, 18.55
240, 1004.42
451, 19128.27
655, 65502.47
The same process was applied to the bear market low values:
103, 2.48
267, 211.03
471, 3192.87
676, 16255.15
Next, these values were converted to their linear form by applying the base-10 logarithm. This transformation allows the function to be expressed in a linear state: y = a * x โ b. This step is essential for enabling linear regression on these values.
For the cycle peak (x,y) values:
2.053, 1.268
2.380, 3.002
2.654, 4.282
2.816, 4.816
And for the bear market low (x,y) values:
2.013, 0.394
2.427, 2.324
2.673, 3.504
2.830, 4.211
Next, linear regression was performed on both these datasets. (Numerous tools are available online for linear regression calculations, making manual computations unnecessary).
Linear regression is a method used to find a straight line that best represents the relationship between two variables. It looks at how changes in one variable affect another and tries to predict values based on that relationship.
The goal is to minimize the differences between the actual data points and the points predicted by the line. Essentially, it aims to optimize for the highest R-Square value.
Below are the results:
snapshot
snapshot
It is important to note that both the slope (a-value) and the y-intercept (b-value) have associated standard errors. These standard errors can be used to calculate confidence intervals by multiplying them by the t-values (two degrees of freedom) from the linear regression.
These t-values can be found in a t-distribution table. For the top cycle confidence intervals, we used t10% (0.133), t25% (0.323), and t33% (0.414). For the bottom cycle confidence intervals, the t-values used were t10% (0.133), t25% (0.323), t33% (0.414), t50% (0.765), and t67% (1.063).
The final bull cycle function is:
y = 10^(4.058 ยฑ 0.133 * log10(x) โ 6.44 ยฑ 0.324)
The final bear cycle function is:
y = 10^(4.684 ยฑ 0.025 * log10(x) โ -9.034 ยฑ 0.063)
The main Criticisms of growth curve models:
The Bitcoin logarithmic growth curve model faces several general criticisms that weโd like to highlight briefly. The most significant, in our view, is its heavy reliance on past price data, which may not accurately forecast future trends. For instance, previous growth curve models from 2020 on TradingView were overly optimistic in predicting the last cycleโs peak.
This is why we aimed to present our process for deriving the final functions in a transparent, step-by-step scientific manner, including statistical confidence intervals. It's important to note that the bull cycle function is less reliable than the bear cycle function, as the top band is significantly wider than the bottom band.
Even so, we still believe that the Bitcoin logarithmic growth curve presented in this script is overly optimistic since it goes parly against the concept of diminishing returns which we discussed in this post:
This is why we also propose alternative parameter settings that align more closely with the theory of diminishing returns."
Now with Z-Score calculation for easy and constant valuation classification of Bitcoin according to this metric.
Created for TRW
Desempenho 4ยชs (MA)This Pine Script v5 indicator calculates the performance from Wednesday to Wednesday at 10:30 AM for the charted instrument. Every Wednesday at that time, it records the closing price and computes the percentage change, assigning a signal: +1 for increases above 1 %, -1 for declines below -1 %, and 0 for intermediate movements. It plots a five-period simple moving average on the main chart, color-coded green, red, or gray based on the weekly signal. Vertical dotted lines mark each weekly separation, and two blue horizontal lines denote the ยฑ1 % thresholds for the current week. A label displays the performance percentage and signal.
Period Highlighter ProPeriod Highlighter Pro  is a versatile Pine Script indicator designed to visually highlight specific time periods on your TradingView charts, making it easier to analyze seasonal patterns, trading sessions, or specific weekdays. With customizable settings for months, weekdays, or intraday time ranges, this tool adapts to your trading strategy, allowing you to focus on key periods with precision.
 Features 
 
 Flexible Highlight Modes:  Choose from three modes to highlight:
 Month Range:  Highlight specific months or a range (e.g., March to June) for seasonal analysis.
 Weekday Range:  Highlight specific weekdays (e.g., Mondays or Monday to Wednesday) for weekly pattern analysis.
 Time Range:  Highlight daily time windows (e.g., 15:30โ22:00) for intraday session analysis, restricted to weekdays.
 Customizable Timezone:  Set any IANA timezone (e.g., America/New_York, Europe/London) or UTC offset to align highlights with your preferred market hours.
 Historical Range Control:  Define how far back to apply highlights with options for years (Month Range), weeks (Weekday Range), or days (Time Range).
 Visual Customization:  Choose your highlight color to match your chart style.
 User-Friendly Inputs:  Intuitive dropdowns and tooltips guide you through configuring each mode, ensuring only relevant settings are adjusted.
 
 How It Works 
Select a highlight mode and configure the corresponding settings:
 
 Month Range:  Pick a start month and an optional end month (or "Disabled" for a single month) and set the number of years back.
 Weekday Range:  Choose a start weekday and an optional end weekday (or "Disabled" for a single day) and set the number of weeks back.
 Time Range:  Specify a start and end time (24-hour format) and the number of weekdays back. The indicator then applies a semi-transparent background color to chart bars that meet your criteria, making it easy to spot relevant periods.
 
 Use Cases 
 
 Seasonal Traders:  Highlight specific months to analyze recurring market patterns.
 Day Traders:  Focus on active trading sessions (e.g., New York open) with precise time range highlighting.
 Weekly Pattern Analysts:  Isolate specific weekdays to study price behavior.
 Global Traders:  Adjust for any timezone to align with your market of interest.
 
 Why Use Period Highlighter Pro? 
This indicator simplifies time-based analysis by providing a clear visual overlay for your chosen periods. Whether you're studying historical trends or focusing on specific trading hours, Period Highlighter Pro offers the flexibility and precision to enhance your chart analysis.
 Licensed under the Mozilla Public License 2.0.
Advanced Forex Currency Strength Meter 
# Advanced Forex Currency Strength Meter
 ๐ The Ultimate Currency Strength Analysis Tool for Forex Traders 
This sophisticated indicator measures and compares the relative strength of major currencies (EUR, GBP, USD, JPY, CHF, CAD, AUD, NZD) to help you identify the strongest and weakest currencies in real-time, providing clear trading signals based on currency strength differentials.
##  ๐ What This Indicator Does 
The Advanced Forex Currency Strength Meter analyzes currency relationships across 28+ major forex pairs and 8 currency indices to determine which currencies are gaining or losing strength. Instead of relying on individual pair analysis, this tool gives you a  bird's-eye view  of the entire forex market, helping you:
 
 Identify the strongest and weakest currencies at any given time
 Find high-probability trading opportunities by pairing strong vs weak currencies
 Avoid ranging markets by detecting when currencies have similar strength
 Get clear LONG/SHORT/NEUTRAL signals for your current trading pair
 Optimize your trading strategy based on your preferred timeframe and holding period
 
##  โ๏ธ How The Indicator Works 
###  Dual Calculation Method 
The indicator uses a sophisticated dual approach for maximum accuracy:
 
 Pairs-Based Analysis:  Calculates currency strength from 28+ major forex pairs (EURUSD, GBPUSD, USDJPY, etc.)
 Index-Based Analysis:  Incorporates official currency indices (DXY, EXY, BXY, JXY, CXY, AXY, SXY, ZXY)
 Weighted Combination:  Blends both methods using smart weighting for enhanced accuracy
 
###  Smart Auto-Optimization System 
The indicator automatically adjusts its parameters based on your chart timeframe and intended holding period:
 The system recognizes that scalping requires different sensitivity than swing trading, automatically optimizing lookback periods, analysis timeframes, signal thresholds, and index weights. 
###  Strength Calculation Process 
 
 Fetches price data from multiple timeframes using optimized tuple requests
 Calculates percentage change over the specified lookback period
 Optionally normalizes by ATR (Average True Range) to account for volatility differences
 Combines pair-based and index-based calculations using dynamic weighting
 Generates relative strength by comparing base currency vs quote currency
 Produces clear trading signals when strength differential exceeds threshold
 
##  ๐ฏ How To Use The Indicator 
###  Quick Start 
 
 Add the indicator to any forex pair chart
 Enable  ๐ง  Smart Auto-Optimization  (recommended for beginners)
 Watch for LONG ๐ signals when the relative strength line is green and above threshold
 Watch for SHORT ๐ป signals when the relative strength line is red and below threshold
 Avoid trading during NEUTRAL โช periods when currencies have similar strength
 
 Note:  This is highly recommended to couple this indicator with fundamental analysis and use it as an extra signal.
###  ๐ Parameters Reference 
####  ๐ค Smart Settings 
 
 ๐ง  Smart Auto-Optimization:   (Default: Enabled)  Automatically optimizes all parameters based on chart timeframe and trading style
 
####  โ๏ธ Manual Override 
 These settings are only active when Smart Auto-Optimization is disabled: 
 
 Manual Lookback Period:   (Default: 14)  Number of periods to analyze for strength calculation
 Manual ATR Period:   (Default: 14)  Period for ATR normalization calculation
 Manual Analysis Timeframe:   (Default: 240)  Higher timeframe for strength analysis
 Manual Index Weight:   (Default: 0.5)  Weight given to currency indices vs pairs (0.0 = pairs only, 1.0 = indices only)
 Manual Signal Threshold:   (Default: 0.5)  Minimum strength differential required for trading signals
 
####  ๐ Display 
 
 Show Signal Markers:   (Default: Enabled)  Display triangle markers when signals change
 Show Info Label:   (Default: Enabled)  Show comprehensive information label with current analysis
 
####  ๐ Analysis 
 
 Use ATR Normalization:   (Default: Enabled)  Normalize strength calculations by volatility for fairer comparison
 
####  ๐ฐ Currency Indices 
 
 ๐ฐ Use Currency Indices:   (Default: Enabled)  Include all 8 currency indices in strength calculation for enhanced accuracy
 
####  ๐จ Colors 
 
 Strong Currency Color:   (Default: Green)  Color for positive/strong signals
 Weak Currency Color:   (Default: Red)  Color for negative/weak signals  
 Neutral Color:   (Default: Gray)  Color for neutral conditions
 Strong/Weak Backgrounds:  Background colors for clear signal visualization
 
###  ๐ง  Smart Optimization Profiles 
The indicator automatically selects optimal parameters based on your chart timeframe:
####  โก Scalping Profile (1M-5M Charts) 
 For positions held for a few minutes: 
 
 Lookback: 5 periods (fast/sensitive)
 Analysis Timeframe: 15 minutes
 Index Weight: 20% (favor pairs for speed)
 Signal Threshold: 0.3% (sensitive triggers)
 
####  ๐ Intraday Profile (10M-1H Charts)  
 For positions held for a few hours: 
 
 Lookback: 12 periods (balanced sensitivity)
 Analysis Timeframe: 4 hours
 Index Weight: 40% (balanced approach)
 Signal Threshold: 0.4% (moderate sensitivity)
 
####  ๐ Swing Profile (4H-Daily Charts) 
 For positions held for a few days: 
 
 Lookback: 21 periods (stable analysis)
 Analysis Timeframe: Daily
 Index Weight: 60% (favor indices for stability)
 Signal Threshold: 0.5% (conservative triggers)
 
####  ๐ Position Profile (Weekly+ Charts) 
 For positions held for a few weeks: 
 
 Lookback: 30 periods (long-term view)
 Analysis Timeframe: Weekly
 Index Weight: 70% (heavily favor indices)
 Signal Threshold: 0.6% (very conservative)
 
###  Entry Timing 
 
 Wait for clear LONG ๐ or SHORT ๐ป signals
 Avoid trading during NEUTRAL โช periods
 Look for signal confirmations on multiple timeframes
 
###  Risk Management 
 
 Stronger signals (higher relative strength values) suggest higher probability trades
 Use appropriate position sizing based on signal strength
 Consider the trading style profile when setting stop losses and take profits
 
 ๐ก Pro Tip:  The indicator works best when combined with your existing technical analysis. Use currency strength to identify  which  pairs to trade, then use your favorite technical indicators to determine  when  to enter and exit. 
##  ๐ง Key Features 
 
 28+ Forex Pairs Analysis:  Comprehensive coverage of major currency relationships
 8 Currency Indices Integration:  DXY, EXY, BXY, JXY, CXY, AXY, SXY, ZXY for enhanced accuracy
 Smart Auto-Optimization:  Automatically adapts to your trading style and timeframe
 ATR Normalization:  Fair comparison across different currency pairs and volatility levels
 Real-Time Signals:  Clear LONG/SHORT/NEUTRAL signals with visual markers
 Performance Optimized:  Efficient tuple-based data requests minimize external calls
 User-Friendly Interface:  Simplified settings with comprehensive tooltips
 Multi-Timeframe Support:  Works on any timeframe from 1-minute to monthly charts
 
 Transform your forex trading with the power of currency strength analysis! ๐






















