Previous D/W/M HLOCHey traders,
Here's a simple Multi-Timeframe indicator that essentially turns time and price into a box. It'll take the previous high, low, opening price, or closing price from one of the three timeframes of your choice (day, week, or month). For whatever reason I can't get the opening price to function consistently so if you find improvements feel free to let me know, this will help traders who prefer to use opening price over closing price.
Naturally this form of charting is classical and nature and some key figures you could use to study its usage are
- Richard W. Schabacker (1930s)
- Edwards & Magee (1948)
- Peter Brandt
- Stacey Burke (more on the intraday side - typically our preference)
It's usage put plainly:
- Quantifying Accumulation or Distribution
- Revealing Energy Build-Up (Compression)
- Framing Breakouts and False Breakouts
- Structuring Time
- Identifying opportunities to trade a daily, weekly, or monthly range. 
Levels
[Kpt-Ahab] Assistant: Risk & DCA PlannerScript Description – Assistant: Risk & DCA Planner 
The Risk & DCA Planner is a technical assistant for position and risk management.
It automatically calculates, based on volatility (ATR%), swing structure, and your settings:
 
 Stop-Loss (SL) and corresponding Take-Profit targets (TPs) in R-multiples
 DCA (Dollar-Cost-Averaging) levels — both price and amount
 A market suitability check (based on volatility & volume)
 Plus a clear table and summary label displayed on the chart
 The script helps you plan risk, scaling, and profit targets consistently and quantitatively.
 
 Core Logic 
 Risk Profile 
Three modes: Low, Normal, High.
These define how reactive the script behaves internally:
 
 Low → conservative, longer lookbacks, tighter analysis
 Normal → balanced
 High → aggressive, faster reaction, wider stops
 
 Stop-Loss (SL) 
Automatically calculated from ATR% and recent swing structure, limited by minimum and maximum thresholds.
The SL percentage defines the R-unit, which all TPs and DCA levels are based on.
 Take-Profits (TPs) 
Up to six targets, each a multiple of the defined risk (e.g., 1R, 2R, 3R).
Prices are automatically adjusted depending on long or short direction.
 DCA Strategy 
Optional. Adds scaling levels evenly between Entry and SL or in multiples of the ATR.
Each DCA allocation grows geometrically until the maximum position size is reached.
Suitability Check
Evaluates whether the market is within an appropriate ATR% range and has sufficient volume.
The table displays “OK” or “Caution” depending on volatility and historical consistency.
 Visualization 
 
 Lines for SL, TPs, and DCA levels
 A table with all parameters, prices, and risk data
 A chart label summarizing key info (profile, direction, SL%, TPs, DCA, etc.)
Levels[cz]Description 
Levels  is a proportional price grid indicator that draws adaptive horizontal levels based on higher timeframe (HTF) closes.
Instead of relying on swing highs/lows or pivots, it builds structured support and resistance zones using fixed percentage increments from a Daily, Weekly, or Monthly reference close.
This creates a consistent geometric framework that helps traders visualize price zones where reactions or consolidations often occur.
 How It Works 
 
 The script retrieves the last HTF close (Daily/Weekly/Monthly).
 It then calculates percentage-based increments (e.g., 0.5%, 1%, 2%, 4%) above and below that reference.
 Each percentage forms a distinct “level group,” creating layered grids of potential reaction zones.
 Levels are automatically filtered to avoid overlap between different groups, keeping the chart clean.
 
Visibility is dynamically controlled by timeframe:
 
 Level 1 → up to 15m
 Level 2 → up to 1h
 Level 3 → up to 4h
 Level 4 → up to 1D
 
This ensures the right amount of structural detail at every zoom level.
 How to Use 
 
 Identify confluence zones where multiple levels cluster — often areas of strong liquidity or reversals.
 Use the grid as a support/resistance map for entries, targets, and stop placement.
 Combine with trend or momentum indicators to validate reactions at key price bands.
 Adjust the percentage increments and reference timeframe to match the volatility of your instrument (e.g., smaller steps for crypto, larger for indices).
 
 Concept 
The indicator is based on the idea that markets move in proportional price steps, not random fluctuations.
By anchoring levels to a higher-timeframe close and expanding outward geometrically, Levels  highlights recurring equilibrium and expansion zones — areas where traders can anticipate probable turning points or consolidations.
 Features 
 
 4 customizable percentage-based level sets
 Dynamic visibility by timeframe
 Non-overlapping level hierarchy
 Lightweight on performance
 
Fully customizable colors, styles, and widths
Key Levels (PA, MAs, VWAPs, Volume Profile, rVWAPs)This indicator marks all kinds of key levels so that users can keep an overview of their specified levels in a convenient non chart cluttering way. It can highlight levels of confluence or display each level seperately.
The indicator includes markers for the following levels:
Price Action: Opens, Previous High/Low, Monday Range
Moving Averages: H4, D1 and W1 with customisable lengths
VWAPs: Developing and Previous VWAPs with their respective VAL/VAH (1 Standard Deviation)
Rolling VWAPs
Volume Profile: Developing and Previous VAL/VAH/POC
 What makes this indicator different is its vast customisation options and big library of levels… 
… users can choose to merge all levels that are aligned in a specified % threshold and additionally they can choose to color them the same color to highlight confluence levels.
… users have the choice between Full Label Markers or Abbreviations of those Labels.
… users have the choice of a few presets making level switching fast and convenient (Price Action, Volume Profile, VWAP, Volume or Custom).
… users can specify if they prefer to highlight Simple Moving Averages or Exponential Moving Averages. They have calculations available on three different timeframes and can change the lengths of each.
… users can color all levels the same with one click instead of having to manually change all of them.
… when users choose Volume Profile Levels they can either let the script auto calculate the row size making asset switching simple or they can manually input row size.
With the custom preset users can show and hide whichever levels they want.
(To have them the same every time you freshly load the indicator save your settings as default in the lower left corner of the settings tab).
 Purpose 
This indicator is designed to serve as a level visualisation tool that has the ability to highlight levels of confluence. It may assist in keeping an overview of where all levels are currently located but does not produce signals or trade recommendations.
Volume Cluster Heatmap [BackQuant]Volume Cluster Heatmap  
A visualization tool that maps traded volume across price levels over a chosen lookback period. It highlights where the market builds balance through heavy participation and where it moves efficiently through low-volume zones. By combining a heatmap, volume profile, and high/low volume node detection, this indicator reveals structural areas of support, resistance, and liquidity that drive price behavior.
 What Are Volume Clusters? 
