Swing Structure + Session Sweeps“Scalper-Friendly Trend & Sweep Detector”
Swing Structure + Session Sweeps with TEMA Cloud
This powerful all-in-one tool is designed for intraday traders, swing traders, and scalpers who want to spot high-probability reversals, trend continuations, and liquidity sweeps with confluence.
🔹 Core Features
Multi-layered TEMA Cloud (9, 20, 34, 50) for clear trend structure
Dynamic Bull/Bear labels when the trend flips
Centerline for TEMA 20 to visualize core trend direction
Session-based liquidity sweep detection (Asia, London, NY)
Volume and absorption dots to catch hidden pressure
Swing high/low detection (external and internal)
Visual VWAP, daily highs/lows, and customizable session zones
Optional alerts for volume spikes, absorption, and reversal sweeps
📈 Use it to:
Confirm directional bias
Anticipate pullbacks and breakouts
Identify volume-backed reversals
Align trades with session strength and swing confluence
⚙️ Built for scalpers, intraday opportunists, and precision chartists alike.
Indicatori e strategie
VWAP StrategyVWAP and volatility filters for structured intraday trades.
How the Strategy Works
1. VWAP Anchored to Session
VWAP is calculated from the start of each trading day.
Standard deviations are used to create bands above/below the VWAP.
2. Entry Triggers: Al Brooks H1/H2 and L1/L2
H1/H2 (Long Entry): Opens below 2nd lower deviation, closes above it.
L1/L2 (Short Entry): Opens above 2nd upper deviation, closes below it.
3. Volatility Filter (ATR)
Skips trades when deviation bands are too tight (< 3 ATRs).
4. Stop Loss
Based on the signal bar’s high/low ± stop buffer.
Longs: signalBarLow - stopBuffer
Shorts: signalBarHigh + stopBuffer
5. Take Profit / Exit Target
Exit logic is customizable per side:
VWAP, Deviation Band, or None
6. Safety Exit
Exits early if X consecutive bars go against the trade.
Longs: X red bars
Shorts: X green bars
Explanation of Strategy Inputs
- Stop Buffer: Distance from signal bar for stop-loss.
- Long/Short Exit Rule: VWAP, Deviation Band, or None
- Long/Short Target Deviation: Standard deviation for target exit.
- Enable Safety Exit: Toggle emergency exit.
- Opposing Bars: Number of opposing candles before safety exit.
- Allow Long/Short Trades: Enable or disable entry side.
- Show VWAP/Entry Bands: Toggle visual aids.
- Highlight Low Vol Zones: Orange shading for low volatility skips.
Tuning Tips
- Stop buffer: Use 1–5 points.
- Target deviation: Start with VWAP. In strong trends use 2nd deviation and turn off the counter-trend entry.
- Safety exit: 3 bars recommended.
- Disable short/long side to focus on one type of reversal.
Backtest Setup Suggestions
- initial_capital = 2000
- default_qty_value = 1 (fixed contracts or percent-of-equity)
BIN Based Support and Resistance [SS]This indicator presents a version of an alternative way to determine support and resistance, using a method called "Bins".
Bins provide for a flexible and interesting way to determine support and resistance levels.
First off, let's discuss BINS:
Bins are ranges or containers into which your data points can be sorted. For example, if you're grouping ages, you might have bins like 0–18, 19–35, 36–50, and 51+. Any data point within these intervals gets placed in the corresponding bin.
Binning simplifies complex data sets by grouping values into categories. This is useful for such things as
Visualizing data in histograms or bar charts.
Reducing noise and highlighting trends.
This indicator groups the price action into 10 separate bins. It determines the Support / Resistance level by averaging the values in the Bins to find an iteration of the "central tendency" or average reoccurring value.
Pros and Cons
Since this is a different approach to support and resistance, I think its important to highlight some of the pros and advantages, but also be open about the cons.
First off the PROS
Bin Based Support and Resistance Levels dynamically adjust to ranges as opposed to hard / fast peaks and valleys. This makes them better at analyzing price action vs simply drawing lines at random peaks and valleys.
Because Bins are analyzing ALL PA within a period's max and min range, Bin Support and Resistance can actually be used similar to Volume profile, where you are able to identify a pseudo-POC, or areas where price tends to consolidate. Take a look at this example on SPY:
You can see these 2 SR lines are close together. This represents that this general price range is an area where price likes to accumulate/consolidate. You can see the SPY ended up coming back to this range and consolidating there for a bit.
This is a strength of using a BIN based approach to calculating support and resistance, because as indicated before, it looks at price action vs peaks and valleys.
As a tip, these areas are areas you want to wait for a break in one direction or the other.
The indicator provides for backtest results of the support and resistance lines, to see how many times certain areas acted as resistance or support. Because this is analyzing and distributing PA evenly throughout the period's max and min, the indicator can tell you which areas tend to have higher rejection zones and which have higher support zones.
Now the CONS
Because bin based SR take an average approach, the SR lines can sometimes be slightly broken before the ticker finds rejection:
To combat this, make sure there is confirmed support. How the indicator actually backtests these lines is by waiting to see if the ticker has 3 consecutive closes above the support line or below the resistance line. So these are things to be mindful of.
It doesn't consider pivots. Most support and resistance indicators either identify max and min peaks and valleys or use pivot points. Pivot points are a great way to identify peaks and valleys and thus by extension support and resistance. However, this is also somewhat of a strength, as using BINS forces the indicator to consider ALL price action and not just the extremes (highs and lows).
Can be slightly skewed in highly volatile environments. Any time there is a massive drop or rally, it can skew the indicator to give extreme ranges to both ends. For example, the Tariff news collapse on ES1!:
Owning to limitations in lookback length, sometimes the min and max range can be exceeded and other traditional areas of support / resistance is where a ticker will find support.
Using the indicator
Here are some basic use/functionalities of the indicator:
Selecting display of backtest results: You can select to have the backtest results shown in a table:
Or directly on the lines:
Inversely, you can toggle them off completely:
You can modify the lookback length. The suggested lookback length is between 250 to 500 candles on smaller timeframes. I also suggest 252 on daily timeframes (which represents 1 trading year).
And that's the indicator!
It is very easy to use, so you should pick it up in no time!
Enjoy and as always, 🚀🚀 safe trades! 🚀🚀
Pearson Correlation [Mr_Rakun] Pearson Correlation
This script calculates the Pearson correlation coefficient (r) between the closing price of the current asset and another selected asset.
🔍 How It Works:
• The user selects a correlation period (default: 20) and a symbol (default: ETH/USDT).
• The script retrieves the closing prices of both assets.
• The Pearson correlation formula is applied:
r = \frac{n(\sum xy) - (\sum x)(\sum y)}{\sqrt{ }}
• The correlation is plotted as a histogram:
• +1 (green line) → Perfect positive correlation
• -1 (red line) → Perfect negative correlation
• 0 (gray line) → No correlation
📊 Why Use This?
This indicator helps traders identify relationships between assets, such as whether two markets move together or inversely. It is useful for hedging strategies, portfolio diversification, and market comparisons.
GQT GPT - Volume-based Support & Resistance Zones V2搞钱兔,搞钱是为了更好的生活。
Title: GQT GPT - Volume-based Support & Resistance Zones V2
Overview:
This strategy is implemented in PineScript v5 and is designed to identify key support and resistance zones based on volume-driven fractal analysis on a 1-hour timeframe. It computes fractal high points (for resistance) and fractal low points (for support) using volume moving averages and specific price action criteria. These zones are visually represented on the chart with customizable lines and zone fills.
Trading Logic:
• Entry: The strategy initiates a long position when the price crosses into the support zone (i.e., when the price drops into a predetermined support area).
• Exit: The long position is closed when the price enters the resistance zone (i.e., when the price rises into a predetermined resistance area).
• Time Frame: Trading signals are generated solely from the 1-hour chart. The strategy is only active within a specified start and end date.
• Note: Only long trades are executed; short selling is not part of the strategy.
Visualization and Parameters:
• Support/Resistance Zones: The zones are drawn based on calculated fractal values, with options to extend the lines to the right for easier tracking.
• Customization: Users can configure the appearance, such as line style (solid, dotted, dashed), line width, colors, and label positions.
• Volume Filtering: A volume moving average threshold is used to confirm the fractal signals, enhancing the reliability of the support and resistance levels.
• Alerts: The strategy includes alert conditions for when the price enters the support or resistance zones, allowing for timely notifications.
⸻
搞钱兔,搞钱是为了更好的生活。
标题: GQT GPT - 基于成交量的支撑与阻力区间 V2
概述:
本策略使用 PineScript v5 实现,旨在基于成交量驱动的分形分析,在1小时级别的图表上识别关键支撑与阻力区间。策略通过成交量移动平均线和特定的价格行为标准计算分形高点(阻力)和分形低点(支撑),并以自定义的线条和区间填充形式直观地显示在图表上。
交易逻辑:
• 进场条件: 当价格进入支撑区间(即价格跌入预设支撑区域)时,策略在没有持仓的情况下发出做多信号。
• 离场条件: 当价格进入阻力区间(即价格上升至预设阻力区域)时,持有多头头寸则会被平仓。
• 时间范围: 策略的信号仅基于1小时级别的图表,并且仅在指定的开始日期与结束日期之间生效。
• 备注: 本策略仅执行多头交易,不进行空头操作。
可视化与参数设置:
• 支撑/阻力区间: 根据计算得出的分形值绘制支撑与阻力线,可选择将线条延伸至右侧,便于后续观察。
• 自定义选项: 用户可以调整线条样式(实线、点线、虚线)、线宽、颜色及标签位置,以满足个性化需求。
• 成交量过滤: 策略使用成交量移动平均阈值来确认分形信号,提高支撑和阻力区间的有效性。
• 警报功能: 当价格进入支撑或阻力区间时,策略会触发警报条件,方便用户及时关注市场变化。
⸻
Body Percentage of Range (Colored)Short Description:
This indicator measures the dominance of the candle's body relative to its total range (High - Low), providing a visual gauge of intra-candle strength versus indecision. Columns are colored based on whether the body constitutes more or less than a defined percentage (default 50%) of the candle's total height.
Detailed Description:
What it Does:
The "Body Percentage of Range" indicator calculates, for each candle, what percentage of the total price range (High minus Low) is occupied by the candle's body (absolute difference between Open and Close).
A value of 100% means the candle has no wicks (a Marubozu), indicating strong conviction during that period.
A value of 0% means the candle has no body (a Doji), indicating perfect indecision.
Values in between show the relative balance between the directional move (body) and the price exploration/rejection (wicks).
How to Interpret:
The indicator plots this percentage as columns:
Column Height: Represents the percentage of the body relative to the total range. Higher columns indicate a larger body dominance.
Column Color:
Green Columns: Appear when the body percentage is above the user-defined threshold (default 50%). This suggests that the directional move within the candle was stronger than the indecision (wicks). Often seen during trending moves or strong momentum candles.
Red Columns: Appear when the body percentage is at or below the user-defined threshold (default 50%). This suggests that wicks dominate the candle (body is 50% or less of the range), indicating significant indecision, struggle between buyers and sellers, or potential reversals. These are common in choppy, consolidating, or reversal market conditions.
Orange Line (Optional MA): A Simple Moving Average (SMA) of the body percentages is plotted to help smooth the readings and identify broader periods where candle structure indicates more trending (high MA) vs. ranging/indecisive (low MA) characteristics.
Potential Use Cases:
Identifying Choppy vs. Trending Markets: Sustained periods of low, predominantly red columns (and often a low/declining MA) can signal a choppy, range-bound market where trend-following strategies might underperform. Conversely, periods with frequent high, green columns suggest a more trending environment.
Confirming Breakouts/Momentum: High green columns appearing alongside increased volume during a breakout can add conviction to the move's strength.
Spotting Potential Exhaustion/Reversals: A very tall green column after a strong trend, followed immediately by a low red column (like a Doji or Spinning Top pattern appearing on the price chart), might signal potential exhaustion or a pending reversal, indicating indecision has suddenly entered the market.
Filtering Entries: Traders might avoid taking entries (especially trend-following ones) when the indicator shows a consistent pattern of low red columns, suggesting high market indecision.
Settings:
Color Threshold %: Allows you to set the percentage level above which columns turn green (default is 50%).
Smoothing MA Length: Adjusts the lookback period for the Simple Moving Average.
Disclaimer:
This indicator is a tool for technical analysis and should be used in conjunction with other methods (like price action, volume analysis, other indicators) and robust risk management. It does not provide direct buy/sell signals and past performance is not indicative of future results.
FunkyQuokka's $ Volume💡 Why $ Volume Matters
Share volume alone is a half-truth — 1M shares traded at $5 isn’t the same as 1M shares at $500. That’s where dollar volume steps in, offering a far more accurate view of institutional interest, breakout validity, liquidity zones and overall trader conviction.
📈 Features:
Clean histogram of dollar volume (close × volume)
Orange line showing customizable average $ volume
K/M/B formatting for axis scale (no huge ugly numbers)
Minimal design to blend into a multi-pane layout
⚙️ Inputs:
Tweakable average length – defaults to 20
By FunkyQuokka 🦘
Smart Money Pivot Strategy [Jason Kasei]This strategy is designed to identify key pivot points (Pivot High and Pivot Low) in the market and leverage the "Smart Money" concept to capture price breakout opportunities. It supports both long and short trades, offering customizable stop-loss (SL) and take-profit (TP) settings, while visually plotting pivot points and breakout signals on the chart.
Core Features
Pivot Point Detection:
Utilizes ta.pivothigh and ta.pivotlow functions to detect the highest (Pivot High) and lowest (Pivot Low) points within a specified period (default: 20 bars).
Trading Signals:
Long Signal: Triggered when the price breaks above a previous Pivot High, indicating a potential uptrend.
Short Signal: Triggered when the price breaks below a previous Pivot Low, indicating a potential downtrend.
How It Works
Detects Pivot High (PH) and Pivot Low (PL) over the specified period and records their price and time.
Triggers a long entry when the price breaks above a Pivot High and a short entry when it falls below a Pivot Low.
Sets exit conditions automatically based on predefined SL and TP percentages after entry.
Plots breakout points and levels on the chart for analysis.
Considerations
The strategy relies on accurate pivot point detection; adjust the period parameter based on market volatility.
In highly volatile markets, consider widening the stop loss to avoid frequent triggering.
Combine with other indicators or analysis methods to validate signals and avoid blind trading.
Zig Zag Trend Metrics“ Zig Zag Trend Metrics ” is a highly versatile indicator, built on the classic Zig Zag concept and thoughtfully designed for technical traders seeking a deeper, more structured view of market dynamics. This tool identifies significant swing highs and lows, classifies them, and annotates each with key metrics, offering a precise snapshot of each movement. It enhances visual analysis by drawing connecting lines that outline the flow of market structure, making trend progression and reversals instantly recognizable. Beyond visual mapping, it features a compact, real-time statistics table that calculates the average price and time deltas for both bullish and bearish swings, giving traders deep insights into trend momentum and rhythm. With extensive customization options, this indicator adapts seamlessly to vast trading styles or chart setups, empowering traders to spot patterns, evaluate trend strength, and make more confident, data-backed decisions.
❖ FEATURES
✦ Automatic Swing Detection
At its core, this indicator automatically identifies swing highs and lows based on a customizable lookback period (default: 10 bars).
✦ Labeling Swing Points
Each swing is visualized with a label that includes:
Swing Classification : “HH” (Higher High), “LH” (Lower High), “LL” (Lower Low), or “HL” (Higher Low).
Price Difference : Displayed in percentage or absolute value from the previous opposite swing.
Time Difference : The number of bars since the previous swing of the opposite type.
These labels offer traders clear, immediate insight into price movements and structural changes.
✦ Visual Lines
The indicator draws three types of lines:
Bullish Lines: Connect recent swing lows to new swing highs, indicating uptrends.
Bearish Lines: Connect recent swing highs to new swing lows, indicating downtrends.
Range Lines: Connect consecutive highs or lows to outline price channels.
Each line type can be color-coded and customized for visibility.
✦ Statistics Table
An on-screen metrics table provides a live summary of trends. Script uses Relative Averaging to smooth price and time changes. This prevents outliers from distorting the data and provides a more reliable sense of typical swing behavior.
Uptrend Metrics: Shows average price and time differences from recent bullish swings.
Downtrend Metrics: Shows the same for bearish swings.
🛠️ Customization Options
Ability to tailor the indicator to suit their strategy and aesthetic preferences:
Swing Period: Adjust sensitivity to short- or long-term swings.
Color Settings: Customize line and label colors.
Label Display: Choose between absolute or percentage price differences.
Table Settings: Modify size, location, or visibility.
This makes the indicator highly flexible and useful across various timeframes and assets.
PivotLabelsLibrary "PivotLabels"
drawPivots(qtyLabels, leftLegs, rightLegs)
Displays a label for each of the last `qtyLabels` pivots.
Colors high pivots in green, low pivots in red, and breached pivots in gray.
Parameters:
qtyLabels (int) : (simple int) Quantity of last labels to display.
leftLegs (int) : (simple int) Left pivot legs.
rightLegs (int) : (simple int) Right pivot legs.
Returns: Nothing.
Gioteen-NormThe "Gioteen-Norm" indicator is a versatile and powerful technical analysis tool designed to help traders identify key market conditions such as divergences, overbought/oversold levels, and trend strength. By normalizing price data relative to a moving average and standard deviation, this indicator provides a unique perspective on price behavior, making it easier to spot potential reversals or continuations in the market.
The indicator calculates a normalized value based on the difference between the selected price and its moving average, scaled by the standard deviation over a user-defined period. Additionally, an optional moving average of this normalized value (Green line) can be plotted to smooth the output and enhance signal clarity. This dual-line approach makes it an excellent tool for both short-term and long-term traders.
***Key Features
Divergence Detection: The Gioteen-Norm excels at identifying divergences between price action and the normalized indicator value. For example, if the price makes a higher high while Red line forms a lower high, it may signal a bearish divergence, hinting at a potential reversal.
Overbought/Oversold Conditions: Extreme values of Red line (e.g., significantly above or below zero) can indicate overbought or oversold conditions, helping traders anticipate pullbacks or bounces.
Trend Strength Insight: The normalized output reflects how far the price deviates from its average, providing a measure of momentum and trend strength.
**Customizable Parameters
Traders can adjust the period, moving average type, applied price, and shift to suit their trading style and timeframe.
**How It Works
Label1 (Red Line): Represents the normalized price deviation from a user-selected moving average (SMA, EMA, SMMA, or LWMA) divided by the standard deviation over the specified period. This line highlights the relative position of the price compared to its historical range.
Label2 (Green Line, Optional): A moving average of Label1, which smooths the normalized data to reduce noise and provide clearer signals. This can be toggled on or off via the "Draw MA" option.
**Inputs
Period: Length of the lookback period for normalization (default: 100).
MA Method: Type of moving average for normalization (SMA, EMA, SMMA, LWMA; default: EMA).
Applied Price: Price type used for calculation (Close, Open, High, Low, HL2, HLC3, HLCC4; default: Close).
Shift: Shifts the indicator forward or backward (default: 0).
Draw MA: Toggle the display of the Label2 moving average (default: true).
MA Period: Length of the moving average for Label2 (default: 50).
MA Method (Label2): Type of moving average for Label2 (SMA, EMA, SMMA, LWMA; default: SMA).
**How to Use
Divergence Trading: Look for discrepancies between price action and Label1. A bullish divergence (higher low in Label1 vs. lower low in price) may suggest a buying opportunity, while a bearish divergence could indicate a selling opportunity.
Overbought/Oversold Levels: Monitor extreme Label1 values. For instance, values significantly above +2 or below -2 could indicate overextension, though traders should define thresholds based on the asset and timeframe.
Trend Confirmation: Use Label2 to confirm trend direction. A rising Label2 suggests increasing bullish momentum, while a declining Label2 may indicate bearish pressure.
Combine with Other Tools: Pair Gioteen-Norm with support/resistance levels, RSI, or volume indicators for a more robust trading strategy.
**Notes
The indicator is non-overlay, meaning it plots below the price chart in a separate panel.
Avoid using a Period value of 1, as it may lead to unstable results due to insufficient data for standard deviation calculation.
This tool is best used as part of a broader trading system rather than in isolation.
**Why Use Gioteen-Norm?
The Gioteen-Norm indicator offers a fresh take on price normalization, blending statistical analysis with moving average techniques. Its flexibility and clarity make it suitable for traders of all levels—whether you're scalping on short timeframes or analyzing long-term trends. By publishing this for free, I hope to contribute to the TradingView community and help traders uncover hidden opportunities in the markets.
**Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Always backtest and validate any strategy before trading with real capital, and use proper risk management.
Today's Daily LevelsTrack daily price action like a pro with instant visibility of key levels, percentages, and P&L values - all in one clean view.
• Shows Daily Open, High, Low & Median levels
• Dynamic color-coding: green above open, red below
• Real-time price labels with:
Exact price levels
% distance between levels
Point values
Dollar values per contract
• Auto-repaints on timeframe changes
• 30min alerts for median crosses
Pro Scalper AI [BullByte]The Pro Scalper AI is a powerful, multi-faceted scalping indicator designed to assist active traders in identifying short-term trading opportunities with precision. By combining trend analysis, momentum indicators, dynamic weighting, and optional AI forecasting, this tool provides both immediate and latched trading signals based on confirmed (closed bar) data—helping to avoid repainting issues. Its flexible design includes customizable filters such as a higher timeframe trend filter, and adjustable settings for ADX, ATR, and Hull Moving Average (HMA), giving traders the ability to fine-tune the strategy to different markets and timeframes.
Key Features :
- Confirmed Data Processing :
Utilizes a helper function to lock in price and volume data only from confirmed (closed) bars, ensuring the reliability of signals without the risk of intrabar repainting.
- Trend Analysis :
Employs ADX and Directional Movement (DI) calculations along with a locally computed HMA to detect short-term trends. An optional higher timeframe trend filter can further refine the analysis.
- Flexible Momentum Modes :
Choose between three momentum calculation methods—Stochastic RSI, Fisher RSI, or Williams %R—to match your preferred style of analysis. This versatility allows you to optimize the indicator for different market conditions.
- Dynamic Weighting & Volatility Adjustments :
Adjusts the contribution of trend, momentum, volatility, and volume through dynamic weighting. This ensures that the indicator responds appropriately to varying market conditions by scaling its sensitivity with user-defined maximum factors.
- Optional AI Forecast :
For those who want an extra edge, the built-in AI forecasting module uses linear regression to predict future price moves and adjusts oscillator thresholds accordingly. This feature can be toggled on or off, with smoothing options available for more stable output.
- Latching Mode for Signal Persistenc e:
The script features a latching mechanism that holds signals until a clear reversal is detected, preventing whipsaws and providing more reliable trade entries and exits.
- Comprehensive Visualizations & Dashboard :
- Composite Oscillator & Dynamic Thresholds : The oscillator is plotted with dynamic upper and lower thresholds, and the area between them is filled with a color that reflects the active trading signal (e.g., Strong Buy, Early Sell).
- Signal Markers : Both immediate (non-latching) and stored (latched) signals are marked on the chart with distinct shapes (circles, crosses, triangles, and diamonds) to differentiate between signal types.
- Real-Time Dashboard : A customizable dashboard table displays key metrics including ADX, oscillator value, chosen momentum mode, HMA trend, higher timeframe trend, volume factor, AI bias (if enabled), and more, allowing traders to quickly assess market conditions at a glance.
How to Use :
1. S ignal Interpretation :
- Immediate Signals : For traders who prefer quick entries, the indicator displays immediate signals such as “Strong Buy” or “Early Sell” based on the current market snapshot.
- Latched Signals : When latching is enabled, the indicator holds a signal state until a clear reversal is confirmed, offering sustained trade setups.
2. Trend Confirmation :
- Use the HMA trend indicator and the optional higher timeframe trend filter to confirm the prevailing market direction before acting on signals.
3. Dynamic Thresholds & AI Forecasting :
- Monitor the dynamically adjusted oscillator thresholds and, if enabled, the AI bias to gauge potential shifts in market momentum.
4. Risk Management :
- Combine these signals with additional analysis and sound risk management practices to determine optimal entry and exit points for scalping trades.
Disclaimer :
This script is provided for educational and informational purposes only and does not constitute financial advice. Trading involves risk, and past performance is not indicative of future results. Always perform your own analysis and use proper risk management strategies before trading.
Money Flow Oscillator [BullByte]
Overview :
The Money Flow Oscillator is a versatile technical analysis tool designed to provide traders with insights into market momentum through the Money Flow Index (MFI). By integrating trend logic, dynamic support/resistance levels, multi-timeframe analysis, and additional indicators like ADX and Choppiness, this script delivers a detailed view of market conditions and signal strength—all while adhering to TradingView’s publication guidelines.
Key Features :
Money Flow Analysis :
Uses the MFI to assess buying and selling pressure, helping traders gauge market momentum.
Trend Switch Logic :
Employs ATR-based calculations to determine trend direction. The background color adjusts dynamically to signal bullish or bearish conditions, and a prominent center line changes color to reflect the prevailing trend.
Dynamic Support/Resistance :
Calculates oscillator support and resistance over a pivot lookback period. These levels help you identify potential breakouts or reversals as the MFI moves above or below prior levels.
Signal Metrics & Classifications :
Combines MFI values with additional metrics to classify signals into categories such as “Strong Bullish,” “Bullish,” “Bearish,” or “Strong Bearish.” An accompanying note provides details on momentum entry and overall signal strength.
Multi-Timeframe Order Flow Confirmatio n:
Analyzes the MFI on a higher timeframe to confirm order flow. This extra layer of analysis helps verify the short-term signals generated on your primary chart.
Volume and ADX Integration :
Incorporates volume analysis and a manual ADX calculation to further validate signal strength and trend stability. A dashboard displays these metrics for quick reference.
Choppiness Indicator :
Includes a choppiness index to determine if the market is trending or choppy. When the market is identified as choppy, the script advises caution by adjusting the overall signal note.
Comprehensive Dashboard :
A built-in dashboard presents key metrics—including ADX, MFI, order flow, volume score, and support/resistance details—allowing you to quickly assess market conditions at a glance.
How to Use :
Trend Identification : Monitor the dynamic background and center line colors to recognize bullish or bearish market conditions.
Signal Confirmation : Use the oscillator support/resistance levels along with the signal classifications and dashboard data to make informed entry or exit decisions.
Multi-Timeframe Analysis : Validate short-term signals with the higher timeframe MFI order flow confirmation.
Risk Management : Always combine these insights with your own risk management strategy and further analysis.
Disclaimer :
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Always perform your own analysis and use proper risk management before making any trading decisions. Past performance is not indicative of future results.
Cz ASR indicatorAverage session range indicator built by me. Great tool to gauge volatility and intraday reversal zones. Great for FX as there is an included table that shows range in pips; however, this can be applied across all assets as a volatility measure.
How it works:
The script measures the range of sessions, including Asia, London, and New York. The lookback period could be adjusted so you can find what length works best and is most accurate. This is then averaged out to provide the ASR. This provides us with an upper and lower bound of which the price could potentially fluctuate in based on the past session ranges. I have also added the 50% ASR, which is also a super useful metric for reversals or continuations.
There is also a configurable UTC so that you can adjust the indicator so it can accurately measure the range within certain sessions.
Note - different session start and stop times vary from market to market. I have set the code to the standard forex market opens however, if you wish to change the time ,you are able to do so by editing the variables in the script
Enjoy :)
Vertical Line at Specified HoursThis script helps you easily separate time.
This indicator can be used for many different purposes. For example, I use it to separate different days and sessions.
Features :
1- Ability to use 10 vertical lines simultaneously
2- The Possibility to change the color of lines
3- The Possibility to change the line type
Tip : The times you enter in the input section must be in the New York time zone.
Ryna 3 EMA Multi-Timeframe Indicator**EMA Multi-Timeframe Strategy (Pine Script v6)**
This TradingView indicator is designed to assist traders using a **multi-timeframe trend-following strategy** based on Exponential Moving Averages (EMAs).
**Core Functionality**
- **Trend Identification:**
Uses a configurable **EMA (e.g., EMA 50)** on a **higher timeframe** (e.g., H1, D1, W1) to determine the market bias:
- If price is **above** the trend EMA → **Long bias**
- If price is **below** the trend EMA → **Short bias**
- **Entry Signals:**
Uses two EMAs (fast & slow, e.g., EMA 8 & EMA 21) on either:
- The **current chart timeframe**, or
- A **separately selected timeframe** (e.g., entry on M15, trend on H1)
→ Signals are generated based on **EMA crossovers**:
- **Bullish crossover** (fast crosses above slow) → Long signal
- **Bearish crossover** (fast crosses below slow) → Short signal
- Only when aligned with the higher-timeframe trend
- **Visual Output:**
- Optional display of entry EMAs when sourced from the trend timeframe
- Always displays the trend EMA
- Entry signals shown with triangle markers on the chart
- **Info Panel (Top Center):**
- Shows selected timeframes and EMA settings
- Indicates current trend bias (LONG / SHORT / NEUTRAL)
- Notes if entry EMAs are hidden due to settings
- **Alerts:**
- Optional alerts for long and short entry signals based on EMA crossovers
#### **User Inputs**
- **Trend Timeframe & EMA Length**
- **Entry Timeframe & EMA Fast/Slow Lengths**
- **Option to show/hide entry EMAs when using the trend timeframe**
- **Option to show/hide Infobox on Chart**
Customizable RSI/StochRSI Double ConfirmationBelow are the key adjustable parameters in the script and their usage:
RSI Parameters
RSI Length: The number of periods used to calculate the RSI, with a default value of 7. Adjusting this parameter changes the sensitivity of the RSI—shorter periods make it more sensitive, while longer periods make it smoother.
RSI Source: The price source used for RSI calculation, defaulting to the closing price (close). This can be changed to the opening price or other price types as needed.
StochRSI Parameters
StochRSI Length: The number of periods used to calculate the StochRSI, with a default value of 5. This affects how quickly the StochRSI reacts to changes in the RSI.
StochRSI Smooth K: The smoothing period for the StochRSI %K line, with a default value of 3. This is used to reduce noise.
StochRSI Smooth D: The smoothing period for the StochRSI %D line, with a default value of 3. It works in conjunction with %K to provide more stable signals.
Signal Thresholds
RSI Buy Threshold: A buy signal is triggered when the RSI crosses above this value (default 20).
RSI Sell Threshold: A sell signal is triggered when the RSI crosses below this value (default 80).
StochRSI Buy Threshold: A buy signal is triggered when the StochRSI %K crosses above this value (default 20).
StochRSI Sell Threshold: A sell signal is triggered when the StochRSI %K crosses below this value (default 80).
Signals
RSI Buy/Sell Signals: When the RSI crosses the buy/sell threshold, a green "RSI Buy" or red "RSI Sell" is displayed on the chart.
StochRSI Buy/Sell Signals: When the StochRSI %K crosses the buy/sell threshold, a yellow "StochRSI Buy" or purple "StochRSI Sell" is displayed.
Double Buy/Sell Signals: When both RSI and StochRSI simultaneously trigger buy/sell signals, a green "Double Buy" or red "Double Sell" is displayed, indicating a stronger trading opportunity.
The volatility of different cryptocurrencies varies, and different parameters may be suitable for each. Users need to experiment and select the most appropriate parameters themselves.
Disclaimer: This script is for informational purposes only and should not be considered financial advice; use it at your own risk.
Multi-Timeframe MA DashboardThis indicator monitors 5 timeframes: 5min, 15min, 1hr, 4hr, and Daily. It displays fast and slow moving averages for each timeframe, along with the current price. The trend direction is color-coded: green for bullish (fast MA above slow MA) and red for bearish (fast MA below slow MA).
The dashboard also shows the last crossover signal (Buy/Sell) for each timeframe.
Visual arrows are plotted on the chart for the current timeframe. A green up arrow indicates a potential bullish crossover (Buy signal), while a red down arrow indicates a potential bearish crossover (Sell signal).
The dashboard is elegant and professional, with alternating row colors for better readability. It can be placed in any corner of the screen and customized with user-defined colors for bullish and bearish trends.
Alerts are triggered when a crossover occurs on any timeframe. These alerts include the timeframe and signal type (e.g., "5min: ↑ BUY").
How to Read the Indicator
The dashboard displays the following for each timeframe:
Fast MA: The value of the fast moving average.
Slow MA: The value of the slow moving average.
Price: The current price for the timeframe.
Trend: The current trend direction (Bullish or Bearish).
Signal: The last crossover signal (↑ BUY or ↓ SELL).
On the chart, green up arrows indicate a bullish crossover (Fast MA crosses above Slow MA), while red down arrows indicate a bearish crossover (Fast MA crosses below Slow MA).
Green text in the dashboard indicates a bullish trend or signal, while red text indicates a bearish trend or signal.
How to Use the Indicator
Use the dashboard to monitor the trend direction across multiple timeframes. Look for confluence (agreement) between timeframes to identify stronger trends. Observe the "Signal" column in the dashboard for the last crossover on each timeframe. Use the arrows on the chart to identify potential crossover points for the current timeframe.
Enable alerts to be notified of crossover signals on any timeframe. Alerts include the timeframe and signal type for easy reference.
Adjust the fast and slow moving average lengths to suit your trading style. Choose between EMA, SMA, or WMA for the moving average type. Customize the dashboard placement and colors for better visibility.
Important Notes
This indicator is not a buy or sell recommendation. It is a tool to assist traders in their analysis. Always use this indicator in conjunction with other tools, such as support/resistance levels, volume analysis, and price action. Past performance of moving averages does not guarantee future results.
How to Add the Indicator
Add the indicator to your chart from the TradingView library. Configure the inputs:
Fast MA Length: Default is 20.
Slow MA Length: Default is 50.
MA Type: Choose between EMA, SMA, or WMA.
Dashboard Placement: Select the corner of the screen where the dashboard will appear.
Colors: Customize the colors for bullish and bearish trends.
Monitor the dashboard and chart for trends and signals.
Disclaimer
This indicator is for educational and informational purposes only. It does not provide financial, investment, or trading advice. Always perform your own analysis and consult with a financial advisor before making trading decisions.
Sentiment Master Oscillator[BullByte]
The Sentiment Master Oscillator is a modern market sentiment indicator designed for traders seeking to identify early trend shifts and potential reversals with clarity. This oscillator combines multiple technical tools—RSI, MACD, EMAs, ADX, ATR, and volume filters—to deliver layered signals that help you assess market momentum in a clear and simplified manner.
Key Features:
- Multi-Indicator Approach :
Integrates RSI (with a smoothing function), MACD, and two EMAs to gauge momentum and trend direction. The oscillator also includes ADX and ATR filters to ensure that only markets with sufficient directional strength and volatility generate signals.
- Dynamic Signal Zones :
The oscillator produces a raw value ranging roughly from -3 to +3 (adjustable via a scaling factor). Positive readings suggest bullish conditions, while negative readings indicate bearish trends. Visual zones (Early, Confirmed, Strong) are clearly marked with color-coded horizontal lines to help you interpret the strength of the signal at a glance.
- Adaptive Smoothing :
For those who prefer quicker, more responsive signals (ideal for scalping), an adaptive smoothing option is available. When enabled, it applies a shorter smoothing period to the oscillator; otherwise, a more conservative base period is used.
- Reversal Alerts :
Yellow dots are plotted on the chart to highlight potential reversal points. These alerts are triggered when the oscillator crosses specific thresholds, coupled with volume and ATR conditions, signaling that a top or bottom may be forming.
- Customizable Filters :
- ATR Filter :Ensures that the market's volatility is above a set threshold before signaling.
- ADX Filter :Confirms sufficient trend strength.
- Volume Filter : Requires that trading volume surges above a multiple of its simple moving average, filtering out low-volume noise.
- Clear Signal Messaging :
Based on the combined signals from various indicators, the script categorizes market sentiment into actionable messages such as "Early Buy", "Confirmed Buy", "Strong Buy", "Early Sell", "Confirmed Sell", and "Strong Sell". A "Grey Zone" label is used when the oscillator is near neutral, indicating that no clear trend is present.
How to Use :
1. Entry and Exit Decisions : Use the different signal stages (Early, Confirmed, Strong) as guides for your entries and exits.
2. Trend Confirmation : Rely on the multi-indicator setup for added confirmation of prevailing market conditions before executing trades.
3. Reversal Cues : Pay attention to the reversal dots for potential turning points in the market, which can be used to adjust positions or initiate trades.
Disclaimer:
This indicator is intended for educational and informational purposes only. It should not be taken as financial advice. Always use appropriate risk management and combine it with your analysis before making any trading decisions. Past performance is not indicative of future results.
By adhering to TradingView's publishing guidelines, the BullByte Sentiment Master is designed to provide transparency, simplicity, and robust analysis tools to enhance your trading strategy. Enjoy a clearer view of market sentiment and make more informed trading decisions!
Trendline Breakout Navigator [LuxAlgo]The Trendline Breakout Navigator indicator shows three trendlines, representing trends of different significance between Swing Points.
Dots highlight a Higher Low (HL) or Lower High (LH) that pierces through the Trendline without the closing price breaking the Trendline.
A bar color and background color option is included, which offers insights into the price against the trendlines.
🔶 USAGE
Trendlines (TL) are drawn, starting as a horizontal line from a Swing Point.
When an HL (in the case of a bullish TL) or an LH (bearish TL) is found, this Swing Point is connected to the first Swing Point. In both cases, the TL can be optimized when one or more historical close prices breach the TL (see DETAILS).
A solid-styled long-term trendline represents the overall market direction, while a dashed-styled medium-term trendline captures medium-term movements within the long-term trend. Finally, a dotted-styled short-term trendline tracks short-term fluctuations.
🔹 Swing Points vs. Trend
A "Higher High" (HH) or "Lower Low" (LL) will initialize a new trendline, respectively, starting from the previous "Swing Low" or Swing High".
To spot the trend shift, "HH/LL" labels and an optional background color are included. They can be enabled/disabled or set at "Long, Medium, or Short" term TL (Settings—"MS", "HH/LL" and "Background Color").
These features are linked to one Trendline of choice only.
Where the "HH/LL" labels can show a potential trend shift, the background color is:
Green from the moment the close price breaks above a bearish trendline or when an HH occurs
Red from the moment the close price breaks below a bullish trendline or when an LL occurs
🔹 Bar Color
The bar color will depend on the location of the closing price against the three trendlines. When a trendline is unavailable (for example, if the close price breaks the TL and there is no HH/LL), the last known trendline value will be considered.
All three trendlines influence the bar color.
If the close price is above the "Long Term" TL, the bar color will show a gradient of green, darker when the close price is below the "Medium Term" and/or "Short Term" TLs.
On the other hand, when the close price is below the "Long Term" TL, the bar color will show a gradient of red, which becomes darker when the close price is above the "Medium Term" and/or "Short Term" TLs.
To keep the above example simple, only the "Long Term" TL is considered. The white line (not included in the script) resembles the actual value of the TL at each bar, where you can see the effect on the bar color.
Combined with the trendlines and dots, the bar color can provide extra depth and insights into the underlying trends.
🔹 Tested Trendlines
If a new HL/LH pierces the Trendline without the close price breaking the Trendline, the Trendline will be updated.
The exact location where the price exceeded the Trendline is visualized by a dot, colored blue on a bullish trendline and orange when bearish.
These dots can be indicative of a potential trend continuation or reversal.
🔹 Higher TimeFrame Option
The "Period" setting enables users to visualize higher-timeframe trendlines as long as the line length doesn't exceed 5000 bars.
🔶 DETAILS
When a new trendline is drawn, the script first draws a preliminary line and then checks whether a historical close price exceeded this line above (in the case of a bearish TL) or below (in a bullish case).
Subsequently, the most valid point in between is chosen as the starting point of the Trendline.
🔶 SETTINGS
Period: Choose "chart" for trendlines from the current chart timeframe, or choose a higher timeframe
🔹 Swing Length
Toggle and Swing Length for three trendlines: Period used for the swing detection, with higher values returning longer-term Swing Levels.
🔹 Style
Trendline: color for bullish/bearish Trendline
Wick Dot: color for bullish/bearish trendline test
Term: Long-, medium- or short-term
HH/LL: Show HH/LL labels (with or without previous Swing High/Low) of chosen Term
Background Color: Green when the closing price is above the trendline of choice, red otherwise
Bar Color
Uptrick: Z-Score FlowOverview
Uptrick: Z-Score Flow is a technical indicator that integrates trend-sensitive momentum analysi s with mean-reversion logic derived from Z-Score calculations. Its primary objective is to identify market conditions where price has either stretched too far from its mean (overbought or oversold) or sits at a statistically “normal” range, and then cross-reference this observation with trend direction and RSI-based momentum signals. The result is a more contextual approach to trade entry and exit, emphasizing precision, clarity, and adaptability across varying market regimes.
Introduction
Financial instruments frequently transition between trending modes, where price extends strongly in one direction, and ranging modes, where price oscillates around a central value. A simple statistical measure like Z-Score can highlight price extremes by comparing the current price against its historical mean and standard deviation. However, such extremes alone can be misleading if the broader market structure is trending forcefully. Uptrick: Z-Score Flow aims to solve this gap by combining Z-Score with an exponential moving average (EMA) trend filter and a smoothed RSI momentum check, thus filtering out signals that contradict the prevailing market environment.
Purpose
The purpose of this script is to help traders pinpoint both mean-reversion opportunities and trend-based pullbacks in a way that is statistically grounded yet still mindful of overarching price action. By pairing Z-Score thresholds with supportive conditions, the script reduces the likelihood of acting on random price spikes or dips and instead focuses on movements that are significant within both historical and current contextual frameworks.
Originality and Uniquness
Layered Signal Verification: Signals require the fulfillment of multiple layers (Z-Score extreme, EMA trend bias, and RSI momentum posture) rather than merely breaching a statistical threshold.
RSI Zone Lockout: Once RSI enters an overbought/oversold zone and triggers a signal, the script locks out subsequent signals until RSI recovers above or below those zones, limiting back-to-back triggers.
Controlled Cooldown: A dedicated cooldown mechanic ensures that the script waits a specified number of bars before issuing a new signal in the opposite direction.
Gradient-Based Visualization: Distinct gradient fills between price and the Z-Mean line enhance readability, showing at a glance whether price is trading above or below its statistical average.
Comprehensive Metrics Panel: An optional on-chart table summarizes the Z-Score’s key metrics, streamlining the process of verifying current statistical extremes, mean levels, and momentum directions.
Why these indicators were merged
Z-Score measurements excel at identifying when price deviates from its mean, but they do not intrinsically reveal whether the market’s trajectory supports a reversion or if price might continue along its trend. The EMA, commonly used for spotting trend directions, offers valuable insight into whether price is predominantly ascending or descending. However, relying solely on a trend filter overlooks the intensity of price moves. RSI then adds a dedicated measure of momentum, helping confirm if the market’s energy aligns with a potential reversal (for example, price is statistically low but RSI suggests looming upward momentum). By uniting these three lenses—Z-Score for statistical context, EMA for trend direction, and RSI for momentum force—the script offers a more comprehensive and adaptable system, aiming to avoid false positives caused by focusing on just one aspect of price behavior.
Calculations
The core calculation begins with a simple moving average (SMA) of price over zLen bars, referred to as the basis. Next, the script computes the standard deviation of price over the same window. Dividing the difference between the current price and the basis by this standard deviation produces the Z-Score, indicating how many standard deviations the price is from its mean. A positive Z-Score reveals price is above its average; a negative reading indicates the opposite.
To detect overall market direction, the script calculates an exponential moving average (emaTrend) over emaTrendLen bars. If price is above this EMA, the script deems the market bullish; if below, it’s considered bearish. For momentum confirmation, the script computes a standard RSI over rsiLen bars, then applies a smoothing EMA over rsiEmaLen bars. This smoothed RSI (rsiEma) is monitored for both its absolute level (oversold or overbought) and its slope (the difference between the current and previous value). Finally, slopeIndex determines how many bars back the script compares the basis to check whether the Z-Mean line is generally rising, falling, or flat, which then informs the coloring scheme on the chart.
Calculations and Rational
Simple Moving Average for Baseline: An SMA is used for the core mean because it places equal weight on each bar in the lookback period. This helps maintain a straightforward interpretation of overbought or oversold conditions in the context of a uniform historical average.
Standard Deviation for Volatility: Standard deviation measures the variability of the data around the mean. By dividing price’s difference from the mean by this value, the Z-Score can highlight whether price is unusually stretched given typical volatility.
Exponential Moving Average for Trend: Unlike an SMA, an EMA places more emphasis on recent data, reacting quicker to new price developments. This quicker response helps the script promptly identify trend shifts, which can be crucial for filtering out signals that go against a strong directional move.
RSI for Momentum Confirmation: RSI is an oscillator that gauges price movement strength by comparing average gains to average losses over a set period. By further smoothing this RSI with another EMA, short-lived oscillations become less influential, making signals more robust.
SlopeIndex for Slope-Based Coloring: To clarify whether the market’s central tendency is rising or falling, the script compares the basis now to its level slopeIndex bars ago. A higher current reading indicates an upward slope; a lower reading, a downward slope; and similar readings, a flat slope. This is visually represented on the chart, providing an immediate sense of the directionality.
Inputs
zLen (Z-Score Period)
Specifies how many bars to include for computing the SMA and standard deviation that form the basis of the Z-Score calculation. Larger values produce smoother but slower signals; smaller values catch quick changes but may generate noise.
emaTrendLen (EMA Trend Filter)
Sets the length of the EMA used to detect the market’s primary direction. This is pivotal for distinguishing whether signals should be considered (price aligning with an uptrend or downtrend) or filtered out.
rsiLen (RSI Length)
Defines the window for the initial RSI calculation. This RSI, when combined with the subsequent smoothing EMA, forms the foundation for momentum-based signal confirmations.
rsiEmaLen (EMA of RSI Period)
Applies an exponential moving average over the RSI readings for additional smoothing. This step helps mitigate rapid RSI fluctuations that might otherwise produce whipsaw signals.
zBuyLevel (Z-Score Buy Threshold)
Determines how negative the Z-Score must be for the script to consider a potential oversold signal. If the Z-Score dives below this threshold (and other criteria are met), a buy signal is generated.
zSellLevel (Z-Score Sell Threshold)
Determines how positive the Z-Score must be for a potential overbought signal. If the Z-Score surpasses this threshold (and other checks are satisfied), a sell signal is generated.
cooldownBars (Cooldown (Bars))
Enforces a bar-based delay between opposite signals. Once a buy signal has fired, the script must wait the specified number of bars before registering a new sell signal, and vice versa.
slopeIndex (Slope Sensitivity (Bars))
Specifies how many bars back the script compares the current basis for slope coloration. A bigger slopeIndex highlights larger directional trends, while a smaller number emphasizes shorter-term shifts.
showMeanLine (Show Z-Score Mean Line)
Enables or disables the plotting of the Z-Mean and its slope-based coloring. Traders who prefer minimal chart clutter may turn this off while still retaining signals.
Features
Statistical Core (Z-Score Detection):
This feature computes the Z-Score by taking the difference between the current price and the basis (SMA) and dividing by the standard deviation. In effect, it translates price fluctuations into a standardized measure that reveals how significant a move is relative to the typical variation seen over the lookback. When the Z-Score crosses predefined thresholds (zBuyLevel for oversold and zSellLevel for overbought), it signals that price could be at an extreme.
How It Works: On each bar, the script updates the SMA and standard deviation. The Z-Score is then refreshed accordingly. Traders can interpret particularly large negative or positive Z-Score values as scenarios where price is abnormally low or high.
EMA Trend Filter:
An EMA over emaTrendLen bars is used to classify the market as bullish if the price is above it and bearish if the price is below it. This classification is applied to the Z-Score signals, accepting them only when they align with the broader price direction.
How It Works: If the script detects a Z-Score below zBuyLevel, it further checks if price is actually in a downtrend (below EMA) before issuing a buy signal. This might seem counterintuitive, but a “downtrend” environment plus an oversold reading often signals a potential bounce or a mean-reversion play. Conversely, for sell signals, the script checks if the market is in an uptrend first. If it is, an overbought reading aligns with potential profit-taking.
RSI Momentum Confirmation with Oversold/Overbought Lockout:
RSI is calculated over rsiLen, then smoothed by an EMA over rsiEmaLen. If this smoothed RSI dips below a certain threshold (for example, 30) and then begins to slope upward, the indicator treats it as a potential sign of recovering momentum. Similarly, if RSI climbs above a certain threshold (for instance, 70) and starts to slope downward, that suggests dwindling momentum. Additionally, once RSI is in these zones, the indicator locks out repetitive signals until RSI fully exits and re-enters those extreme territories.
How It Works: Each bar, the script measures whether RSI has dropped below the oversold threshold (like 30) and has a positive slope. If it does, the buy side is considered “unlocked.” For sell signals, RSI must exceed an overbought threshold (70) and slope downward. The combination of threshold and slope helps confirm that a reversal is genuinely in progress instead of issuing signals while momentum remains weak or stuck in extremes.
Cooldown Mechanism:
The script features a custom bar-based cooldown that prevents issuing new signals in the opposite direction immediately after one is triggered. This helps avoid whipsaw situations where the market quickly flips from oversold to overbought or vice versa.
How It Works: When a buy signal fires, the indicator notes the bar index. If the Z-Score and RSI conditions later suggest a sell, the script compares the current bar index to the last buy signal’s bar index. If the difference is within cooldownBars, the signal is disallowed. This ensures a predefined “quiet period” before switching signals.
Slope-Based Coloring (Z-Mean Line and Shadow):
The script compares the current basis value to its value slopeIndex bars ago. A higher reading now indicates a generally upward slope, while a lower reading indicates a downward slope. The script then shades the Z-Mean line in a corresponding bullish or bearish color, or remains neutral if little change is detected.
How It Works: This slope calculation is refreshingly straightforward: basis – basis . If the result is positive, the line is colored bullish; if negative, it is colored bearish; if approximately zero, it remains neutral. This provides a quick visual cue of the medium-term directional bias.
Gradient Overlays:
With gradient fills, the script highlights where price stands in relation to the Z-Mean. When price is above the basis, a purple-shaded region is painted, visually indicating a “bearish zone” for potential overbought conditions. When price is below, a teal-like overlay is used, suggesting a “bullish zone” for potential oversold conditions.
How It Works: Each bar, the script checks if price is above or below the basis. It then applies a fill between close and basis, using distinct colors to show whether the market is trading above or below its mean. This creates an immediate sense of how extended the market might be.
Buy and Sell Labels (with Alerts):
When a legitimate buy or sell condition passes every check (Z-Score threshold, EMA trend alignment, RSI gating, and cooldown clearance), the script plots a corresponding label directly on the chart. It also fires an alert (if alerts are set up), making it convenient for traders who want timely notifications.
How It Works: If rawBuy or rawSell conditions are met (refined by RSI, EMA trend, and cooldown constraints), the script calls the respective plot function to paint an arrow label on the chart. Alerts are triggered simultaneously, carrying easily recognizable messages.
Metrics Table:
The optional on-chart table (activated by showMetrics) presents real-time Z-Score data, including the current Z-Score, its rolling mean, the maximum and minimum Z-Score values observed over the last zLen bars, a percentile position, and a short-term directional note (rising, falling, or flat).
Current – The present Z-Score reading
Mean – Average Z-Score over the zLen period
Min/Max – Lowest and highest Z-Score values within zLen
Position – Where the current Z-Score sits between the min and max (as a percentile)
Trend – Whether the Z-Score is increasing, decreasing, or flat
Conclusion
Uptrick: Z-Score Flow offers a versatile solution for traders who need a statistically informed perspective on price extremes combined with practical checks for overall trend and momentum. By leveraging a well-defined combination of Z-Score, EMA trend classification, RSI-based momentum gating, slope-based visualization, and a cooldown mechanic, the script reduces the occurrence of false or premature signals. Its gradient fills and optional metrics table contribute further clarity, ensuring that users can quickly assess market posture and make more confident trading decisions in real time.
Disclaimer
This script is intended solely for informational and educational purposes. Trading in any financial market comes with substantial risk, and there is no guarantee of success or the avoidance of loss. Historical performance does not ensure future results. Always conduct thorough research and consider professional guidance prior to making any investment or trading decisions.
EMA Shakeout DetectorEMA Shakeout & Reclaim Zones
Description:
This Pine Script helps traders quickly identify potential shakeout entries based on price action and volume dynamics. Shakeouts often signal strong accumulation, where institutions drive the stock below a key moving average before reclaiming it, creating an opportunity for traders to enter at favorable prices.
How It Works:
1. Volume Surge Filtering:
a. Computes the 51-day Simple Moving Average (SMA) of volume.
b. Identifies days where volume surged 2x above the 51-day average.
c. Filters stocks that had at least two such high-volume days in the last 21 trading days (configurable).
2. Stock Selection Criteria:
a. The stock must be within 25% of its 52-week high.
b. It should have rallied at least 30% from its 52-week low.
Shakeout Conditions:
1. The stock must be trading above the 51-day EMA before the shakeout.
2. A sudden price drop of more than 10% occurs, pushing the stock below the 51-day EMA.
3. A key index (e.g., Nifty 50, S&P 500) must be trading above its 10-day EMA, ensuring overall market strength.
Visualization:
Shakeout zones are highlighted in blue, making it easier to spot potential accumulation areas and study price & volume action in more detail.
This script is ideal for traders looking to identify institutional shakeouts and gain an edge by recognizing high-probability reversal setups.
Advanced HFT Detection with VWAP & SpreadsExplanation of the HFT Detection Strategy
🔹 1. Key Indicators Used in the Strategy
It's works by combining VWAP, moving averages (SMA), volume spikes, and price jumps to detect potential HFT activity.
✅ (A) VWAP (Volume Weighted Average Price)
VWAP acts as a benchmark price that professional traders and institutions use to execute large orders.
If price is above VWAP, buyers are in control → Bullish trend
If price is below VWAP, sellers are in control → Bearish trend
HFT algorithms often place buy orders above VWAP and sell orders below VWAP to follow momentum.
➡️ Why VWAP? It ensures that signals follow the institutional trading trend.
✅ (B) Moving Averages (SMA)
Moving averages smooth out price data and help in detecting short-term momentum changes.
Fast Moving Average (5-period SMA): Reacts quickly to price changes
Slow Moving Average (20-period SMA): Identifies trend direction
➡️ Why SMA? It filters noise and confirms short-term trend shifts.
✅ (C) Volume Spike Detection
High-frequency trading is often accompanied by large volume surges. We define a volume spike as:
📌 Current Volume > 2× Average Volume of last 20 bars
➡️ Why Volume? HFTs execute rapid buy/sell orders when they detect liquidity, leading to sudden volume bursts.
✅ (D) Price Jump Detection (Sudden Volatility)
HFT algorithms often exploit quick price movements. We check if the price has moved more than twice the ATR (Average True Range) in the last 5 bars.
➡️ Why ATR? It helps to detect abnormal price movements compared to normal volatility.
🔹 2. Trading Signal Logic
Now that we have VWAP, moving averages, volume, and price movement filters, we generate buy and sell signals based on conditions.
✅ (A) Buy Signal Condition
A BUY signal is triggered when:
✔ Fast SMA crosses above Slow SMA → Short-term trend is turning bullish
✔ Volume spike occurs → HFTs are active
✔ Sudden price jump detected → High volatility
✔ Price is above VWAP → Confirms bullish trend
➡️ Why this works? It confirms that institutional traders & HFTs are buying aggressively.
✅ (B) Sell Signal Condition
A SELL signal is triggered when:
✔ Fast SMA crosses below Slow SMA → Short-term trend is turning bearish
✔ Volume spike occurs → HFTs are selling aggressively
✔ Sudden price drop detected → High volatility
✔ Price is below VWAP → Confirms bearish trend
➡️ Why this works? It confirms that institutional traders & HFTs are selling aggressively.
🔹 3. Visual Representation (Plotting Signals & VWAP)
Once we detect buy and sell signals, we mark them on the chart.
✅ (A) Buy/Sell Markers
🟢 Buy → Green upward arrow below the candle
🔴 Sell → Red downward arrow above the candle
✅ (B) VWAP Line on Chart
We also plot VWAP as a blue line to visualize trend direction.
✅ (C) Highlighting Volume Spikes
To easily spot HFT activity, we highlight volume spike bars with a blue background.
🔹 4. How to Use This Strategy?
1️⃣ Apply this script on a 1-minute or 5-minute intraday chart.
2️⃣ Look for BUY signals above VWAP and SELL signals below VWAP.
3️⃣ Verify that the volume spikes before taking action.
4️⃣ Use stop-loss & risk management (e.g., stop-loss at recent low/high).
🚀 Summary: Why This Strategy Works?
✅ VWAP ensures we follow institutional traders
✅ Volume spikes confirm sudden liquidity inflows
✅ Price jumps detect fast market moves caused by HFT bots
✅ Moving averages smooth out short-term trend shifts