Multi-TF Support LevelsThe Multi-TF Support Levels indicator identifies and displays key support levels based on swing lows across three user-selected timeframes.
How it works:
Input Parameters:
Lookback Period (100) — historical depth to search for swing lows.
Timeframe 1-3 (15, 45, 240) — three timeframes (e.g., 15min, 45min, 4hr).
Logic:
For each timeframe, a swing low is detected: the lowest price within the lookback period that is also lower than the two preceding candles.
Support levels update dynamically when new swing lows are formed.
The most recent levels are plotted as horizontal cross marks (blue, red, green for each timeframe).
Purpose: Visualize significant support zones from multiple timeframes to identify confluent areas for trading decisions.
Индикатор Multi-TF Support Levels (Мультитаймфреймовые уровни поддержки) определяет и отображает ключевые уровни поддержки на основе минимумов свингов (swing lows) на трёх выбранных таймфреймах.
Как работает:
Входные параметры:
Lookback Period (100) — глубина анализа для поиска минимумов.
Timeframe 1-3 (15, 45, 240) — три таймфрейма (например, 15 минут, 45 минут, 4 часа).
Логика:
Для каждого таймфрейма определяется свинг-минимум: цена, которая является самой низкой за период lookback и ниже двух предыдущих свечей.
Уровни поддержки обновляются при появлении новых свинг-минимумов.
Последние актуальные уровни отображаются на графике в виде горизонтальных линий-крестиков (синий, красный, зелёный для каждого таймфрейма).
Цель: Визуализировать значимые уровни поддержки с разных таймфреймов для поиска зон "конфлюэнса".
Indicadores e estratégias
Spent Output Profit Ratio (SOPR) Z-Score | [DeV]SOPR Z-Score
The Spent Output Profit Ratio (SOPR) is an advanced on-chain metric designed to provide deep insights into Bitcoin market dynamics by measuring the ratio between the combined USD value of all Bitcoin outputs spent on a given day and their combined USD value at the time of creation (typically, their purchase price). As a member of the Realized Profit/Loss family of metrics, SOPR offers a window into aggregate seller behavior, effectively representing the USD amount received by sellers divided by the USD amount they originally paid. This indicator enhances this metric by normalizing it into a Z-Score, enabling a statistically robust analysis of market sentiment relative to historical trends, augmented by a suite of customizable features for precision and visualization.
SOPR Settings -
Lookback Length (Default: 150 days): Determines the historical window for calculating the Z-Score’s mean and standard deviation. A longer lookback captures broader market cycles, providing a stable baseline for identifying extreme deviations, which is particularly valuable for long-term strategic analysis.
Smoothing Period (Default: 100 days): Applies an EMA to the raw SOPR, balancing responsiveness to recent changes with noise reduction. This extended smoothing period ensures the indicator focuses on sustained shifts in seller behavior, ideal for institutional-grade trend analysis.
Moving Average Settings -
MA Lookback Length (Default: 90 days): Sets the period for the Z-Score’s moving average, offering a shorter-term trend signal relative to the 150-day Z-Score lookback. This contrast enhances the ability to detect momentum shifts within the broader context.
MA Type (Default: EMA): Provides six moving average types, from the simple SMA to the volume-weighted VWMA. The default EMA strikes an optimal balance between smoothness and responsiveness, while alternatives like HMA (Hull) or VWMA (volume-weighted) allow for specialized applications, such as emphasizing recent price action or incorporating volume dynamics.
Display Settings -
Show Moving Average (Default: True): Toggles the visibility of the Z-Score MA plot, enabling users to focus solely on the raw Z-Score when preferred.
Show Background Colors (Default: True): Activates dynamic background shading, enhancing visual interpretation of market regimes.
Background Color Source (Default: SOPR): Allows users to tie the background color to either the SOPR Z-Score’s midline (reflecting adjustedZScore > 0) or the MA’s trend direction (zScoreMA > zScoreMA ). This dual-source option provides flexibility to align the visual context with the primary analytical focus.
Analytical Applications -
Bear Market Resistance: When the Z-Score approaches or exceeds zero (raw SOPR near 1), it often signals resistance as sellers rush to exit at break-even, a pattern historically observed during downtrends. A rising Z-Score MA crossing zero can confirm this pressure.
Bull Market Support: Conversely, a Z-Score dropping below zero in uptrends indicates reluctance to sell at a loss, forming support as sell pressure diminishes. The MA’s bullish coloring reinforces confirmation of renewed buying interest.
Extreme Deviations: Values significantly above or below zero highlight overbought or oversold conditions, respectively, offering opportunities for contrarian positioning when paired with other on-chain or price-based metrics.
CVD Divergence Insights📘 CVD Divergence Insights – by Colicoid
Pine Script v6 | Volume Delta Divergence Oscillator with Spike Detection
⸻
🔍 Overview
CVD Divergence Insights is a volume-aware oscillator and divergence spike detector that helps you spot smart money activity, absorption, failed pressure, and hidden strength or weakness — even when price action alone gives little away.
It works by comparing normalized Cumulative Volume Delta (CVD) against normalized price movement, and optionally applying a volume-weighting layer to highlight when aggressive participation is truly behind the divergence. The result is a dynamic visual tool that identifies tension in the market, and helps you trade based on how that tension resolves.
⸻
🧠 Core Concept
• When price moves one way and CVD moves another, it reflects imbalance between aggression and result.
• Divergence is not a trigger — it’s a build-up of pressure.
• The real edge lies in the resolution of that pressure.
• Optional volume-weighting helps you ignore noise and focus on high-conviction moves only.
⸻
⚙️ How It Works
1. CVD Calculation
CVD is generated using lower-timeframe delta volume (buy vs. sell pressure), accumulated per bar.
2. Oscillator
A normalized divergence between the smoothed CVD and smoothed price.
3. Volume Weighting (optional)
Emphasizes divergences occurring on higher-than-normal volume, deprioritizes low-volume noise.
4. Signal Line (optional)
A short EMA of the oscillator to help track momentum shifts (hidden by default).
5. Divergence Spikes
Statistical spike detection using standard deviation — green/red dots highlight unusually large divergence activity.
⸻
🎛️ Inputs
Anchor Period
Higher timeframe where the CVD is accumulated and processed.
Lower Timeframe
Optional override for granularity of buy/sell volume data.
SMA Length
Used for smoothing both price and CVD before divergence is calculated.
Volume Weighted?
Enables adaptive weighting based on relative volume size.
Volume Normalization Length
Lookback period used to define what is “normal” volume.
Divergence Spike Threshold
StdDev-based threshold to detect abnormally large divergences.
Signal Line Length
Controls the EMA smoothing of the optional signal line (hidden by default).
⸻
📈 Trade Setup Example: Hidden Bullish Divergence
1. Price forms a higher low, but CVD forms a lower low — hidden bullish divergence.
2. This shows aggressive sellers are trying, but price is resilient — likely absorption.
3. You wait for a "convergent signal bar":
• A bullish candle with strong structure or body
• Confirmed by CVD starting to turn upward
4. That’s your trigger bar — the tension resolves upward.
⸻
🤝 Recommended Pairings
For best results, combine CVD Divergence Insights with the companion script:
🔗 Cumulative Volume Delta Line (also by Colicoid)
This lets you:
• See the raw CVD line and its SMA visually
• Spot standard and hidden divergences in price/CVD directly
• Use the Insights indicator to evaluate divergence quality and flag aggressive bull/bear behavior
• Use the same SMA length on both indicators for alignment
👉 Tip: To save screen space, drag the CVD Line indicator into the same panel as CVD Divergence Insights.
⸻
🧰 Why Use This?
• ✅ Catch absorption setups and failed pressure zones
• ✅ Filter out low-quality divergences using volume context
• ✅ Understand why price is hesitating or breaking out
• ✅ Add smart confirmation to breakout/reversal trades
• ✅ Align your execution with who’s actually in control
⸻
📎 Created by Colicoid
Built in Pine Script v6 for advanced price-volume analysis, with focus on effort vs result, market psychology, and smart money detection.
ICT FVG & Swing Detector Basic by Trader RiazICT FVG & Swing Detector Basic by Trader Riaz
Unlock Precision Trading with the Ultimate Fair Value Gap (FVG) and Swing Detection Tool!
Developed by Trader Riaz , the ICT FVG and Swing Detector Basic is a powerful Pine Script indicator designed to help traders identify key market structures with ease. Whether you're a day trader, swing trader, or scalper, this indicator provides actionable insights by detecting Bullish and Bearish Fair Value Gaps (FVGs) and Swing Highs/Lows on any timeframe. Perfect for trading forex, stocks, crypto, and more on TradingView!
Key Features:
1: Bullish and Bearish FVG Detection
- Automatically identifies Bullish FVGs (highlighted in green) and Bearish FVGs (highlighted in red) to spot potential reversal or continuation zones.
- Displays FVGs as shaded boxes with a dashed midline at 70% opacity, making it easy to see the midpoint of the gap for precise entries and exits.
- Labels are placed inside the FVG boxes at the extreme right for clear visibility.
2: Customizable FVG Display
- Control the number of Bullish and Bearish FVGs displayed on the chart with user-defined inputs (fvg_bull_count and fvg_bear_count).
- Toggle the visibility of Bullish and Bearish FVGs with simple checkboxes (show_bull_fvg and show_bear_fvg) to declutter your chart.
3: Swing High and Swing Low Detection
- Detects Swing Highs (blue lines) and Swing Lows (red lines) to identify key market turning points.
- Labels are positioned at the extreme right edge of the lines for better readability and alignment.
- Customize the number of Swing Highs and Lows displayed (swing_high_count and swing_low_count) to focus on the most recent market structures.
4: Fully Customizable Display
- Toggle visibility for Swing Highs and Lows (show_swing_high and show_swing_low) to suit your trading style.
- Adjust the colors of Swing High and Low lines (swing_high_color and swing_low_color) to match your chart preferences.
5: Clean and Efficient Design
- Built with Pine Script v6 for optimal performance on TradingView.
- Automatically removes older FVGs and Swing points when the user-defined count is exceeded, keeping your chart clean and focused.
- Labels are strategically placed to avoid clutter while providing clear information.
Why Use This Indicator?
Precision Trading: Identify high-probability setups with FVGs and Swing points, commonly used in Smart Money Concepts (SMC) and Institutional Trading strategies.
User-Friendly: Easy-to-use inputs allow traders of all levels to customize the indicator to their needs.
Versatile: Works on any market (Forex, Stocks, Crypto, Commodities) and timeframe (1M, 5M, 1H, 4H, Daily, etc.).
Developed by Trader Riaz: Backed by the expertise of Trader Riaz, a seasoned trader dedicated to creating tools that empower the TradingView community.
How to Use:
- Add the Custom FVG and Swing Detector to your chart on TradingView.
- Adjust the input settings to control the number of FVGs and Swing points displayed.
- Toggle visibility for Bullish/Bearish FVGs and Swing Highs/Lows as needed.
- Use the identified FVGs and Swing points to plan your trades, set stop-losses, and target key levels.
Ideal For:
- Traders using Smart Money Concepts (SMC), Price Action, or Market Structure strategies.
- Those looking to identify liquidity grabs, imbalances, and trend reversals.
- Beginners and advanced traders seeking a reliable tool to enhance their technical analysis.
Happy trading!
Highlight Time of InterestEST Time Period Background Indicator
This TradingView indicator visually highlights up to four custom-defined time periods on your chart using distinct background colors.
Key Features:
Custom Time Periods: Define up to four separate time intervals with individual start and end times, perfect for emphasizing key trading sessions or events.
Automatic Time zone Conversion: Automatically calculates the offset between the broker’s time zone and New York time (EST) so that your periods are correctly aligned with the Eastern market hours.
Visual Clarity:*Each period can be assigned a unique background color, providing clear visual cues directly on your chart for easier analysis and decision-making.
This indicator is ideal for traders who need a clear, automated visual reference for specific trading sessions or periods, streamlining the analysis process by highlighting critical timeframes directly on the chart.
111D SMA / (350D SMA * 2)Indicator: Pi Cycle Ratio
This custom technical indicator calculates a ratio between two moving averages that are used for the PI Cycle Top indicator. The PI Cycle Top indicator triggers when the 111-day simple moving average (111D SMA) crosses up with the 350-day simple moving average (350D SMA *2).
The line value is ratio is calculated as:
Line Value = 111DSMA / (350D SMA × 2)
When the 111D SMA crosses with the 350D SMA triggering the PI Cycle Top, the value of the ratio between the two lines is 1.
This visualizes the ratio between the two moving averages into a single line. This indicator can be used for technical analysis for historical and future moves.
Econometrica by [SS]This is Econometrica, an indicator that aims to bridge a big gap between the resources available for analysis of fundamental data and its impact on tickers and price action.
I have noticed a general dearth of available indicators that offer insight into how fundamentals impact a ticker and provide guidance on how they these economic factors influence ticker behaviour.
Enter Econometrica. Econometrica is a math based indicator that aims to co-integrate and model indicator price action in relation to critical economic metrics.
Econometrica supports the following US based economic data:
CPI
Non-Farm Payroll
Core Inflation
US Money Supply
US Central Bank Balance Sheet
GDP
PCE
Let's go over the functions of Econometrica.
Creating a Regression Cointegrated Model
The first thing Econometrica does is creates a co-integrated regression, as you see in the main chart, predicting ticker value ranges from fundamental economic data.
You can visualize this in the main chart above, but here are some other examples:
SPY vs Core Inflation:
BA vs PCE:
QQQ vs US Balance Sheet:
The band represents the anticipated range the ticker should theoretically fall in based on the underlying economic value. The indicator will breakdown the relationship between the economic indicator and the ticker more precisely. In the images above, you can see how there are some metrics provided, including Stationairty, lagged correlation, Integrated Correlation and R2. Let's discuss these very briefly:
Stationarity: checks to ensure that the relationship between the economic indicator and ticker is stationary. Stationary data is important for making unbiased inferences and projections, so having data that is stationary is valuable.
Lagged Correlation: This is a very interesting metric. Lagged correlation means whether there is a delay in the economic indicator and the response of the ticker. Typically, you will observed a lagged correlation between an economic indicator and price of a ticker, as it can take some time for economic changes to reach the market. This lagged correlation will provide you with how long it takes for the economic indicator to catch up with the ticker in months.
Integrated Correlation: This metric tells you how good of a fit the regression bands are in relation to the ticker price. A higher correlation, means the model is better at consistent and accurate information about the anticipated range for the ticker in relation to the economic indicator.
R2: Provides information on the variance and degree of model fit. A high R2 value means that the model is capable of explaining a large amount of variance between the economic indicator and the ticker price action.
Explaining the Relationship
Owning to the fact that the indicator is a bit on the mathy side (it has to be to do this kind of task), I have included ability for the indicator to explain and make suggestions based on the underlying data. It can assess the model's fit and make suggestions for tweaking. It can also explain the implications of the data being presented in the model.
Here is an example with QQQ and the US Balance Sheet:
This helps to simplify and interpret the results you are looking at.
Forecasting the Economic Indicator
In addition to assessing the economic indicator's impact on the ticker, the indicator is also capable of forecasting out the economic indicator over the next 25 releases.
Here is an example of the CPI forecast:
Overall use of the indicator
The indicator is meant to bridge the gap between Technical Analysis and Fundamental Analysis.
Any trader who is attune to fundamentals would benefit from this, as this provides you with objective data on how and to what extent fundamental and economic data impacts tickers.
It can help affirm hypothesis and dispel myths objectively.
It also omits the need from having to perform these types of analyses outside of Tradingview (i.e. in excel, R or Python), as you can get the data in just a few licks of enabling the indicator.
Conclusion
I have tried to make this indicator as user friendly as possible. Though it uses a lot of math, it is fairly straight forward to interpret.
The band plotted can be considered the fair market value or FMV of the ticker based on the underlying economic data, provided the indicator tells you that the relationship is significant (and it will blatantly give you this information verbatim, you don't have to interpret the math stuff).
This is US economic data only. It does not pull economic data from other countries. You can absolutely see how US economic data impacts other markets like the TSX, BANKNIFTY, NIFTY, DAX etc. but the indicator is only pulling US economic data.
That is it!
I hope you enjoy it and find this helpful!
Thanks everyone and safe trades as always 🚀🚀🚀
FiveFactorEdgeUses ATR14, TSI, RSI, Fast Stochastic and Slow Stochastic information to determine potential high and low price, trend strength and direction. The information ia easy to read, self-descriptive and color coded for quick reference. Since it incorporates 5 different elements it could be used by itself but as with any indicator it's highly recommended to use it with other tried and true indicators.
malama's volume spikeThe "malama's volume spike" indicator identifies and highlights bars where the trading volume significantly exceeds the average, signaling potential market interest or activity. It calculates a Simple Moving Average (SMA) of the volume over a user-defined period and compares the current volume against this average multiplied by a specified threshold factor. Bars where the volume surpasses this threshold are colored yellow on the chart, providing a visual cue for traders to identify potential trading opportunities.
How It Works:
Volume Moving Average (SMA): The indicator computes the SMA of the volume over a period defined by the user (default is 20 bars).
Threshold Calculation: It multiplies the SMA by a user-defined factor (default is 2.0) to set the volume spike threshold.
Volume Spike Detection: If the current volume exceeds this threshold, the corresponding bar is highlighted in yellow.
Usage:
Volume MA Length: Adjust this parameter to set the period over which the volume SMA is calculated. A shorter length responds more quickly to recent volume changes, while a longer length smooths out short-term fluctuations.
Volume Threshold Factor: Modify this factor to set the sensitivity of the volume spike detection. A lower value will highlight more bars, while a higher value will highlight fewer, more significant spikes.
OG Trend MeterDescription:
The OG Trend Meter gives you a visual snapshot of multiple timeframe trends in one glance. Built for speed and clarity, it helps confirm direction across key intraday timeframes: 1m, 5m, 15m, and 30m.
How it works:
Each timeframe analyzes EMA alignment, price action, and momentum.
Displays clear green/red indicators for bullish/bearish trends on each timeframe.
Great for aligning trades with higher timeframe bias.
Best for:
Traders who want multi-timeframe confirmation before pulling the trigger.
Reducing fakeouts by staying with the dominant trend.
Scalping with the 1m chart while respecting 5m–30m direction.
Pair With: OG Supertrend or EMA Stack for high-probability confluence.
OG ATR RangeDescription:
The OG ATR Tool is a clean, visualized version of the Average True Range indicator for identifying volatility, stop-loss levels, and realistic price movement expectations.
How it works:
Calculates the average range (in points/pips) of recent candles.
Overlays ATR bands to help define breakout potential or squeeze zones.
Can be used to size trades or set dynamic stop-loss and target levels.
Best for:
Intraday traders who want to avoid unrealistic targets.
Volatility-based setups and breakout strategies.
Creating position sizing rules based on instrument volatility.
Pro Tip: Combine with your trend indicators to set sniper entries and exits that respect volatility.
OG Volume PowerDescription:
The OG Volume Power is an elite-level volume analysis suite built for identifying momentum surges, trend continuation, and buyer/seller imbalances at critical price levels. It combines real-time VWAP tracking, a dynamic Point of Control (POC), and volume delta clusters to give traders a complete picture of price and volume interaction.
🔍 Key Features:
Real-Time VWAP:
Tracks volume-weighted average price to identify mean reversion and intraday fair value zones. Ideal for institutional-level entries and exits.
Dynamic POC (Point of Control):
Automatically finds the price level with the highest volume over the last N candles (default 50), helping traders pinpoint where market participants are most committed.
Buyer/Seller Volume Delta Clusters:
Highlights imbalances between buying and selling pressure using bullish and bearish volume deltas that exceed the 20-bar volume average — excellent for momentum detection and early trend recognition.
⚙️ How It Works:
Green triangle: Buyer surge (bullish delta + above average volume)
Red triangle: Seller surge (bearish delta + above average volume)
Magenta line: Dynamic POC (highest volume price over recent candles)
Orange line: VWAP (acts as a magnetic force for price)
📈 Best For:
Intraday scalping or swing trading on SPY, QQQ, BTC, or Forex
Volume flow confirmation before breakout entries
Filtering false breakouts with delta strength signals
🧠 Pro Tip:
Use OG Volume Power alongside your trend indicators (like OG EMA Stack or OG Supertrend) to confirm that volume is backing the move. Look for surges near VWAP or POC zones for sniper-level entries.
Posaunist 4h j1Title: 4-Hour Opening Price with Trendline and Label on the Right (Customizable Time Zone)
Description:
“This indicator plots horizontal lines at every 4-hour interval (00:00, 04:00, 08:00, etc.) with customizable labels showing the opening price. Users can choose to display or hide the time and price labels for each interval, with the option to adjust the color, width, transparency, and size of the labels and trendlines. Additionally, users can select their time zone offset.”
Previous Week & Day High/LowPrevious Week & Day High/Low Indicator
The Previous Week & Day High/Low Indicator is designed to provide traders with key support and resistance levels based on historical price data. It automatically plots the previous day's and previous week's highs and lows as horizontal lines, offering a clear visual reference for potential breakout or reversal zones.
Features:
Clear Visual Levels: Displays previous day's highs and lows in green and red for easy identification.
Weekly Context: Plots previous week's highs and lows using distinct color-coded lines.
Real-Time Updates: Adjusts to new weekly and daily highs and lows as they are confirmed.
Labeled Lines: Each level is labeled directly on the chart, ensuring clarity without clutter.
TR Buy/Sell Signal PanelI scripted this with chatgpt have fun guys
📊 TR Buy/Sell Signal Panel – Smart Trade Signals with Visual Clarity
The TR Buy/Sell Signal Panel is a standalone indicator inspired by the powerful Traders Reality (TR) methodology.
It detects potential long and short trade setups using classic market behavior patterns such as volume spikes, EMA crossovers, and session-based timing – all visualized cleanly and statically on your chart.
✅ Key Features
Buy Signals (LONG):
Green PVSRA candle (strong bullish candle with momentum)
EMA13 crossing above EMA50
Volume spike (current volume exceeds 20-period average × multiplier)
Triggered only during London or New York trading sessions (UTC)
Sell Signals (SHORT):
Red PVSRA candle (strong bearish move)
EMA13 crossing below EMA50
Volume spike
Also restricted to active session times
📌 Visual Components
Green/Red arrows on the chart indicate Buy/Sell entries
A static info panel in the bottom-right corner displays all signal conditions:
PVSRA active ✅
Volume Spike ✅
EMA Crossover ✅
Session Time ✅
Last Signal: 🟢 BUY / 🔴 SELL
Current Direction: 🟢 LONG / 🔴 SHORT / ❌ NONE
⚙️ Fully Customizable
Adjustable volume spike multiplier
Optional toggle for showing/hiding short signals
Extremely user-friendly layout – ideal for both beginners & experienced traders
📦 Best For:
Scalpers & Intraday Traders
Traders who follow the Traders Reality / Market Maker Method
Anyone who values clean, rule-based trade entries
Note: Works across all timeframes with sufficient volume (e.g., 5min – 4hr). Sessions are based on UTC time – adjust if needed based on your timezone or trading hours.
PumpC Opening Range Breakout (ORB) Stretch RangePumpC ORB Stretch
The PumpC ORB Stretch is a volatility-based indicator that helps traders identify potential breakout zones by analyzing how price typically behaves around the open. This tool is inspired by concepts introduced by Toby Crabel in his well-known book “Day Trading with Short-Term Price Patterns and Opening Range Breakout.”
Rather than predicting market direction, this indicator highlights areas where price is likely to expand based on recent volatility. It is designed for traders who prefer dynamic, data-driven breakout levels over static support and resistance zones.
What Is the "Stretch"?
In Toby Crabel’s framework, the Stretch is the average of the smaller of two price moves:
The distance from the open to the high of the bar
The distance from the open to the low of the bar
This smaller value captures the “quiet side” of the candle and reflects recent price compression. Averaged over multiple periods (commonly 10 daily bars), it creates a baseline to assess how far price may move away from the open under typical market conditions.
How the Indicator Works
The PumpC ORB Stretch follows this process:
Uses a higher timeframe (such as daily) to calculate the open, high, and low.
For each bar, measures the smaller of the two distances: open to high or open to low.
Applies a moving average to the result over a user-defined number of bars (default is 10).
Multiplies the average stretch by customizable levels (e.g., 0.382, 1.0, 2.0).
Plots breakout levels above and below the open of the selected timeframe.
The result is a set of adaptive levels that expand or contract with market volatility.
Customization Options
Stretch Timeframe: Choose the timeframe used for stretch calculation (default: Daily).
Stretch Length: Set the number of bars to include in the moving average.
Breakout Levels: Enable or disable individual levels and define multipliers.
Color Settings: Customize colors for each range level for easy visual distinction.
Plot Style: Circular markers are used to reduce chart clutter and improve readability.
How to Use It
Use plotted levels to anticipate possible breakouts from the open.
Adjust stretch length to reflect short-term or longer-term volatility trends.
Combine this tool with momentum indicators, volume, or price action for confirmation.
Use levels to help guide stop placement or profit targets in breakout strategies.
Important Notes
This script is based on an interpretation of Crabel’s concepts and is not affiliated with Crabel Capital or the original author.
The indicator does not predict direction; it is a tool for context and structure.
It is recommended that users test and validate this tool in a simulated environment before applying it to live trading.
This indicator is intended for educational purposes only.
Licensing and Attribution
This script is built entirely in Pine Script v5 and follows TradingView’s open-source standards. It does not include any third-party or proprietary code. If you modify or share it, please credit the original idea and follow all TradingView script publishing rules.
Nasan Risk Score & Postion Size Estimator** THE RISK SCORE AND POSITION SIZE WILL ONLY BE CALCUTAED ON DIALY TIMEFRAME NOT IN OTHER TIMEFRAMES.
The typically accepted generic rule for risk management is not to risk more than 1% - 2 % of the capital in any given trade. It has its own basis however it does not take into account the stocks historic & current performance and does not consider the traders performance metrics (like win rate, profit ratio).
The Nasan Risk Score & Position size calculator takes into account all the listed parameters into account and estimates a Risk %. The position size is calculated using the estimated risk % , current ATR and a dynamically adjusted ATR multiple (ATR multiple is adjusted based on true range's volatility and stocks relative performance).
It follows a series of calculations:
Unadjusted Nasan Risk Score = (Min Risk)^a + b*
Min Risk = ( 5 year weighted avg Annual Stock Return - 5 year weighted avg Annual Bench Return) / 5 year weighted avg Annual Max ATR%
Max Risk = ( 5 year weighted avg Annual Stock Return - 5 year weighted avg Annual Bench Return) / 5 year weighted avg Annual Min ATR%
The min and max return is calculated based on stocks excess return in comparison to the Benchmark return and adjusted for volatility of the stock.
When a stock underperforms the benchmark, the default is, it does not calculate a position size , however if we opt it to calculate it will use 1% for Min Risk% and 2% for Max Risk% but all the other calculations and scaling remain the same.
Rationale:
Stocks outperforming their benchmark with lower volatility (ATR%) score higher.
A stock with high returns but excessive volatility gets penalized.
This ensures volatility-adjusted performance is emphasized rather than absolute returns.
Depending on the risk preference aggressive or conservative
Aggressive Risk Scaling: a = max (m, n) and b = min (m, n)
Conservative Scaling: a = min (m, n) and b = max (m, n)
where n = traders win % /100 and m = 1 - (1/ (1+ profit ratio))
A default of 50% is used for win factor and 1.5 for profit ratio.
Aggressive risk scaling increases exposure when the strategy's strongest factor is favorable.
Conservative risk scaling ensures more stable risk levels by focusing on the weaker factor.
The Unadjusted Nasan risk is score is further refined based on a tolerance factor which is based on the stocks maximum annual drawdown and the trader's maximum draw down tolerance.
Tolerance = /100
The correction factor (Tolerance) adjusts the risk score based on downside risk. Here's how it works conceptually:
The formula calculates how much the stock's actual drawdown exceeds your acceptable limit.
If stocks maximum Annual drawdown is smaller than Trader's maximum acceptable drawdown % , this results in a positive correction factor (indicating the drawdown is within your acceptable range and increases the unadjusted score.
If stocks maximum Annual drawdown exceeds Trader's maximum acceptable drawdown %, the correction factor will decrease (indicating that the downside risk is greater than what you are comfortable with, so it will adjust the risk exposure).
Once the Risk Score (numerically equal to Risk %) The position size is calculated based on the current market conditions.
Nasan Risk Score (Risk%) = Unadjusted Nasan Risk Score * Tolerance.
Position Size = (Capital * Risk% )/ ATR-Multiplier * ATR
The ATR Multiplier is dynamically adjusted based on the stocks recent relative performance and the variability of the true range itself. It would range between 1 - 3.5.
The multiplier widens when conditions are not favorable decreasing the position size and increases position size when conditions are favorable.
This Calculation /Estimate Does not give you a very different result than the arbitrary 1% - 2%. However it does fine tune the % based on sock performance, traders performance and tolerance level.
Multi-MA Strategy Analyzer with BacktestMulti-MA Strategy Analyzer with Backtest
This TradingView Pine Script indicator is designed to analyze multiple moving averages (SMA or EMA) dynamically and identify the most profitable one based on historical performance.
Features
Dynamic MA Range:
Specify a minLength, maxLength, and step size.
Automatically calculates up to 20 MAs.
Custom MA Calculation:
Uses custom SMA and EMA implementations to support dynamic length values.
Buy/Sell Logic:
Buy when price crosses above a MA.
Sell when price crosses below.
Supports both long and short trades.
Performance Tracking:
Tracks PnL, number of trades, win rate, average profit, and drawdown.
Maintains individual stats for each MA.
Best MA Detection:
Automatically highlights the best-performing MA.
Optional showBestOnly toggle to focus only on the best line and its stats.
Visualization:
Up to 20 plot() calls (static) for MAs.
Green highlight for the best MA.
Color-coded result table and chart.
Table View
When showBestOnly = false, the table displays all MAs with stats.
When showBestOnly = true, the table displays only the best MA with a summary row.
Includes:
Best MA length
Total PnL
Number of trades
Win rate
Avg PnL per trade
Max Drawdown
Configuration
minLength (default: 10)
maxLength (default: 200)
step (default: 10)
useEMA: Toggle between EMA and SMA
showBestOnly: Focus on best-performing MA only
Notes
MA plotting is static, limited to 20 total.
Table supports highlighting and is optimized for performance.
Script is structured to run efficiently using arrays and simple int where required.
Potential Extensions
Add visual buy/sell arrows
Export stats to CSV
Strategy tester conversion
Custom date range filtering for backtesting
Author: Muhammad Wasim
Version: 1.0
Auto TrendLines [TradingFinder] Support Resistance Signal Alerts🔵 Introduction
The trendline is one of the most essential tools in technical analysis, widely used in financial markets such as Forex, cryptocurrency, and stocks. A trendline is a straight line that connects swing highs or swing lows and visually indicates the market’s trend direction.
Traders use trendlines to identify price structure, the strength of buyers and sellers, dynamic support and resistance zones, and optimal entry and exit points.
In technical analysis, trendlines are typically classified into three categories: uptrend lines (drawn by connecting higher lows), downtrend lines (formed by connecting lower highs), and sideways trends (moving horizontally). A valid trendline usually requires at least three confirmed touchpoints to be considered reliable for trading decisions.
Trendlines can serve as the foundation for a variety of trading strategies, such as the trendline bounce strategy, valid breakout setups, and confluence-based analysis with other tools like candlestick patterns, divergences, moving averages, and Fibonacci levels.
Additionally, trendlines are categorized into internal and external, and further into major and minor levels, each serving unique roles in market structure analysis.
🔵 How to Use
Trendlines are a key component in technical analysis, used to identify market direction, define dynamic support and resistance zones, highlight strategic entry and exit points, and manage risk. For a trendline to be reliable, it must be drawn based on structural principles—not by simply connecting two arbitrary points.
🟣 Selecting Pivot Types Based on Trend Direction
The first step is to determine the market trend: uptrend, downtrend, or sideways.
Then, choose pivot points that match the trend type :
In an uptrend, trendlines are drawn by connecting low pivots, especially higher lows.
In a downtrend, trendlines are formed by connecting high pivots, specifically lower highs.
It is crucial to connect pivots of the same type and structure to ensure the trendline is valid and analytically sound.
🟣 Pivot Classification
This indicator automatically classifies pivot points into two categories :
Major Pivots :
MLL : Major Lower Low
MHL : Major Higher Low
MHH : Major Higher High
MLH : Major Lower High
These define the primary structure of the market and are typically used in broader structural analysis.
Minor Pivots :
mLL: minor Lower Low
mHL: minor Higher Low
mHH: minor Higher High
mLH: minor Lower High
These are used for drawing more precise trendlines within corrective waves or internal price movements.
Example : In a downtrend, drawing a trendline from an MHH to an mHH creates structural inconsistency and introduces noise. Instead, connect points like MHL to MHL or mLH to mLH for a valid trendline.
🟣 Drawing High-Precision Trendlines
To ensure a reliable trendline :
Use pivots of the same classification (Major with Major or Minor with Minor).
Ensure at least three valid contact points (three touches = structural confirmation).
Draw through candles with the least deviation (choose wicks or bodies based on confluence).
Preferably draw from right to left for better alignment with current market behavior.
Use parallel lines to turn a single trendline into a trendline zone, if needed.
🟣 Using Trendlines for Trade Entries
Bounce Entry: When price approaches the trendline and shows signs of reversal (e.g., a reversal candle, divergence, or support/resistance), enter in the direction of the trend with a logical stop-loss.
Breakout Entry: When price breaks through the trendline with strong momentum and a confirmation (such as a retest or break of structure), consider trading in the direction of the breakout.
🟣 Trendline-Based Risk Management
For bounce entries, the stop-loss is placed below the trendline or the last pivot low (in an uptrend).
For breakout entries, the stop-loss is set behind the breakout candle or the last structural level.
A broken trendline can also act as an exit signal from a trade.
🟣 Combining Trendlines with Other Tools (Confluence)
Trendlines gain much more strength when used alongside other analytical tools :
Horizontal support and resistance levels
Moving averages (such as EMA 50 or EMA 200)
Fibonacci retracement zones
Candlestick patterns (e.g., Engulfing, Pin Bar)
RSI or MACD divergences
Market structure breaks (BoS / ChoCH)
🔵 Settings
Pivot Period : This defines how sensitive the pivot detection is. A higher number means the algorithm will identify more significant pivot points, resulting in longer-term trendlines.
Alerts
Alert :
Enable or disable the entire alert system
Set a custom alert name
Choose how often alerts trigger (every time, once per bar, or on bar close)
Select the time zone for alert timestamps (e.g., UTC)
Each trendline type supports two alert types :
Break Alert : Triggered when price breaks the trendline
React Alert : Triggered when price reacts or bounces off the trendline
These alerts can be independently enabled or disabled for all trendline categories (Major/Minor, Internal/External, Up/Down).
Display :
For each of the eight trendline types, you can control :
Whether to show or hide the line
Whether to delete the previous line when a new one is drawn
Color, line style (solid, dashed, dotted), extension direction (e.g., right only), and width
Major lines are typically thicker and more opaque, while minor lines appear thinner and more transparent.
All settings are designed to give the user full control over the appearance, behavior, and alert system of the indicator, without requiring manual drawing or adjustments.
🔵 Conclusion
A trendline is more than just a line on the chart—it is a structural, strategic, and flexible tool in technical analysis that can serve as the foundation for understanding price behavior and making trading decisions. Whether in trending markets or during corrections, trendlines help traders identify market direction, key zones, and high-potential entry and exit points with precision.
The accuracy and effectiveness of a trendline depend on using structurally valid pivot points and adhering to proper market logic, rather than relying on guesswork or personal bias.
This indicator is built to solve that exact problem. It automatically detects and draws multiple types of trendlines based on actual price structure, separating them into Major/Minor and Internal/External categories, and respecting professional analytical principles such as pivot type, trend direction, and structural location.
MACD Crossover Breakout Rays with VWAP & Breakout ConfirmationOverview
This script is designed to highlight potential strong breakout moves by combining MACD crossovers, VWAP confirmation, and price action breakouts. It helps traders identify momentum shifts and filter high-probability trade setups.
How It Works
1. MACD Crossover Detection
- The script detects bullish crossovers (MACD line crossing above the signal line) and bearish crossovers (MACD line crossing below the signal line).
- A horizontal ray is drawn at the high (bullish) or low (bearish) of the crossover candle.
2. Multi-Timeframe MACD Confirmation
- A secondary MACD crossover is checked on a lower timeframe (default: 5 minutes) to confirm the strength of the move.
- The script ensures alignment between the primary and lower timeframe MACD crossovers before signaling a strong move.
3. VWAP Confirmation
- A bullish breakout is valid only if the price is above the VWAP.
- A bearish breakout is valid only if the price is below the VWAP.
4. Breakout Validation
- The script waits for price action confirmation—a breakout is only valid when a candle closes above (bullish) or below (bearish) the horizontal ray.
- Once confirmed, the ray color changes to blue to signal a strong move.
5. Label Alerts for Strong Moves
- When all conditions align, the script prints "STRONG 💪 MOVE" above or below the breakout candle.
- The previous label is automatically removed to keep the chart clean.
Customization Options
- MACD Settings: Adjust fast/slow lengths and signal smoothing.
- Lower Timeframe Confirmation: Choose a different timeframe for multi-timeframe MACD validation.
- VWAP Filtering: Ensure breakouts align with volume-weighted trends.
- Ray Length & Colors: Customize the horizontal ray length, width, and colors.
- Breakout Confirmation Window: Adjust how many bars to check for MACD alignment.
Best Use Cases
✅ Identifying high-probability breakouts with trend confirmation.
✅ Filtering out false signals by requiring multi-timeframe agreement.
✅ Helping traders stay in momentum-driven moves with strong confirmation.
⚠ Note: This script is for educational purposes only and does not constitute financial advice. Always conduct your own analysis before making trading decisions.
WMA and Intraday Highest Volume Candle Levels🔹 WMA Calculation (Weighted Moving Averages)
Custom WMA Function:
Uses a manual weighted average calculation.
Assigns more weight to recent prices for smoother trend detection.
Three Timeframes:
5-Minute WMA (Yellow)
15-Minute WMA (Blue)
30-Minute WMA (Red)
🔹 Intraday Highest Volume Candle Levels
Finds the candle with the highest volume for the selected intraday timeframe.
Stores its High & Low levels to act as support/resistance.
Deletes and redraws lines daily to reflect the latest session's highest volume candle.
Plots horizontal lines:
Green Line: High of the highest volume candle.
Red Line: Low of the highest volume candle.
Customization: User can choose the analysis timeframe (default: 3 minutes).
✅ Benefits of This Indicator
✔ Multi-timeframe trend analysis using WMA.
✔ Key intraday levels based on highest volume candle.
✔ Dynamic support & resistance levels based on real-time volume activity.
✔ Customizable timeframe for volume analysis.
Elliott Wave Identification By Akash Patel
This script is designed to visually highlight areas on the chart where there are consecutive bullish (green) or bearish (red) candles. It also identifies sequences of three consecutive candles of the same type (bullish or bearish) and highlights those areas with adjustable box opacity. Here's a breakdown of the functionality:
---
### Key Features:
1. **Bullish & Bearish Candle Identification:**
- **Bullish Candle:** When the closing price is higher than the opening price (`close > open`).
- **Bearish Candle:** When the closing price is lower than the opening price (`close < open`).
2. **Consecutive Candle Counter:**
- The script counts consecutive bullish and bearish candles, which resets when the direction changes (from bullish to bearish or vice versa).
- The script tracks these counts using the `bullishCount` and `bearishCount` variables, which are incremented based on whether the current candle is bullish or bearish.
3. **Highlighting Candle Areas:**
- If there are **3 or more consecutive bullish candles**, the script will highlight the background in a green color with 90% transparency (adjustable).
- Similarly, if there are **3 or more consecutive bearish candles**, the script will highlight the background in a red color with 90% transparency (adjustable).
4. **Three-Candle Sequence:**
- The script checks if there are three consecutive bullish candles (`threeBullish`) or three consecutive bearish candles (`threeBearish`).
- A box is drawn around these areas to visually highlight the sequence. The boxes extend to the right edge of the chart, and their opacity can be adjusted.
5. **Box Creation:**
- For bullish sequences, a green box is created using the high and low prices of the three candles in the sequence.
- For bearish sequences, a red box is created in the same manner.
- The box size is determined by the highest high and the lowest low of the three consecutive candles.
6. **Box Opacity:**
- You can adjust the opacity of the boxes through the input parameters `Bullish Box Opacity` and `Bearish Box Opacity` (ranging from 0 to 100).
- A higher opacity will make the boxes more solid, while a lower opacity will make them more transparent.
7. **Box Cleanup:**
- The script also includes logic to remove boxes when they are no longer needed, ensuring the chart remains clean without excessive box overlays.
8. **Extending Boxes to the Right:**
- When a bullish or bearish sequence is identified, the boxes are extended to the right edge of the chart for continued visibility.
---
### How It Works:
- **Bullish Area Highlight:** When three or more consecutive bullish candles are detected, the background will turn green to indicate a strong bullish trend.
- **Bearish Area Highlight:** When three or more consecutive bearish candles are detected, the background will turn red to indicate a strong bearish trend.
- **Three Consecutive Candle Box:** A green box will appear around three consecutive bullish candles, and a red box will appear around three consecutive bearish candles. These boxes can be extended to the right edge of the chart, making the sequence visually clear.
---
### Adjustable Parameters:
1. **Bullish Box Opacity:** Set the opacity (transparency) level of the bullish boxes. Ranges from 0 (completely transparent) to 100 (completely opaque).
2. **Bearish Box Opacity:** Set the opacity (transparency) level of the bearish boxes. Ranges from 0 (completely transparent) to 100 (completely opaque).
---
This indicator is useful for identifying strong trends and visually confirming market momentum, especially in situations where you want to spot sequences of bullish or bearish candles over multiple bars. It can be customized to suit different trading styles and chart preferences by adjusting the opacity of the boxes and background highlights.
McClellan Oscillator - IRUS Optimized🧠 McClellan Oscillator (IRUS Index)
Type: Market Breadth Indicator
Category: Breadth, Momentum
Purpose: Gauge the internal strength of the IRUS index and anticipate trend reversals
📌 Based on
This indicator is built on the concept of advancing vs. declining issues — the number of stocks rising vs. falling each day within the IRUS index (a custom group of 40 Russian stocks).
It calculates the net advances (advancers minus decliners), then applies two exponential moving averages (EMA):
java
Copy
Edit
McClellan Oscillator = EMA_19(Net Advances) - EMA_39(Net Advances)
Where:
Net Advances = Number of advancing stocks - Number of declining stocks
Calculated from a fixed set of 40 IRUS stocks
🧭 What it shows
Above 0 → more stocks are rising: market is internally strong.
Below 0 → more stocks are falling: underlying weakness.
Rising from below -100 → oversold breadth, possible bullish reversal.
Falling from above +100 → overbought breadth, possible correction.
🎯 How to use it
1. Buy/Sell Signals
Buy: Oscillator drops below -100 and turns up → oversold, potential rally.
Sell: Oscillator rises above +100 and turns down → overbought, risk of pullback.
2. Trend Strength Confirmation
Sustained above 0 → confirms bullish trend.
Crosses below 0 → early warning of weakening market breadth.
3. Divergences with IRUS Price
IRUS rises, but Oscillator falls → narrowing leadership, bearish divergence.
IRUS falls, but Oscillator rises → improving breadth, bullish divergence.
⚠️ Notes
The oscillator measures participation, not price.
Works best with daily timeframe.
Does not account for volume or magnitude of price moves.
Use with price action or other indicators for confirmation.
⚙️ Custom Implementation
This version is specifically adapted for the IRUS index, using a fixed list of 40 component stocks.
Optimized for Pine Script v6 and complies with TradingView's request limits (max 40).