A volume cluster is a horizontal aggregation of traded volume at specific price levels, showing where market participants concentrated their buying and selling.
 High Volume Nodes (HVN) : Price levels with significant trading activity; often act as support or resistance.
 Low Volume Nodes (LVN) : Price levels with little trading activity; price moves quickly through these areas, reflecting low liquidity.
Volume clusters help identify key structural zones, reveal potential reversals, and gauge market efficiency by highlighting where the market is balanced versus areas of thin liquidity.
By creating heatmaps, profiles, and highlighting high and low volume nodes (HVNs and LVNs), it allows traders to see where the market builds balance and where it moves efficiently through thin liquidity zones. 
Example: Bitcoin breaking away from the high-volume zone near 118k and moving cleanly through the low-volume pocket around 113k–115k, illustrating how markets seek efficiency: 
 Core Features 
 Visual Analysis Components: 
 
 Heatmap Display : Displays volume intensity as colored boxes, lines, or a combination for a dynamic view of market participation.
 Volume Profile Overlay : Shows cumulative volume per price level along the right-hand side of the chart.
 HVN & LVN Labels : Marks high and low volume nodes with color-coded lines and labels.
 Customizable Colors & Transparency : Adjust high and low volume colors and minimum transparency for clear differentiation.
 Session Reset & Timeframe Control : Dynamically resets clusters at the start of new sessions or chosen timeframes (intraday, daily, weekly).
 
 Alerts 
 
 HVN / LVN Alerts : Notify when price reaches a significant high or low volume node.
 High Volume Zone Alerts : Trigger when price enters the top X% of cumulative volume, signaling key areas of market interest.
 
 How It Works 
Each bar’s volume is distributed proportionally across the horizontal price levels it touches. Over the lookback period, this builds a cumulative volume profile, identifying price levels with the most and least trading activity. The highest cumulative volume levels become HVNs, while the lowest are LVNs. A side volume profile shows aggregated volume per level, and a heatmap overlay visually reinforces market structure.
 Applications for Traders 
 
 Identify strong support and resistance at HVNs.
 Detect areas of low liquidity where price may move quickly (LVNs).
 Determine market balance zones where price may consolidate.
 Filter noise: because volume clusters aggregate activity into levels, minor fluctuations and irrelevant micro-moves are removed, simplifying analysis and improving strategy development.
 Combine with other indicators such as VWAP, Supertrend, or CVD for higher-probability entries and exits.
 Use volume clusters to anticipate price reactions to breaking points in thin liquidity zones.
 
 Advanced Display Options 
 
   Heatmap Styles : Boxes, lines, or both. Boxes provide a traditional heatmap, lines are better for high granularity data.
   Line Mode Example : Simplified line visualization for easier reading at high level counts: 
 Profile Width & Offset : Adjust spacing and placement of the volume profile for clarity alongside price.
   Transparency Control : Lower transparency for more opaque visualization of high-volume zones.
 
 Best Practices for Usage 
 
 Reduce the number of levels when using line mode to avoid clutter.
 Use HVN and LVN markers in conjunction with volume profiles to plan entries and exits.
 Apply session resets to monitor intraday vs. multi-day volume accumulation.
 Combine with other technical indicators to confirm high-probability trading signals.
 Watch price interactions with LVNs for potential rapid movements and with HVNs for possible support/resistance or reversals.
 
 Technical Notes 
 
  Each bar contributes volume proportionally to the price levels it spans, creating a dynamic and accurate representation of traded interest.
 Volume profiles are scaled and offset for visual clarity alongside live price.
  Alerts are fully integrated for HVN/LVN interaction and high-volume zone entries.
  Optimized to handle large lookback windows and numerous price levels efficiently without performance degradation.
 
This indicator is ideal for understanding market structure, detecting key liquidity areas, and filtering out noise to model price more accurately in high-frequency or algorithmic strategies.
First week of the yearA very simple indicator that marks a channel on the candlestick for the first week of the year.
The channel can serve as an entry/exit point with a medium and long term focus.
Note: This indicator should be observed exclusively on the weekly timeframe.
Session Gap Fill [LuxAlgo]The  Session Gap Fill  tool detects and highlights filled and unfilled price gaps between regular sessions. It features a dashboard with key statistics about the detected gaps.
The tool is highly customizable, allowing users to filter by different types of gaps and customize how they are displayed on the chart.
🔶  USAGE 
  
By default, the tool detects all price gaps between sessions. A price gap is defined as a difference between the opening price of one session and the closing price of the previous session. In this case, the tool uses the opening price of the first bar of the session against the closing price of the previous bar.
A bullish gap is detected when the session open price is higher than the last close, and a bearish gap is detected when the session open price is lower than the last close.
  
Gaps represent a change in market sentiment, a difference in what market participants think between the close of one trading session and the open of the next.
What is useful to traders is not the gap itself, but how the market reacts to it.
 
 Unfilled gaps occur when prices do not return to the previous session's closing price.
 Filled gaps occur when prices come back to the previous session's close price.
 
By analyzing how markets react to gaps, traders can understand market sentiment, whether different prices are accepted or rejected, and take advantage of this information to position themselves in favor of bullish or bearish market sentiment.
Next, we will cover the Gap Type Filter and Statistics Dashboard.
🔹  Gap Type Filter 
  
Traders can choose from three options: display all gaps, display only overlapping gaps, or display only non-overlapping gaps. All gaps are displayed by default.
An overlapping gap is defined when the first bar of the session has any price in common with the previous bar. No overlapping gap is defined when the two bars do not share any price levels.
As we will see in the next section, there are clear differences in market behavior around these types of gaps.
🔹  Statistics Dashboard 
  
The Statistics Dashboard displays key metrics that help traders understand market behavior around each type of gap.
 
 Gaps: The percentage of bullish and bearish gaps.
 Filled: The percentage of filled bullish and bearish gaps.
 Reversed: The percentage of filled gaps that move in favor of the gap
 Bars Avg.: The average number of bars for a gap to be filled.
 
Now, let's analyze the chart on the left of the image to understand those stats. These are the stats for all gaps, both overlapping and non-overlapping.
Of the total, bullish gaps represent 55%, and bearish ones represent 44%. The gap bias is pretty balanced in this market.
The second statistic, Filled, shows that 63% of gaps are filled, both bullish and bearish. Therefore, there is a higher probability that a gap will be filled than not.
The third statistic is reversed. This is the percentage of filled gaps where prices move in favor of the gap. This applies to filled bullish gaps when the close of the session is above the open, and to filled bearish gaps when the close of the session is below the open. In other words, first there is a gap, then it fills, and finally it reverses. As we can see in the chart, this only happens 35% of the time for bullish gaps and 29% of the time for bearish gaps.
The last statistic is Bars Avg., which is the average number of bars for a gap to be filled. On average, it takes between one and two bars for both bullish and bearish gaps. On average, gaps fill quickly.
As we can see on the chart, selecting different types of gaps yields different statistics and market behavior. For example, overlapping gaps have a greater than 90% chance of being filled, whereas non-overlapping gaps have a less than 40% chance.
🔶  SETTINGS 
 
 Gap Type: Select the type of gap to display.
 
🔹  Dashboard 
 
  Dashboard: Enable or disable the dashboard.
  Position: Select the location of the dashboard.
  Size: Select the dashboard size.
 
🔹  Style 
 
 Filled Bullish Gap: Enable or disable this gap and choose the color.
 Filled Bearish Gap: Enable or disable this gap and choose the color.
 Unfilled Gap: Enable or disable this gap and choose the color.
 Max Deviation Level: Enable or disable this level and choose the color.
 Open Price Level: Enable or disable this level and choose the color.
RTH & ETH High/Low (Today & Prev)RTH and ETH High Low Indicator. This draws a line for the ETH and RTH highs and lows for todays session and yesterdays session. it allows you to toggle off any of the 8 potential levels as well as change the colour of the 8 levels. WIP
Liquidity Spectrum Visualizer [BigBeluga] [Optimized]This version of Liquidity Spectrum Visualizer  (© BigBeluga) has been optimized to improve execution speed and reduce script load times without altering the visual output or analytical logic of the original indicator. The key improvements focus on reducing computational complexity, eliminating redundant calculations, and minimizing expensive function calls within loops.
  Core Optimization Changes 
 Single-Pass Volume Binning (O(N) instead of O(N×M)) 
Original: For each bin (100) the script iterated through every bar (lookback), resulting in ~20,000 operations.
Optimized: Each bar is processed once to directly calculate its bin index. This reduces the loop complexity from O(N×M) to O(N), where N = lookback.
 Precomputed Min/Max Values 
Original: array.min() and array.max() were repeatedly called inside loops, re-scanning arrays hundreds of times.
Optimized: Min and max are computed once before all calculations and reused, reducing computational overhead.
 Reduced Label Creation 
Original: Labels were created in every iteration, potentially hundreds of times per update — a very expensive operation in Pine.
Optimized: Only two labels are created for significant high and low levels, cutting down label calls by ~99%.
 Efficient Resource Management 
All boxes and lines are cleared once before re-rendering instead of being deleted individually inside nested loops.
Optional gradient rendering and POC drawing remain, but only after binning is complete.
 Performance Evaluation 
The most important change is the reduction of loop complexity — instead of performing around 20,000 iterations per update, the optimized version now processes only about 200. This reduces execution time and makes the indicator much lighter.
Function calls such as min() and max() are now calculated only once instead of hundreds of times, which removes unnecessary overhead. Likewise, label creation has been reduced from hundreds of labels per refresh to just two, further improving performance.
As a result, the average loading time of the indicator dropped from roughly 1.5–3 seconds to about 0.05–0.2 seconds on typical datasets.
Dynamic Volume Trace Profile [ChartPrime]⯁ OVERVIEW 
 Dynamic Volume Trace Profile   is a reimagined take on volume profile analysis. Instead of plotting a static horizontal histogram on the side of your chart, this indicator projects  dynamic volume trace lines  directly onto the price action. Each bin is color-graded according to its relative strength, creating a living “volume skeleton” of the market. The  orange trace  highlights the current Point of Control (POC)—the price level with maximum historical traded volume within the lookback window. On the right side, the tool builds a mini profile, showing absolute volume per bin alongside its percentage share, where the POC always represents  100% strength .
 ⯁ KEY FEATURES 
 
 Dynamic On-Chart Bins: 
The range between highest high and lowest low is split into 25 bins. Each bin is drawn as a horizontal trace line across the lookback chart period.
 Gradient Color Encoding: 
Trace lines fade from transparent to teal depending on relative volume size. The more intense the teal, the stronger the historical traded activity at that level.
  
 Automatic POC Highlight: 
The bin with the highest aggregated volume is flagged with an  orange line . This POC adapts bar-by-bar as volume distribution shifts.
  
 Right-Side Volume Profile: 
At the chart’s right edge, the script prints a box-style profile. Each bin shows:
• Total volume (absolute units).
• Percentage of max volume, in parentheses (POC bin = 100%).
This gives both raw and normalized context at a glance.
  
 Adjustable Lookback Window: 
The lookback defines how many bars feed the profile. Increase for stable HTF zones or decrease for responsive intraday distributions.
  
 POC Toggle & Styling: 
Optionally toggle POC highlighting on/off, adjust colors, and set line thickness for better integration with your chart theme.
  
 
 ⯁ HOW IT WORKS (UNDER THE HOOD) 
 
 Step Sizing: 
  over last 100 bars is divided by   to calculate bin height.
 Volume Aggregation: 
For each bar in the  , the script checks which bin the close falls into, then adds that bar’s volume to the bin’s counter.
 Gradient Mapping: 
Bin volume is normalized against the max volume across all bins. That value is mapped onto a gradient from transparent → teal.
 POC Logic: 
The bin with highest volume is colored orange both on the dynamic trace and in the right-side profile.
 Right-Hand Profile: 
Boxes are drawn for each bin proportional to volume / maxVolume × 50 units, with text labels showing both absolute volume and normalized %.
 
 ⯁ USAGE 
 
 Use the  orange trace  as the dominant “magnet” level—price often gravitates to the POC.
  
  
 Watch for clusters of  strong teal traces  as areas of high acceptance; thin or faint zones mark low-liquidity gaps prone to fast moves.
 On intraday charts, tighten lookback to reveal  session-based distributions . For swing or position trading, expand lookback to surface more durable volume shelves.
 Compare the right-side profile % to judge how “top-heavy” or “bottom-heavy” the current distribution is.
 Use bright, intense color traces as context for confluence with structure, OBs, or liquidity hunts.
 
 ⯁ CONCLUSION 
 Dynamic Volume Trace Profile  takes the traditional volume profile and fuses it into the body of price itself. Instead of a fixed sidebar, you see gradient traces layered directly on the chart, giving real-time context of where volume concentrated and where price may be drawn. With built-in POC highlighting, normalized % readouts, and an adaptive right-side profile, it offers both  precision levels  and  market structure awareness  in a cleaner, more intuitive form.
Whole number highlightsThis very simple indicator provides what should be a built-in TradingView feature: it highlights the whole number currency amounts (dollar, pound, euro, etc.) on your chart with a simple and unobtrusive dotted line. By default, a slightly thicker dotted line is used on whole number multiples of ten.
These are important to highlight because they often act as "psychological levels" in the marketplace, especially when they coincide with more significant levels of support or resistance. They can also help provide a sense of scale to the chart, which is useful when switching between various zoom levels.
It's open-source, so it can be easily combined into other indicators, which should especially be useful for those with limited plans who are allowed a limited number of indicators.
 Disclaimer : Use at your own risk. This indicator and the strategy described herein are not in any way financial advice, nor does the author of this script make any claims about the effectiveness of this indicator or of any related strategy, which may depend highly on the discretion and skill of the trader executing it, among many other factors outside of the author's control. The author of this script accepts no liability, and is not responsible for any trading decisions that you may or may not make as a result of this indicator. You should expect to lose money if using this indicator.
88-Key Piano Range - Musical Price Levels88-Key Piano Range - Musical Price Levels
 
 Description: 
Explore price analysis through musical harmony! This educational indicator maps price movements to the standard 88-key piano keyboard (A0 to C8), offering a creative way to visualize market ranges and explore harmonic price relationships with authentic keyboard-style background fills.
 🎹 KEY FEATURES:
 
•	Complete 88-Key Mapping - Full piano range from A0 to C8 mapped to your price range
•	Piano-Style Visual Design - Clean background fills distinguishing white keys, black keys, and octaves
•	Dual Anchor System - Set two time/price points to define your analytical range
•	Flexible Display Options - Show all 88 keys, octaves only (C notes), or custom selections
•	Harmonic Exploration - Explore consonant/dissonant key relationships based on music theory
•	Real-time Price Note - See what musical note your current price represents
•	Customizable Interface - Adjust colors, line widths, fills, and visual elements
 🎵 EDUCATIONAL CONCEPTS: 
•	Octave Levels - C notes as harmonic reference points (similar to round numbers)
•	Key Classifications - Natural notes (white keys) vs chromatic notes (black keys)
•	Harmonic Intervals - Musical relationships applied to price analysis
•	Creative Visualization - Alternative way to view price ranges and movements
 ⚙️ HOW TO USE: 
1.	Select Your Price Leg - Choose an upleg, downleg, or significant price movement to explore
2.	Set Anchor A - Place at the start of your selected leg (swing low for upleg, swing high for downleg)
3.	Set Anchor B - Place at the end of your selected leg (swing high for upleg, swing low for downleg)
4.	Configure Display - Select all keys, octaves only, or enable background fills
5.	Explore Harmonics - Enable harmony coloring to see musical relationships
6.	Study Patterns - Observe how price movements align with musical intervals
 🎼 CREATIVE APPLICATIONS: 
•	Experimental Analysis - Try a musical approach to leg analysis
•	Educational Tool - Learn about mathematical relationships in both music and markets
•	Alternative Perspective - View support/resistance through a musical lens
•	Pattern Recognition - Explore if harmonic levels show interesting price behavior
•	Fun Learning - Combine musical knowledge with trading concepts
 📊 EXPERIMENTAL USE: 
•	Creative alternative to traditional Fibonacci levels
•	Educational exploration of mathematical harmony in markets
•	Interesting way to visualize price ranges and retracements
•	Novel approach for musicians interested in trading concepts
 Important Note:  This is an educational and experimental tool that applies musical theory concepts to price analysis. It should be used for learning and exploration purposes alongside proven technical analysis methods. The musical relationships are mathematically based but not validated as reliable trading signals.
Options Max Pain Calculator [BackQuant]Options Max Pain Calculator  
A visualization tool that models option expiry dynamics by calculating "max pain" levels, displaying synthetic open interest curves, gamma exposure profiles, and pin-risk zones to help identify where market makers have the least payout exposure.
 What is Max Pain? 
Max Pain is the theoretical expiration price where the total dollar value of outstanding options would be minimized. At this price level, option holders collectively experience maximum losses while option writers (typically market makers) have minimal payout obligations. This creates a natural gravitational pull as expiration approaches.
 Core Features 
 Visual Analysis Components: 
 
 Max Pain Line: Horizontal line showing the calculated minimum pain level
 Strike Level Grid: Major support and resistance levels at key option strikes  
 Pin Zone: Highlighted area around max pain where price may gravitate
 Pain Heatmap: Color-coded visualization showing pain distribution across prices
 Gamma Exposure Profile: Bar chart displaying net gamma at each strike level
 Real-time Dashboard: Summary statistics and risk metrics
 
 Synthetic Market Modeling** 
Since Pine Script cannot access live options data, the indicator creates realistic synthetic open interest distributions based on configurable market parameters including volume patterns, put/call ratios, and market maker positioning.
 How It Works 
 Strike Generation: 
The tool creates a grid of option strikes centered around the current price. You can control the range, density, and whether strikes snap to realistic market increments.
 Open Interest Modeling: 
Using your inputs for average volume, put/call ratios, and market maker behavior, the indicator generates synthetic open interest that mirrors real market dynamics:
 
 Higher volume at-the-money with decay as strikes move further out
 Adjustable put/call bias to reflect current market sentiment  
 Market maker inventory effects and typical short-gamma positioning
 Weekly options boost for near-term expirations
 
 Pain Calculation: 
For each potential expiry price, the tool calculates total option payouts:
 
 Call options contribute pain when finishing in-the-money
 Put options contribute pain when finishing in-the-money
 The strike with minimum total pain becomes the Max Pain level
 
 Gamma Analysis: 
Net gamma exposure is calculated at each strike using standard option pricing models, showing where hedging flows may be most intense. Positive gamma creates price support while negative gamma can amplify moves.
 Key Settings 
 Basic Configuration: 
 
 Number of Strikes: Controls grid density (recommended: 15-25)
 Days to Expiration: Time until option expiry
 Strike Range: Price range around current level (recommended: 8-15%)
 Strike Increment: Spacing between strikes
 
 Market Parameters: 
 
 Average Daily Volume: Baseline for synthetic open interest
 Put/Call Volume Ratio: Market sentiment bias (>1.0 = bearish, <1.0 = bullish)  It does not work if set to 1.0
 Implied Volatility: Current option volatility estimate
 Market Maker Factors: Dealer positioning and hedging intensity
 
 Display Options: 
 
 Model Complexity: Simple (line only), Standard (+ zones), Advanced (+ heatmap/gamma)
 Visual Elements: Toggle individual components on/off
 Theme: Dark/Light mode
 Update Frequency: Real-time or daily calculation
 
 Reading the Display 
 Dashboard Table (Top Right): 
 
 Current Price vs Max Pain Level
 Distance to Pain: Percentage gap (smaller = higher pin risk)
 Pin Risk Assessment: HIGH/MEDIUM/LOW based on proximity and time
 Days to Expiry and Strike Count
 Model complexity level
 
 Visual Elements: 
 
 Red Line: Max Pain level where payout is minimized
 Colored Zone: Pin risk area around max pain
 Dotted Lines: Major strike levels (green = support, orange = resistance)
 Color Bar: Pain heatmap (blue = high pain, red = low pain/max pain zones)
 Horizontal Bars: Gamma exposure (green = positive, red = negative)
 Yellow Dotted Line: Gamma flip level where hedging behavior changes
 
 Trading Applications 
 Expiration Pinning: 
When price is near max pain with limited time remaining, there's increased probability of gravitating toward that level as market makers hedge their positions.
 Support and Resistance: 
High open interest strikes often act as magnets, with max pain representing the strongest gravitational pull.
 Volatility Expectations: 
 
 Above gamma flip: Expect dampened volatility (long gamma environment)  
 Below gamma flip: Expect amplified moves (short gamma environment)
 
 Risk Assessment: 
The pin risk indicator helps gauge likelihood of price manipulation near expiry, with HIGH risk suggesting potential range-bound action.
 Best Practices 
 Setup Recommendations 
 
 Start with Model Complexity set to "Standard"
 Use realistic strike ranges (8-12% for most assets)  
 Set put/call ratio based on current market sentiment
 Adjust implied volatility to match current levels
 
 Interpretation Guidelines: 
 
 Small distance to pain + short time = high pin probability
 Large gamma bars indicate key hedging levels to monitor
 Heatmap intensity shows strength of pain concentration
 Multiple nearby strikes can create wider pin zones
 
 Update Strategy: 
 
 Use "Daily" updates for cleaner visuals during trading hours
 Switch to "Every Bar" for real-time analysis near expiration
 Monitor changes in max pain level as new options activity emerges
 
 Important Disclaimers 
 
 This is a modeling tool using synthetic data, not live market information. While the calculations are mathematically sound and the modeling realistic, actual market dynamics involve numerous factors not captured in any single indicator.
 Max pain represents theoretical minimum payout levels and suggests where natural market forces may create gravitational pull, but it does not guarantee price movement or predict exact expiration levels. Market gaps, news events, and changing volatility can override these dynamics.
 Use this tool as additional context for your analysis, not as a standalone trading signal. The synthetic nature of the data makes it most valuable for understanding market structure and potential zones of interest rather than precise price prediction.
 
 Technical Notes 
The indicator uses established option pricing principles with simplified implementations optimized for Pine Script performance. Gamma calculations use standard financial models while pain calculations follow the industry-standard definition of minimized option payouts.
All visual elements use fixed positioning to prevent movement when scrolling charts, and the tool includes performance optimizations to handle real-time calculation without timeout errors.
All Levels This script draws key price levels on your chart, including:
	•	Previous Day (PD): High, Low, Close
	•	Day Before Yesterday (DBY): High, Low, Close
	•	Pre-Market (PM): High and Low
	•	Today’s levels: High, Low, Open, Close
	•	Current bar levels: High, Low, Open, Close
Each level is displayed as a horizontal line with a label showing the level value.
It works on any timeframe, including 1-minute charts, and automatically updates as new bars form.
⸻
2. Features
	1.	Custom Colors
Each type of level has its own color, declared as a const color. For example:
	•	Previous Day High = red
	•	Today’s Close = gold
	•	Pre-Market High = fuchsia
	2.	Right-Extending Lines
All horizontal levels extend to the right, so you always see them on the chart.
	3.	Persistent Labels
Every line has a label at the right side showing its name and price. For example:
	•	PDH 422
	•	TODL 415.5
	4.	Dynamic Updates
The script updates automatically whenever a new bar forms, so levels stay accurate.
	5.	Session-Based Pre-Market
You can define the pre-market session (default “04:00–09:30 EST”). The script calculates the high and low of this session only.
	6.	Checkbox Inputs
You can enable/disable entire groups of levels:
	•	Previous Day
	•	Day Before Yesterday
	•	Pre-Market
	•	Today
	•	Current bar
Dynamic Levels This indicator plots key price levels (Open, High, Low, Mid, Close) from multiple higher timeframes (Monday, Daily, Weekly, Monthly, Yearly).
It allows you to track how price interacts with important reference levels without switching timeframes.
🔑 Features
✅ Monday levels (MO, MH, MM)
By default: shows the last completed Monday (fixed values).
Option: “live mode” to update Monday High/Low/Mid while Monday’s candle is forming.
✅ Daily levels (DO, DH, DL, DM, DC)
Live: Daily High/Low/Mid update dynamically while today’s candle is forming.
Previous Daily Close (DC) is always fixed.
✅ Weekly levels (WO, WH, WL, WM)
Live: Weekly High/Low/Mid update dynamically while this week’s candle is forming.
Weekly Open is fixed.
✅ Monthly levels (MO(n), MH(n-1), ML(n-1), MM(n-1), MC(n-1))
Shows last completed month’s values (constant, never changing).
Current Monthly Open is also shown (naturally fixed).
✅ Yearly levels (YO(n), YH(n-1), YL(n-1), YM(n-1), YC(n-1))
Shows last completed year’s values (constant, never changing).
Current Yearly Open is also shown (naturally fixed).
🎨 Customization
Toggle each level (on/off) in indicator settings.
Individual color settings for Monday, Daily, Weekly, Monthly, and Yearly.
Adjustable line width and transparency.
Optional short labels (MO, DO, WM, etc.) displayed on the right side of the chart.
🔄 Dynamic Logic
Daily and Weekly → update dynamically while their candle is forming.
Monday, Monthly, and Yearly → use fixed values from the last completed bar (do not “breathe”).
📌 Use cases
Quickly see where price stands relative to previous close, current open, or mid-levels.
Use Monday Open/High/Mid as strong intraday references.
Use Monthly/Yearly levels as long-term support/resistance zones.
Sessions Highs/LowsThis indicator plots the High and Low of the three main trading sessions:
Asia (20:00–03:00) – green lines
London (03:00–08:00) – blue lines
New York (08:00–13:00) – red lines
Features:
Levels update in real time during each session.
When a new session starts, the previous lines are deleted – only the latest active sessions remain visible.
Default session times are set to Asia (20:00–03:00), London (03:00–08:00), and New York (08:00–13:00), but you can adjust them to your own custom hours in the settings.
Colors can also be customized.
Use cases:
Quickly visualize session ranges.
Track session highs/lows for breakouts, fakeouts, and reactions around liquidity zones.
Piano Frequency LevelsPiano Frequency Levels 
This indicator applies the mathematical principles of musical harmony to market analysis, creating support and resistance levels based on authentic piano frequency ratios. Drawing from centuries-old musical theory, it maps the precise mathematical relationships between piano keys to price levels.
 How It Works:  The indicator uses the exact frequency ratios from equal temperament tuning - the same mathematical system that makes pianos sound harmonious. Each level represents an actual piano key frequency, scaled proportionally to your chosen anchor price.
 Key Features: 
•	 Piano-Based Ratios:  Uses authentic 12-tone equal temperament frequency relationships (1.05946 ratio between semitones)
•	 Directional Intelligence:  Automatically creates ascending levels from lows (resistance) or descending levels from highs (support)
•	 Musical Note Labels:  Optional display of actual piano key names (C4, D#5, F6, etc.) alongside price levels
•	 Black Key Subdivisions:  Toggle authentic sharp/flat keys between natural notes for additional precision
•	 Octave Color Coding:  Each musical octave displays in a different color for easy visual identification
•	 Anchor Reference:  Bright green line clearly marks your C-note reference point
 Musical Foundation:  Every level corresponds to an actual piano key. The anchor point represents "C" (the musical root), with levels progressing through the natural musical sequence: C, D, E, F, G, A, B, then repeating in higher octaves. This creates proportional spacing that mirrors the harmonic relationships musicians have used for centuries.
 Usage: 
1.	Set your anchor to a significant market high or low
2.	Choose your desired number of levels (typically 12-24 for 1-2 octaves)
3.	Enable "Add Black Keys" for additional intermediate levels
4.	Enable "Show Note Names" to see which piano key each level represents
 The Theory:  Musical harmony is based on precise mathematical ratios that create pleasing relationships between frequencies. These same mathematical principles may manifest in market movements, as price action often exhibits proportional relationships similar to musical intervals.
 Unique Advantages: 
•	Based on established mathematical principles rather than arbitrary ratios
•	Provides both major levels (white keys) and intermediate levels (black keys)
•	Automatically adapts direction based on anchor type (high vs low)
•	Maintains authentic musical relationships across all timeframes and price ranges
 Important Note:  This indicator presents a theoretical framework for market analysis. Like all technical analysis tools, it should be used in conjunction with other forms of analysis and proper risk management. The musical ratios provide a unique perspective on potential support and resistance levels, but past performance does not guarantee future results.
Transform your charts into a musical instrument and discover the hidden harmonies in market movements.
Key Levels: Daily, Weekly, Monthly [BackQuant]Key Levels: Daily, Weekly, Monthly  
  Map the market’s “memory” in one glance—yesterday’s range, this week’s chosen day high/low, and D/W/M opens—then auto-clean levels once they break. 
 What it does 
 This tool plots three families of high-signal reference lines and keeps them tidy as price evolves:
  
  Chosen Day High/Low (per week)  — Pick a weekday (e.g., Monday). For each past week, the script records that day’s session  high  and  low  and projects them forward for a configurable number of bars. These act like “memory levels” that price often revisits.
  Daily / Weekly / Monthly Opens  — Plots the opening price of each new day, week, and month with separate styling. These opens frequently behave like magnets/flip lines intraday and anchors for regime on higher timeframes.
  Auto-pruning  — When price  breaks  a stored level, the script can automatically remove it to reduce clutter and refocus you on still-active lines. See:  (broken levels removed).
  
 Why these levels matter 
  
  Liquidity pockets  — Prior day’s high/low and the daily open concentrate stops and pending orders. Mapping them quickly reveals likely sweep or fade zones. Example: previous day highs + daily open highlighting liquidity: 
  Context & regime  — Monthly opens frame macro bias; trading above a rising cluster of monthly opens vs. below gives a clean top-down read. Example: monthly-only “macro outlook” view: 
  Cleaner charts  — Auto-remove broken lines so you focus on what still matters right now.
  
 What it plots (at a glance) 
  
  Past  Chosen Day  High/Low for up to N prior weeks (your choice), extended right.
  Current  Daily Open ,  Weekly Open , and  Monthly Open , each with its own color, label, and forward extension.
  Optional short labels (e.g., “Mon High”) or full labels (with week/month info).
  
 How breaks are detected & cleaned 
 You control both the  evidence  and the  timing  of a “break”:
  
  Break uses  — Choose  Close  (more conservative) or  Wick  (more sensitive).
  Inclusive?  — If enabled, equality counts (≥ high or ≤ low). If disabled, you need a strict cross.
  Allow intraday breaks?  — If on, a level can break during the tracked day; if off, the script only counts breaks  after  the session completes.
  Remove Broken Levels  — When a break is confirmed, the line/label is deleted automatically. (See the demo: )
  
 Quick start 
  
  Pick a  Day of Week to Track  (e.g., Monday).
  Set how many  weeks back  to show (e.g., 8–10).
  Choose how far to  extend  each family (bars to the right for chosen-day H/L and D/W/M opens).
  Decide if a break uses  Close  or  Wick , and whether equality counts.
  Toggle  Remove Broken Levels  to keep the chart clean automatically.
  
 Tips by use-case 
  
  Intraday bias  — Watch the  Daily Open  as a magnet/flip. If price gaps above and holds, pullbacks to the daily open often decide direction. Pair with last day’s high/low for sweep→reversal or true breakout cues. See: 
  Weekly structure  — Track the week’s chosen day (e.g., Monday) high/low across prior weeks. If price stalls near a cluster of old “Monday Highs,” look for sweep/reject patterns or continuation on reclaim.
  Macro regime  — Hide daily/weekly lines and keep only  Monthly Opens  to read bigger cycles at a glance (BTC/crypto especially). Example: 
  
 Customization 
  
  Use wicks or bodies  for highs/lows (wicks capture extremes; bodies are stricter).
  Line style & thickness  — solid/dashed/dotted, width 1–5, plus global transparency.
  Labels  — Abbreviated (“Mon High”, “D Open”) or full (month/week/day info).
  Color scheme  — Separate colors for highs, lows, and each of D/W/M opens.
  Capacity controls  — Set how many daily/weekly/monthly opens and how many weeks of chosen-day H/L to keep visible.
  
 What’s under the hood 
  
  On your selected weekday, the script records that session’s  true high  and  true low  (using wicks or body-based extremes—your choice), then projects a horizontal line forward for the next bars.
  At each new  day/week/month , it records the opening price and projects that line forward as well.
  Each bar, the script checks your “break” rules; once broken, lines/labels are removed if auto-cleaning is on.
  Everything updates in real time; past levels don’t repaint after the session finishes.
  
 Recommended presets 
  
  Day trading  — Weeks back: 6–10; extend D/W opens: 50–100 bars; Break uses:  Close ; Inclusive: off; Auto-remove: on.
  Swing  — Fewer daily opens, more weekly opens (2–6), and 8–12 weeks of chosen-day H/L.
  Macro  — Show only  Monthly Opens  (1–6 months), dashed style, thicker lines for clarity.
  
 Reading the examples 
  
  Broken lines disappear  — decluttering in action: 
  Macro outlook  — monthly opens as cycle rails: 
  Liquidity map  — previous day highs + daily open: 
  
 Final note 
 These are not “signals”—they’re  reference points  that many participants watch. By standardising how you draw them and automatically clearing the ones that no longer matter, you turn a noisy chart into a focused map: where liquidity likely sits, where price memory lives, and which lines are still in play.
Wick Pressure Zones [BigBeluga]
The  Wick Pressure Zones   indicator highlights areas where  extreme wick activity  occurred, signaling strong buy or sell pressure. By measuring unusually long upper or lower wicks and mapping them into  gradient volume zones , the tool helps traders identify levels where liquidity was absorbed, leaving behind footprints of supply and demand imbalances. These zones often act as  support, resistance, or liquidity sweep magnets .
 🔵 CONCEPTS 
 
   Extreme Wicks : Large upper or lower shadows indicate aggressive rejection — upper wicks suggest selling pressure, lower wicks suggest buying pressure.
  
   Volumatic Gradient Zones : From each detected wick, the indicator projects a layered gradient zone, proportional to the wick’s size, showing where most pressure occurred.
  
   Liquidity Footprints : These zones mark levels where significant buy/sell volume was executed, often becoming reaction points on future retests.
  
   Automatic Expiration : Zones persist until price decisively trades through them, after which they are cleared to keep the chart clean.
 
 🔵 FEATURES 
 
   Automatic Wick Detection : Identifies extreme upper and lower wick events using percentile filtering and Realative Strength Index.
   Gradient Zone Visualization : Builds a 10-layer zone from the wick top/bottom, shading intensity according to pressure strength.
   Volume Labels : Each zone is annotated with the bar’s volume at the origin point for added context.
   Dynamic Zone Extension : Zones extend to the right as long as they remain relevant; once price closes through them, they are removed.
   Support & Resistance Mapping : Upper wick zones (red) behave like supply/resistance, lower wick zones (green) like demand/support.
   Clutter Control : Limits the number of active zones (default 10) to keep charts responsive.
   Background Highlighting : Optional background shading when new wick zones appear (red for sell, green for buy).
   
 
 🔵 HOW TO USE 
 
   Look for Upper Wick Zones (red) : Indicate strong selling pressure; watch for resistance, reversals, or liquidity sweeps above.
   Look for Lower Wick Zones (green) : Indicate strong buying pressure; watch for support or liquidity sweeps below.
   Trade Retests : When price returns to a zone, expect a reaction (bounce or rejection) due to leftover liquidity.
  
  
   Combine with Context : Align wick pressure zones with HTF support/resistance, order blocks, or volume profile for stronger signals.
   Use Volume Labels : High-volume wicks indicate more significant liquidity events, making the zone more likely to act as a strong reaction point.
 
 🔵 CONCLUSION 
The  Wick Pressure Zones   is a powerful way to visualize hidden liquidity and aggressive rejections. By mapping extreme wick events into dynamic, volume-annotated zones, it shows traders where the market absorbed heavy buy/sell pressure. These levels frequently act as magnets or turning points, making them valuable for timing entries, stop placement, or fade strategies.
Liquidity Swing Points [BackQuant]Liquidity Swing Points  
This tool marks recent swing highs and swing lows and turns them into persistent horizontal “liquidity” levels. These are places where resting orders often accumulate, such as stop losses above prior highs and below prior lows. The script detects confirmed pivots, records their prices, draws lines and labels, and manages their lifecycle on the chart so you can monitor potential sweep or breakout zones without manual redrawing.
 What it plots 
 
 LQ-H at confirmed swing highs
 LQ-L at confirmed swing lows
 Horizontal levels that can optionally extend into the future
 Timed removal of old levels to keep the chart clean
 
Each level stores its price, the bar where it was created, its type (high or low), plus a label and a line reference for efficient updates.
 How it works 
 Pivot detection 
 
 A swing high is confirmed when the highest high has swing_length bars on both sides that are lower.
 A swing low is confirmed when the lowest low has swing_length bars on both sides that are higher.
 Pivots are only marked after they are confirmed, so they do not repaint.
 
 Level creation 
 
 When a pivot confirms, the script records the price and the creation bar (offset by the right lookback).
 A new line is plotted at that price, labeled LQ-H or LQ-L.
 
 Rendering and extension 
 
 Levels can be drawn to the most recent bar only or extended to the right for forward reference.
 Label size and line color/transparency are configurable.
 
 Lifecycle management 
 
 On each confirmed bar, the script checks level age.
 Levels older than a chosen bar count are removed automatically to reduce clutter.
 
 How it can be used 
 
 Liquidity sweeps: Watch for price to probe beyond a level then close back inside. That behavior often signals a potential fade back into the prior range.
 
 Breakout validation: If price pushes through a level and holds on closes, traders may treat that as continuation. Retests of the level from the other side can serve as structure checks.
 
 Context for entries and exits: Use nearby LQ-H or LQ-L as reference for stop placement or partial-take zones, especially when other tools agree.
 
 Multi-timeframe mapping: Plot swing points on higher timeframes, then drill down to time entries on lower timeframes as price interacts with those levels.
 
 Why liquidity levels matter 
Prior swing points are focal areas where many strategies set stops or pending orders. Price often revisits these zones, either to “sweep” resting liquidity before reversing, or to absorb it and trend. Marking these areas objectively helps frame scenarios like failed breaks, successful breakouts, and retests, and it reduces the subjectivity of eyeballing structure.
 Settings to know 
 
 Swing Detection Length (swing_length), Controls sensitivity. Lower values find more local swings. Higher values find more significant ones.
 Bars until removal (removeafter), Deletes levels after a fixed number of bars to prevent buildup.
 Extend Levels Right (extend_levels), Keeps levels projected into the future for easier planning.
 Label Size (label_size), Choose tiny to large for chart readability.
 One color input controls both high and low levels with transparency for context.
 
 Strengths 
 
 Objective marking of recent structure without hand drawing
 No repaint after confirmation since pivots are locked once the right lookback completes
 Lightweight and fast with simple lifecycle management
 Clear visuals that integrate well with any price-action workflow
 
 Practical tips 
 
 For scalping: use smaller swing_length to capture more granular liquidity. Keep removeafter short to avoid clutter.
 For swing trading: increase swing_length so only more meaningful levels remain. Consider extending levels to the right for planning.
 Combine with time-of-day filters, ATR for stop sizing, or a separate trend filter to bias trades taken at the levels.
 Keep screenshots focused: one image showing a sweep and reversal, another showing a clean breakout and retest.
 
 Limitations and notes 
 
 Levels appear after confirmation, so they are delayed by swing_length bars. This is by design to avoid repainting.
 On very noisy or illiquid symbols, you may see many nearby levels. Increasing swing_length and shortening removeafter helps.
 The script does not assess volume or session context. Consider pairing with volume or session tools if that is part of your process.
 
Multi HTF High/Low LevelsThis indicator plots the previous high and low from up to four user-defined higher timeframes (HTF), providing crucial levels of support and resistance. It's designed to be both powerful and clean, giving you a clear view of the market structure from multiple perspectives without cluttering your chart.
 Key Features: 
 
   Four Customizable Timeframes:  Configure up to four distinct higher timeframes (e.g., 1-hour, 4-hour, Daily, Weekly) to see the levels that matter most to your trading style.
   Automatic Visibility:  The indicator is smart. It automatically hides levels from any timeframe that is lower than your current chart's timeframe. For example, if you're viewing a Daily chart, the 4-hour levels won't be shown.
   Clean On-Chart Lines:  The high and low for each timeframe are displayed as clean, extended horizontal lines, but only for the duration of the current higher-timeframe period. This keeps your historical chart clean while still showing the most relevant current levels.
   Persistent Price Scale Labels:  For easy reference, the price of each high and low is always visible on the price scale and in the data window. This is achieved with an invisible plot, giving you the accessibility of a plot without the visual noise.
 
 How to Use: 
 
 Go into the indicator settings.
 Under each "Timeframe" group, check the "Show" box to enable that specific timeframe.
 Select your desired timeframe from the dropdown menu.
 The indicator will automatically calculate and display the previous high and low for each enabled timeframe.
OHLC Lines – Yesterday & Today (Minimalist Option)This indicator draws horizontal lines representing the Open, High, Low, and Close (OHLC) levels of yesterday and today directly on your chart. It automatically updates each day, showing only the lines for the previous day and the current day, keeping your chart clean and focused.
Features:
Display Yesterday’s OHLC levels.
Display Today’s OHLC levels.
Optional Minimalist Mode with customizable color, width, and line style.
Lines automatically update each day and remove old lines.
Fully customizable colors, visibility, and line width for each OHLC level.
Use Case:
Perfect for traders who want to monitor key daily price levels, identify support/resistance zones, or incorporate OHLC levels into intraday strategies.
LevelsThis Indicator is meant to plot some of the most common levels that traders use.  
The display of these levels is highly customizable, as you can choose the  line type ,  color ,  thickness  and whether it shows you  no label, price only, reduced label or full label  next to the line. All labels (except for "no Label") will show the price at this level.
Also You have the option to mark the start on each timeframe with either a individually colored background or a vertical line where you can choose the line style and color.
Full List of available Levels and Optional inputs to these levels:
 Previous HTF Candle Levels: 
• Previous HTF Candle Open
• Previous HTF Candle High
• Previous HTF Candle Low
• Previous HTF Candle Close
 Optional: 
• Choose any higher timeframe
• Mark start of new HTF candle
 Session Levels: 
• Session Open
• Session High
• Session Low
• Session Close 
 Optional:   
• Choose any time as start and end of your session
• Mark start of session 
• Mark full session
 Daily Levels: 
• Current Day Open
• Current Day High
• Current Day Low
• Previous Day Open
• Previous Day High
• Previous Day Low
• Previous Day Close
 Optional: 
• Choose start of day (standard, NY Midnight, custom start time)
• Mark start of day
 Weekly Levels: 
• Current Week Open
• Current Week High
• Current Week Low
• Previous Week Open
• Previous Week High
• Previous Week Low
• Previous Week Close
 Optional: 
• Mark start of Week
 Monthly Levels: 
• Current Month Open
• Current Month High
• Current MonthLow
• Previous Month Open
• Previous Month High
• Previous Month Low
• Previous Month Close
 Optional: 
• Mark start of Month






















