Stochastic Order Flow Momentum [ScorsoneEnterprises]This indicator implements a stochastic model of order flow using the Ornstein-Uhlenbeck (OU) process, combined with a Kalman filter to smooth momentum signals. It is designed to capture the dynamic momentum of volume delta, representing the net buying or selling pressure per bar, and highlight potential shifts in market direction. The volume delta data is sourced from TradingView’s built-in functionality:
www.tradingview.com
For a deeper dive into stochastic processes like the Ornstein-Uhlenbeck model in financial contexts, see these research articles: arxiv.org and arxiv.org
The SOFM tool aims to reveal the momentum and acceleration of order flow, modeled as a mean-reverting stochastic process. In markets, order flow often oscillates around a baseline, with bursts of buying or selling pressure that eventually fade—similar to how physical systems return to equilibrium. The OU process captures this behavior, while the Kalman filter refines the signal by filtering noise. Parameters theta (mean reversion rate), mu (mean level), and sigma (volatility) are estimated by minimizing a squared-error objective function using gradient descent, ensuring adaptability to real-time market conditions.
How It Works
The script combines a stochastic model with signal processing. Here’s a breakdown of the key components, including the OU equation and supporting functions.
// Ornstein-Uhlenbeck model for volume delta
ou_model(params, v_t, lkb) =>
theta = clamp(array.get(params, 0), 0.01, 1.0)
mu = clamp(array.get(params, 1), -100.0, 100.0)
sigma = clamp(array.get(params, 2), 0.01, 100.0)
error = 0.0
v_pred = array.new(lkb, 0.0)
array.set(v_pred, 0, array.get(v_t, 0))
for i = 1 to lkb - 1
v_prev = array.get(v_pred, i - 1)
v_curr = array.get(v_t, i)
// Discretized OU: v_t = v_{t-1} + theta * (mu - v_{t-1}) + sigma * noise
v_next = v_prev + theta * (mu - v_prev)
array.set(v_pred, i, v_next)
v_curr_clean = na(v_curr) ? 0 : v_curr
v_pred_clean = na(v_next) ? 0 : v_next
error := error + math.pow(v_curr_clean - v_pred_clean, 2)
error
The ou_model function implements a discretized Ornstein-Uhlenbeck process:
v_t = v_{t-1} + theta (mu - v_{t-1})
The model predicts volume delta (v_t) based on its previous value, adjusted by the mean-reverting term theta (mu - v_{t-1}), with sigma representing the volatility of random shocks (approximated in the Kalman filter).
Parameters Explained
The parameters theta, mu, and sigma represent distinct aspects of order flow dynamics:
Theta:
Definition: The mean reversion rate, controlling how quickly volume delta returns to its mean (mu). Constrained between 0.01 and 1.0 (e.g., clamp(array.get(params, 0), 0.01, 1.0)).
Interpretation: A higher theta indicates faster reversion (short-lived momentum), while a lower theta suggests persistent trends. Initial value is 0.1 in init_params.
In the Code: In ou_model, theta scales the pull toward \mu, influencing the predicted v_t.
Mu:
Definition: The long-term mean of volume delta, representing the equilibrium level of net buying/selling pressure. Constrained between -100.0 and 100.0 (e.g., clamp(array.get(params, 1), -100.0, 100.0)).
Interpretation: A positive mu suggests a bullish bias, while a negative mu indicates bearish pressure. Initial value is 0.0 in init_params.
In the Code: In ou_model, mu is the target level that v_t reverts to over time.
Sigma:
Definition: The volatility of volume delta, capturing the magnitude of random fluctuations. Constrained between 0.01 and 100.0 (e.g., clamp(array.get(params, 2), 0.01, 100.0)).
Interpretation: A higher sigma reflects choppier, noisier order flow, while a lower sigma indicates smoother behavior. Initial value is 0.1 in init_params.
In the Code: In the Kalman filter, sigma contributes to the error term, adjusting the smoothing process.
Summary:
theta: Speed of mean reversion (how fast momentum fades).
mu: Baseline order flow level (bullish or bearish bias).
sigma: Noise level (variability in order flow).
Other Parts of the Script
Clamp
A utility function to constrain parameters, preventing extreme values that could destabilize the model.
ObjectiveFunc
Defines the objective function (sum of squared errors) to minimize during parameter optimization. It compares the OU model’s predicted volume delta to observed data, returning a float to be minimized.
How It Works: Calls ou_model to generate predictions, computes the squared error for each timestep, and sums it. Used in optimization to assess parameter fit.
FiniteDifferenceGradient
Calculates the gradient of the objective function using finite differences. Think of it as finding the "slope" of the error surface for each parameter. It nudges each parameter (theta, mu, sigma) by a small amount (epsilon) and measures the change in error, returning an array of gradients.
Minimize
Performs gradient descent to optimize parameters. It iteratively adjusts theta, mu, and sigma by stepping down the "hill" of the error surface, using the gradients from FiniteDifferenceGradient. Stops when the gradient norm falls below a tolerance (0.001) or after 20 iterations.
Kalman Filter
Smooths the OU-modeled volume delta to extract momentum. It uses the optimized theta, mu, and sigma to predict the next state, then corrects it with observed data via the Kalman gain. The result is a cleaner momentum signal.
Applied
After initializing parameters (theta = 0.1, mu = 0.0, sigma = 0.1), the script optimizes them using volume delta data over the lookback period. The optimized parameters feed into the Kalman filter, producing a smoothed momentum array. The average momentum and its rate of change (acceleration) are calculated, though only momentum is plotted by default.
A rising momentum suggests increasing buying or selling pressure, while a flattening or reversing momentum indicates fading activity. Acceleration (not plotted here) could highlight rapid shifts.
Tool Examples
The SOFM indicator provides a dynamic view of order flow momentum, useful for spotting directional shifts or consolidation.
Low Time Frame Example: On a 5-minute chart of SEED_ALEXDRAYM_SHORTINTEREST2:NQ , a rising momentum above zero with a lookback of 5 might signal building buying pressure, while a drop below zero suggests selling dominance. Crossings of the zero line can mark transitions, though the focus is on trend strength rather than frequent crossovers.
High Time Frame Example: On a daily chart of NYSE:VST , a sustained positive momentum could confirm a bullish trend, while a sharp decline might warn of exhaustion. The mean-reverting nature of the OU process helps filter out noise on longer scales. It doesn’t make the most sense to use this on a high timeframe with what our data is.
Choppy Markets: When momentum oscillates near zero, it signals indecision or low conviction, helping traders avoid whipsaws. Larger deviations from zero suggest stronger directional moves to act on, this is on $STT.
Inputs
Lookback: Users can set the lookback period (default 5) to adjust the sensitivity of the OU model and Kalman filter. Shorter lookbacks react faster but may be noisier; longer lookbacks smooth more but lag slightly.
The user can also specify the timeframe they want the volume delta from. There is a default way to lower and expand the time frame based on the one we are looking at, but users have the flexibility.
No indicator is 100% accurate, and SOFM is no exception. It’s an estimation tool, blending stochastic modeling with signal processing to provide a leading view of order flow momentum. Use it alongside price action, support/resistance, and your own discretion for best results. I encourage comments and constructive criticism.
Candlestick analysis
Trend Confirmation StrategyComprehensive Trend Confirmation System
Indicator Features (Professional Description):
Comprehensive Trend Confirmation System is a versatile indicator meticulously designed to identify and confirm trend-based trading opportunities with exceptional efficiency. By seamlessly integrating analysis from a suite of leading technical tools, it aims to provide superior accuracy and reliability for informed trading decisions.
Key Features:
Intelligent Trend Identification: A robust trend analysis system that considers:
Adjustable Moving Averages: Utilizes three customizable moving average periods (fast, medium, slow) with user-selectable lengths and types (SMA, EMA, WMA, VWMA) to accurately determine the prevailing trend across different timeframes.
In-depth Price Action Analysis: Examines the formation of Higher Highs/Higher Lows (uptrend) and Lower Highs/Lower Lows (downtrend) to validate price direction.
Average Directional Index (ADX) with Adjustable Threshold: Measures the strength of a trend and employs the comparison between +DI and -DI to pinpoint the dominant momentum, featuring a customizable threshold to filter out weak signals.
Multi-Factor Signal Confirmation System: Enhances the reliability of trading signals through verification from four distinct confirmation tools:
Volume Analysis with Average Reference: Assesses whether trading volume supports price movements by comparing it to historical averages.
Relative Strength Index (RSI) with Reference Levels: Measures price momentum and identifies overbought/oversold conditions to confirm trend strength.
Moving Average Convergence Divergence (MACD) Divergence and Crossovers: Detects shifts in momentum and potential trend changes through the relationship between the MACD line and the Signal line.
Stochastic Oscillator with Reference Levels: Measures the current price's position relative to its historical range to evaluate overbought/oversold conditions and potential reversal opportunities.
Intelligent Signal Generation Logic:
Buy Signal: Triggered when a strong uptrend is identified (meeting defined criteria) and confirmed by at least three out of the four confirmation tools.
Sell Signal: Triggered when a strong downtrend is identified (meeting defined criteria) and confirmed by at least three out of the four confirmation tools.
User-Friendly Visualizations:
Moving Averages (MA): Displays three MA lines on the chart with user-configurable colors (default: fast-blue, medium-orange, slow-red) for easy visual trend analysis.
Clear Buy and Sell Signal Symbols: Presents distinct green upward-pointing triangles for buy signals and red downward-pointing triangles for sell signals at the corresponding candlestick.
Dynamic Candlestick Color Coding: Candlesticks are dynamically colored green upon a buy signal and red upon a sell signal for quick identification of trading opportunities.
Highly Customizable Parameters: Users have extensive control over the indicator's parameters, including:
Lengths and types of Moving Averages.
Length and Threshold of the ADX.
Length of the RSI.
Parameters for the MACD (Fast Length, Slow Length, Signal Length).
Parameters for the Stochastic Oscillator (%K Length, %D Length, Smoothing).
Ideal For:
Traders seeking a robust tool to accurately identify and confirm market trends.
Individuals aiming to reduce false signals and enhance the precision of their trading decisions.
Traders employing trend-following strategies in markets with clear directional movement.
Important Note:
While Comprehensive Trend Confirmation System is engineered to improve trading accuracy, no indicator can guarantee 100% profitable trades. Users are advised to utilize this indicator in conjunction with relevant fundamental analysis and sound risk management practices for optimal trading outcomes.
Pump & Dump Detector (sensitive)📊 Pump & Dump Detector — Volatility & Volume-Based Impulse Scanner
Description:
This indicator is designed to detect early and confirmed signs of high-impact market movements, such as pumps (sharp price increases) and dumps (sharp price drops). It intelligently combines multiple market signals to provide timely alerts of potential momentum spikes.
🔧 Components & Logic:
1. Price Change (%):
Compares the current closing price to the previous one. This is used as the main trigger for confirmed pump or dump detection.
2. Volume Spike:
Detects abnormal activity by comparing the current volume to the moving average over a user-defined period. If the current volume exceeds the average by a specified multiplier (default: 1.8x), a spike is detected.
3. Volatility Spike (High - Low):
Measures bar expansion. A sudden increase in bar range often indicates breakout conditions or liquidation events.
4. NATR (Normalized ATR):
Normalized Average True Range is calculated as (ATR / Close) * 100, making volatility comparable across all timeframes and instruments.
5. Min Volume Filter:
Filters out signals from low-liquidity coins to reduce false alerts and market noise.
🧠 Why It’s Useful:
This is not a mashup of random indicators, but a thoughtfully engineered system where each filter strengthens the signal validity.
It allows you to spot explosive moves before they fully unfold, making it ideal for:
Intraday scalping
Altcoin watchlists
Flash crash detection
Early reversal or breakout trades
🖥 How to Use:
Add the indicator to any crypto chart.
Enable alerts for:
🚨 Early Pump
💥 Confirmed Pump
🔻 Early Dump
🔥 Confirmed Dump
React to confirmed signals using your preferred strategy — breakout, fade, or continuation.
Use in combination with key levels, orderbook data, or trend filters for best results.
📌 Example Use Case:
On a 5-minute chart of a low-cap altcoin, the indicator may issue an early signal when:
Price increases by more than 2.5%
Volume is 2x the average
Bar range is significantly larger than the recent average
NATR is above its smoothed average × 1.2
🛡 Originality & Purpose:
This script was not built to simply combine popular indicators, but to serve a very specific use-case — detecting early-stage pumps and dumps.
By blending classic tools (like volume, ATR) with contextual filters, it becomes a true pattern-based predictive signal, not a repackaged overlay.
💬 Have ideas or suggestions? Leave a comment below — I’m always open to collaboration!
Accumulation-Distribution CandlesThis structural visualization tool maps each candle through the lens of Effort vs. Result, blending Volume, Range, and closing bias into a normalized pressure score. Candle bodies are dynamically color-coded using a five-tier system—from heavy accumulation to heavy distribution—revealing where energy is building, dispersing, or neutral. This helps to visually isolate Markup, Markdown, Re-accumulation, and Distribution at a glance.
The indicator calculates a strength score by multiplying price result (close minus open) by effort (volume or price range), smoothing this raw value using a Fibonacci-based EMA. (34 for standard, 55 for crypto; the higher crypto value acknowledges that 24/7 trading offers more hours per week or month than trad markets.) The result is standardized against its rolling deviation and clamped to a range. This score determines the visual tier:
• 💙 Dark Blue = heavy Accumulation (strong upward result on strong effort)
• 🩵 Pale Blue = mild Accumulation
• 🌚 Gray = neutral (low conviction or balance)
• 💛 Pale Yellow = mild Distribution
• 🧡 Deep Yellow = heavy Distribution (strong downward result on strong effort)
The tool is optimized for the 1D chart, where Wyckoff phases are most clearly expressed. However, it adapts well to lower timeframes when used selectively. Traders may hide the body coloring and enable only zone highlighting to preserve other candle overlays such as SUPeR TReND 2.718, which offers directional clarity and trend duration. This combination is especially useful on intraday charts (15m–1H) where microstructure matters but visual clutter must be avoided.
When used alongside other Volume overlays (such as the OBVX Conviction Bias) or Volatility indicators (such as the Asymmetric Turbulence Ribbon (ATR)), this indicator adds confluence to directional setups by contextualizing pressure with Volatility. For example: compression zones marked by ATR may align with persistent pale blue candles—indicating quiet Accumulation before expansion.
Optional Overlays:
Normally ON -
• 📌 Pin Bars , filtered by volume, to isolate wick-dominant reversals from key zones
• 💪🏻 Strong-Body Candles — fuchsia candles w/ high body-to-range ratio reflect conviction
• 🧯 Wick Absorption Candles — red candles w/ long wicks and low closing strength indicate failed pushes or absorbed breakouts
• 🟦/🟧 Zone Highlighting for candles above a defined Accumulation/Distribution threshold
Normally OFF -
• 🔺 Fractals (5-bar) to map swing pivots by underlying pressure tier (normally OFF)
• 🟥/🟩 Engulfing patterns, filtered by directional conviction (normally OFF)
The Pin Bar strategy benefits most from the zone logic—when a bullish pin bar appears in an Accumulation zone (esp. pale or dark blue), and Volume exceeds its rolling average, it may mark a spring or failed breakdown. Conversely, bearish pins in Distribution zones can mark rejection or resistance.
This is not a signal engine—it’s a narrative filter designed to slot cleanly into a multi-layered workflow of visual structure and informed execution. Use it to identify bias and phase. Then deploy trade triggers from tools like SUPeR TReND 2.718, or the liquidity flows shown the The Silver Lining or the AltSeasonality - MTF indicators, for example. The candle colors tell you who’s in control—the other tools tell you when to act.
Giant Candles DetectorThis script identifies abnormally large candles — also known as "giant candles" — based on a customizable size threshold relative to the average candle size over a user-defined period.
Key Features:
Automatically detects candles that are significantly larger than average.
Differentiates between bullish (green) and bearish (red) candles.
Option to visually highlight candles with background color.
Built-in alert to notify you immediately when a giant candle appears.
Ideal for traders looking to spot volatility spikes, key breakouts, or significant price movements with minimal effort.
H4 3-Candle Pattern (Persistent Signals)Below is an example in Pine Script v5 that detects a pattern using the last three completed 4H candles and then plots a permanent arrow on the fourth candle (i.e. on the current bar) when the conditions are met. The arrow stays on that bar even after new bars form.
In this version, the pattern is evaluated as follows on each bar (when there are enough candles):
Bullish Pattern:
The candle three bars ago (oldest of the three) is bullish (its close is greater than its open).
The candle two bars ago closes above the high of that older candle.
The last completed candle (one bar ago) closes at or above the low of the candle two bars ago.
Bearish Pattern:
The candle three bars ago is bearish (its close is less than its open).
The candle two bars ago closes below the low of that older candle.
The last completed candle closes at or below the high of the candle two bars ago.
When the conditions are met the script draws a green up arrow below the current (fourth) candle for a bullish pattern and a red down arrow above the current candle for a bearish pattern. These arrows are drawn as regular plot symbols and remain on the chart permanently.
Copy and paste the code into TradingView’s Pine Script Editor:
Wick Sweep EntriesWick Sweep Entry designed by Finweal Finance (Indicator Originator : Prajyot Mahajan) :
This Indicator is specially designed for Nifty, Sensex and Banknifty Options Buying. This works well on Expiry Days.
Setup Timeframe : 5m and 1m.
Entry Criteria :
For Long/CE :
Wait for Sweep of 5m Candle Low with next 5m Candle but you do not wait for the next 5 minute candle to close, you enter directly whenever any 1 minute candle of next 5minute candle to close above the low of previous 5m Candle.
For Short/PE :
Wait for Sweep of 5m Candle High with next 5m Candle but you do not wait for the next 5 minute candle to close, you enter directly whenever any 1 minute candle of next 5minute candle to close below the High of previous 5m Candle.
Key notes :
1. As this is the Scalping High Frequency Strategy, it is to be used for scalping purpose only. You might have losses too so to avoid the noise in the market, i suggest you to use this strategy in the first 45 minutes to 1 hour of Indian Markets as this is a volatility Strategy.
2. Although Nifty and Banknifty are independent indices, they still show some reactions with each other, so if you spot a long entry on BNF and Short Entry on nifty then you will avoid taking the trade, you will take the trade only if there is a tandem activity or At least the other index is not showing opposite signal.
3. If target is not hit and you spot another entry, you will avoid taking the new entry.
The Indicator will automatically spot/plot the entry signal, all you need to do is enter as soon as 1minute candle closes either below prior 5 minute candle High for Short/PE or closes above 5minute low for Long/CE.
For Targets :
You Can Target recent minor pull back, FVG, or Order blocks.
Remember : This is a scalping strategy so don't hold trade for more than 4/5 1minute Candles
Next Candle PredictorNext Candle Predictor for TradingView
This Pine Script indicator helps predict potential price movements for the next candle based on historical price action patterns. It analyzes recent candles' characteristics including body size, wick length, and volume to calculate a directional bias.
Key Features
Analyzes recent price action to predict next candle direction (Bullish, Bearish, or Neutral)
Visual indicators include small directional arrows and a prediction line
Customizable sensitivity and lookback period
Works best on lower timeframes for short-term price action trading
Displays clear prediction labels that extend into future bars
How It Works
The script analyzes recent candles by examining:
Candle body size (weighted by your preference)
Wick length (weighted by your preference)
Volume activity (weighted by your preference)
These factors combine to create a directional strength indicator that determines if the next candle is likely to be bullish, bearish, or neutral.
Visual Feedback
Green up arrows indicate bullish predictions
Red down arrows indicate bearish predictions
A directional line extends from the last candle showing predicted price movement
A label displays the prediction text at the end of the line
Information table in the top right displays the current prediction
Settings
Lookback Candle Count: Number of historical candles to analyze (2-20)
Wick/Body/Volume Weight Factors: Adjust importance of each component
Prediction Sensitivity: Threshold for triggering directional bias
Prediction Line Length: How far the prediction line extends
Perfect for day traders and scalpers looking for an edge in short-term directional bias.
Ross Cameron-Inspired Day Trading StrategyExplanation for Community Members:
Title: Ross Cameron-Inspired Day Trading Strategy
Description:
This script is designed to help you identify potential buy and sell opportunities during the trading day. It combines several popular trading strategies to provide clear signals.
Key Features:
Gap and Go: Identifies stocks that have gapped up or down at the open.
Momentum Trading: Uses RSI and EMA to identify momentum-based entry points.
Mean Reversion: Uses RSI and SMA to identify potential reversals.
How to Use:
Apply to Chart: Add this script to your TradingView chart.
Set Timeframe: Works best on 5-minute and 10-minute timeframes.
Watch for Signals: Look for green "BUY" labels for entry points and red "SELL" labels for exit points.
Parameters:
Gap Percentage: Adjust to identify larger or smaller gaps.
RSI Settings: Customize the RSI length and overbought/oversold levels.
EMA and SMA Lengths: Adjust the lengths of the moving averages.
Confirmation Period: Set how many bars to wait for confirmation.
Visual Elements:
BUY Signals: Green labels below the price bars.
SELL Signals: Red labels above the price bars.
Indicators: Displays EMA (blue) and SMA (orange) for additional context.
This script is a powerful tool for day trading on NSE and BSE indices, combining multiple strategies to provide robust trading signals. Adjust the parameters to suit your trading style and always combine with your own analysis for best results.
Gold Opening 15-Min ORB INDICATOR by AdéThis indicator is designed for trading Gold (XAUUSD) during the first 15 minutes of major market openings: Asian, European, and US sessions. It highlights these key time windows, plots the high and low ranges of each session, and generates breakout-based buy/sell signals. Ideal for traders focusing on volatility at market opens.
Features:Session Windows:
Asian: 1:00–1:15 AM Barcelona time (23:00–23:15 UTC, CEST-adjusted).
European: 9:00–9:15 AM Barcelona time (07:00–07:15 UTC).
US: 3:30–3:45 PM Barcelona time (13:30–13:45 UTC).
Marked with yellow (Asian), green (Europe), and blue (US) triangles below bars.
High/Low Ranges:Plots horizontal lines showing the highest high and lowest low of each session’s first 15 minutes.Lines appear after each session ends and persist until the next day, color-coded to match the sessions.Breakout Signals:Buy (Long): Triggers when the closing price breaks above the highest high of the previous 5 bars during a session window (lime triangle above bar).Sell (Short): Triggers when the closing price breaks below the lowest low of the previous 5 bars during a session window (red triangle below bar).
Signals are restricted to the 15-minute session periods for focused trading.Usage:Timeframe: Optimized for 1-minute XAUUSD charts.Timezone: Set your chart to UTC for accurate session timing (script uses UTC internally, based on Barcelona CEST, UTC+2 in April).Strategy:
Use buy/sell signals for breakout trades during volatile market opens, with session ranges as support/resistance levels.Customization: Adjust the lookback variable (default: 5) to tweak signal sensitivity.Notes:Tested for April 2025 (CEST, UTC+2).
Adjust timestamp values if using outside daylight saving time (CET, UTC+1) or for different broker timezones.Best for scalping or short-term trades during high-volatility periods. Combine with other indicators for confirmation if desired.How to Use:Apply to a 1-minute XAUUSD chart.Watch for session markers (triangles) and breakout signals during the 15-minute windows.Use the high/low lines to gauge potential breakout targets or reversals.
Failed Breakout DetectionThis indicator is a reverse-engineered copy of the FBD Detection indicator published by xfuturesgod. The original indicator aimed at detecting "Failed Breakdowns". This version tracks the opposite signals, "Failed Breakouts". It was coded with the ES Futures 15 minute chart in mind but may be useful on other instruments and time frames.
The original description, with terminology reversed to explain this version:
'Failed Breakouts' are a popular set up for short entries.
In short, the set up requires:
1) A significant high is made ('initial high')
2) Initial high is undercut with a new high
3) Price action then 'reclaims' the initial high by moving +8-10 points from the initial high
This script aims at detecting such set ups. It was coded with the ES Futures 15 minute chart in mind but may be useful on other instruments and time frames.
Business Logic:
1) Uses pivot highs to detect 'significant' initial highs
2) Uses amplitude threshold to detect a new high above the initial high; used /u/ben_zen script for this
3) Looks for a valid reclaim - a red candle that occurs within 10 bars of the new high
4) Price must reclaim at least 8 points for the set up to be valid
5) If a signal is detected, the initial high value (pivot high) is stored in array that prevents duplicate signals from being generated.
6) FBO Signal is plotted on the chart with "X"
7) Pivot high detection is plotted on the chart with "P" and a label
8) New highs are plotted on the chart with a red triangle
Notes:
User input
- My preference is to use the defaults as is, but as always feel free to experiment
- Can modify pivot length but in my experience 10/10 work best for pivot highs
- New high detection - 55 bars and 0.05 amplitude work well based on visual checks of signals
- Can modify the number of points needed to reclaim a high, and the # of bars limit over which this must occur.
Alerts:
- Alerts are available for detection of new highs and detection of failed breakouts
- Alerts are also available for these signals but only during 7:30PM-4PM EST - 'prime time' US trading hours
Limitations:
- Current version of the script only compares new highs to the most recent pivot high, does not look at anything prior to that
- Best used as a discretionary signal
Bull Bear Pivot by RawstocksThe "Bull Bear Pivot" indicator is a custom Pine Script (v5) tool designed for TradingView to assist traders in identifying key price levels and pivot points on intraday charts (up to 1-hour timeframes). It combines time-based open price markers, pivot high/low detection, and candlestick visualization to provide a comprehensive view of potential support, resistance, and trend reversal levels. Below is a detailed description of the indicator’s functionality, features, and intended use.
Indicator Overview:
The "Bull Bear Pivot" indicator is tailored for intraday trading, focusing on specific times of the day to mark significant price levels (open prices) and detect pivot points. It plots horizontal lines at the open prices of user-defined sessions, identifies pivot highs and lows on the current chart timeframe, and overlays custom candlesticks to highlight price action. The indicator is designed to work on timeframes of 1 hour or less (e.g., 1-minute, 3-minute, 5-minute, 15-minute, 30-minute, 60-minute) and includes a warning mechanism for invalid timeframes.
Key Features:
Time-Based Open Price Markers:
The indicator allows users to define up to five time-based sessions (e.g., 4:00 AM, 8:30 AM, 9:30 AM, 10:00 AM, and a custom time) to capture the open price at the start of each session.
For each session, it plots a horizontal line at the 1-minute open price, extending from the session start to the market close at 4:00 PM EST.
Each line is accompanied by a label positioned 5 bars to the right of the market close (4:00 PM EST), with the text right-aligned and vertically centered on the line.
Users can enable/disable each marker, customize the session time, label text, line color, and text color via the indicator’s settings.
Pivot Highs and Lows:
The indicator calculates pivot highs and lows on the current chart timeframe using the ta.pivothigh and ta.pivotlow functions.
Pivot highs are marked with green triangles above the bars, and pivot lows are marked with red triangles below the bars.
The pivot period (lookback/lookforward) is user-configurable, allowing flexibility in detecting short-term or longer-term reversals.
Custom Candlesticks:
The indicator overlays custom candlesticks on the chart, colored green for bullish candles (close > open) and red for bearish candles (close < open).
This feature helps visualize price action alongside the open price markers and pivot points.
Timeframe Restriction:
The indicator is designed to work on timeframes of 1 hour or less. If the chart timeframe exceeds 1 hour (e.g., 4-hour, daily), a warning label ("Timeframe > 1H Indicator Disabled") is displayed, and no elements are plotted.
Customizable Appearance:
Users can customize the appearance of the open price marker lines, including the line style (solid, dashed, dotted) and line width.
Labels for the open price markers have no background (transparent) and use customizable text colors.
Previous Candle Range Split into ThirdsThis script plots two horizontal lines over the previous candle to divide its total range (high to low) into three equal parts. The first line marks 33% of the range from the low, and the second marks 66%. This helps users visually identify whether the previous candle closed in the lower, middle, or upper third of its range, providing context on potential buyer or seller dominance during that session.
Users can customize the color, width, and style (solid, dotted, dashed) of each line, as well as toggle their visibility from the script's input settings.
This indicator is designed as a discretionary analysis tool and does not generate buy or sell signals.
10K's RTH open ±0.35% for CMEInstant Visualization of ±0.35% from RTH Open — Spot Intraday Reversals at a Glance!
This is a visual tool designed for the U.S. regular trading hours (RTH), which instantly highlights the ±0.35% range from the RTH opening price of futures at the start of the session.
The range is displayed as a light purple box, accompanied by a dashed line marking the exact opening price, helping traders quickly assess how price reacts around this key level.
With adjustable transparency settings, this tool is ideal for intraday analysis of price positioning and directional strength — a valuable aid for short-term trading strategies.
Falcon SignalsThis script is a TradingView Pine Script for a trading strategy called "Falcon Signals." It combines multiple technical indicators and strategies to generate buy and sell signals. Here’s a breakdown of what the script does:
1. Supertrend Indicator:
The script calculates the Supertrend indicator using the Average True Range (ATR) and a specified multiplier (factor). The Supertrend is used to define the trend direction, with a green line for an uptrend and a red line for a downtrend.
2. EMA (Exponential Moving Average):
Two EMAs are used: a fast EMA (9-period) and a slow EMA (21-period). The script checks for crossovers of the fast EMA above or below the slow EMA as a basis for buying and selling signals.
3. RSI (Relative Strength Index):
The RSI (14-period) is used to measure the momentum of the price. A buy signal is generated when the RSI is less than 70, while a sell signal is generated when it’s greater than 30.
4. Take Profit (TP) and Stop Loss (SL):
The script allows users to set custom percentages for take profit and stop loss. The take profit is set at a certain percentage above the entry price for buy signals, and the stop loss is set at a percentage below the entry price, and vice versa for sell signals.
5. Trailing Stop:
A trailing stop can be enabled, which dynamically adjusts the stop loss level as the price moves in the favorable direction. If the price moves against the position by a certain trailing percentage, the position will be closed.
6. Engulfing Patterns:
The script checks for bullish and bearish engulfing candlestick patterns, indicating potential reversals. A bullish engulfing pattern is marked with a teal label ("🔄 Reversal Up"), and a bearish engulfing pattern is marked with a fuchsia label ("🔄 Reversal Down").
7. Plotting:
The script plots various indicators and signals:
Entry line: Shows where the buy or sell signal is triggered.
Take profit and stop loss levels are plotted as lines.
EMA and Supertrend lines are plotted on the chart.
Trailing stop line, if enabled, is also plotted.
8. Buy and Sell Labels:
The script places labels on the chart when buy or sell signals are triggered, indicating the price at which the order should be placed.
9. Exit Line:
The script plots an exit line when the trailing stop is hit, signaling when a position should be closed.
10. Alerts:
Alerts are set for both buy and sell signals, notifying the trader when to act based on the strategy's conditions.
This strategy combines trend-following (Supertrend), momentum (RSI), and price action patterns (EMA crossovers and engulfing candlestick patterns) to generate trade signals. It also offers the flexibility of take profit, stop loss, and trailing stop features.
Gap Days Identifier📌 Gap Days Identifier – Pine Script
This script identifies Gap Up and Gap Down days based on user-defined percentage thresholds. It is designed for daily charts and helps traders spot significant opening gaps relative to the previous day’s close.
🔍 Key Features:
Customizable Thresholds: Input your desired % gap for both Gap Up and Gap Down detection.
Visual Markers: Displays label arrows with actual % gap on the chart (green for Gap Up, red for Gap Down).
Live Statistics Table: Shows total count of Gap Up and Gap Down days based on your filters.
Clean Overlay: Designed to be non-intrusive and easy to interpret for any instrument.
✅ Use Case:
Perfect for traders who track gap-based breakout strategies, news/event impact, or want to filter days with strong overnight sentiment shifts.
ATR Amplitude RatioATR Amplitude Ratio
The ATR Amplitude Ratio indicator measures price volatility by comparing the current candle's amplitude (high-low range) to the Average True Range (ATR). This helps traders identify when price movement exceeds typical volatility thresholds, potentially signaling unusual market activity.
Key Features:
Displays the ratio between current candle height and ATR as color-coded histogram bars
Customizable ATR calculation with multiple smoothing methods (SMA, EMA, RMA, WMA)
Visual reference lines at 1x, 2x, 3x, 4x, and 5x ATR levels
Dynamic color coding based on volatility intensity (5 customizable threshold colors)
Real-time display of current ratio and ATR values
How to Use:
Volatility Assessment: Quickly identify if price action is within normal volatility ranges or exhibiting unusual movement
Breakout Confirmation: Higher ratios can confirm genuine breakouts versus false moves
Entry/Exit Timing: Consider entries when volatility returns to normal ranges after spikes
Risk Management: Adjust position sizing based on current volatility ratios
Settings:
ATR Length: Determines the lookback period for ATR calculation (default: 14)
ATR Smoothing Type: Choose from SMA, EMA, RMA, or WMA methods
Color Thresholds: Customize colors for different volatility ranges
This indicator helps traders make more informed decisions by providing context about current price action relative to recent historical volatility.
Statistical OHLC Projections [neo|]█ OVERVIEW
Statistical OHLC Projections is an indicator designed to offer users a customizable deep-dive on measuring historical price levels for any timeframe. The indicator separates price into two distinct levels, "Manipulation" and "Distribution", where the idea is that for higher timeframe candles, e.g. an up-close candle, the distance from the open to the bottom of the wick would constitute the Manipulation, and the rest would be considered the Distribution. By measuring out these levels, we can gain insight on how far the market may move from higher timeframe opens to their manipulations and distributions, and apply this knowledge to our analysis.
IMPORTANT: Since levels are based on the lookback available on your chart, if the levels aren't being displayed this likely means you don't have enough lookback for your selected timeframe. To check this, enable the stat table to see how many values are available for your timeframe, and either reduce the lookback or increase your chart timeframe.
█ CONCEPTS
The core concept revolves around understanding market behavior through the lens of historical candle structure. The indicator dissects OHLC data to provide statistical boundaries of expected price movement.
- Manipulation Levels: These represent the areas typically seen as liquidity grabs or false moves where price extends in one direction before reversing.
- Distribution Levels: These highlight where the bulk of directional movement tends to occur, often following the manipulation move.
The tool aggregates this data across your selected timeframe to inform you of potential levels associated with it.
█ FEATURES
Multiple Display Types: Display statistical data through two sleek styles, areas or lines. Where areas represent the area between two customizable lookback values, and lines represent one average value.
Adjustable Timeframe Selection: Whether you want to see data based on the 1D chart, or the 1W chart, anything is possible. Simply change the timeframe on the dropdown menu and if there is sufficient lookback the indicator will adjust to your requested timeframe.
Customizable Historical Lookback: By default, the indicator will measure the average 60 values of your requested timeframe, however this may be adjusted to be higher or lower based on your preference. If you want to measure recent moves, 10-20 lookback may be better for you, or if you want more data for less volatile instruments, a value of 100 may be better.
Historical Display: Prevent historical levels from being removed by unchecking the "Remove Previous Drawings" option, this will allow you to examine how the levels previously interacted with price.
NY Midnight Anchoring: By checking the "Use NY Midnight" option, you may see the projection anchored to the New York midnight open time, which is often a significant level on indices.
Alerts: You may enable alerts for any of the indicator's provided levels to stay informed, even when off the charts.
█ How to use
To use the indicator, simply apply it to your chart and modify any of your desired inputs.
By default, the indicator will provide levels for the "1D" timeframe, with a desired lookback of 60, on most instruments and plans this can be gotten when you are on the 30 minute timeframe or above.
When price reaches or extends beyond a manipulation level, observe how it reacts and whether it rejects from that level, if it does this may be an indication that the candle for the timeframe you selected may be reversing.
█ SETTINGS AND OPTIONS
Customize the indicator’s behavior, timeframe sources, and visual appearance to fit your analysis style. Each setting has been designed with flexibility in mind, whether you're working on lower or higher timeframes.
Display Mode: Switch between different display styles for levels: - Default: Shows all statistical levels as individual lines.
- Areas: Plots filled zones between two customizable lookbacks to represent the range between them.
This is ideal for visually mapping high-probability zones of price activity.
Timeframe Settings:
- Show First/Second Timeframe: Choose to show one or both timeframe projections simultaneously.
- First Timeframe / Second Timeframe: Define the higher timeframe candle you want to base calculations on (e.g., 1D, 1W).
- Use NY Midnight: When enabled and using the daily timeframe, the levels will be anchored to the New York Midnight Open (00:00 EST), a key institutional timing reference, especially useful for indices and forex.
Calculation Settings:
- Main Lookback Period: The number of historical candles used in the statistical calculations. A lower number focuses on recent price action, while a higher number smooths results across broader history.
- First Lookback / Second Lookback: Used when “Areas” mode is selected to define the range of the shaded zone. For example, an area from 20 to 60 candles creates a band between short- and long-term price behavior averages.
Visual Settings:
- Line Style: Set your preferred visual style: Solid, Dashed, or Dotted.
- Remove Previous Drawings: When enabled, only the most recent projection is shown on the chart. Disable to retain previous levels and visually backtest their reactions over time.
Color Settings:
Customize each level independently to match your chart theme:
- Manipulation High/Low
- Distribution High/Low
- Open Level
- Label Text Color
Premium/Discount Zones:
- Enable Premium/Discount Zones: Overlay price zones above and below equilibrium to visualize potential overbought (premium) and oversold (discount) areas.
- Premium/Discount Colors: Fully customizable zone colors for clarity and emphasis.
Table Settings:
- Show Statistics Table: Adds an on-chart table summarizing key levels from your active timeframe(s).
- Table Cell Color: Set the background color of the table cells for visibility.
- Table Position: Choose from preset chart locations to position the table where it works best for your layout.
Alerts:
Stay on top of price interactions with key levels even when you're away from the charts.
- Manipulation Hits (High)
- Manipulation Hits (Low)
- Distribution Hits (High)
- Distribution Hits (Low)
14 EMA & RSI Combo with First Buy/SellEMA14 & RSI stratergy - Used as a indication for BUY and Sell based on EMA 14 and RSI. Chk for higher timeframe trend and stick to the entries that are following the trend
Advanced OHLC ExporterThis Pine Script indicator provides one-click export of candlestick data (OHLC + Volume) from any TradingView chart. It displays the current candle's values in a clean table while ensuring all visible historical data is available for export in CSV format.
Key Features
📊 Visual Data Display
Real-time OHLC table in the top-right corner.
Color-coded values for quick analysis (green=high, red=low).
Volume shown in standardized formatting.
Data Export Ready
All plotted values appear in TradingView's Data Window.
Right-click → "Export Data" to save:
Open, High, Low, Close (OHLC) prices
Trading volume
Timestamps for each candle
⚙️ Customizable Output
Works on any timeframe (1m to 1M)
Compatible with: Forex, Stocks, Crypto, Futures
How Traders Use This
Technical Analysts - Export clean datasets for external analysis.
Backtesters - Quickly gather historical price data for strategy development.
Researchers - Study candlestick patterns with precise numerical data.
Market Open Highlights (9:30 AM ET)This indicator zeroes in on the 9:30 AM Eastern Time market opens for NAS100 and US30, highlighting all market opens with a bold yet subtle yellow background. Tailored for precision backtesting, it uses TradingView’s timezone capabilities to pinpoint the exact 9:30 AM candle, skipping weekends to focus solely on U.S. equity market opens.
What It Does:
The script tracks the bar indices of all market opens at 9:30 AM ET, applying a semi-transparent yellow highlight to those candles. It’s a clean, efficient way to mark key session starts for analyzing price action or testing strategies.
How to Use It:
1. Apply the script to a chart of NAS100 (e.g., FX:NAS100) or US30 (e.g., FX:US30) in TradingView on any timeframe.
2. Set your chart timezone to "America/New_York" (Settings > Timezone/Sessions).
3. Scroll back through trading days to see the yellow highlights on the 9:30 AM candles.
4. While it functions across all timeframes, it’s optimized for 5-minute and 1-minute charts, where the 9:30 AM candle aligns precisely with the U.S. market open for detailed analysis.
5. Use it to study price behavior or refine strategies around this critical daily event.
zigzag all timeThe indicator is applicable across all timeframes, meaning it can be used for short-term (e.g., minutes, hours) or long-term (e.g., days, weeks, months) trading strategies. This ensures that the analysis is versatile and adaptable to different trading styles.
Nifty 1m EMA Pullback Scalper Signals
### **Master the Market with the Sniper Scalping Strategy for Nifty (1-Minute Timeframe)**
Unlock the power of precision trading with this expertly crafted **Sniper Scalping Strategy**, designed specifically for the Nifty index on a lightning-fast 1-minute timeframe. Perfect for traders who thrive on quick decisions and small, consistent profits, this strategy combines multiple indicators to deliver razor-sharp entries and exits—ideal for India’s dynamic market.
#### **Why This Strategy Stands Out**
- **Pinpoint Accuracy**: Harness the synergy of the **5 EMA and 10 EMA crossover** to lock onto the short-term trend, while the **Stochastic Oscillator (14,3,3)** times your entries and exits with surgical precision.
- **Fast and Effective**: Tailored for the 1-minute chart, this strategy capitalizes on Nifty’s volatility, targeting **10-point profits** with a tight **5-point stop-loss**—keeping your risk low and rewards high.
- **Trend + Momentum**: Blend trend-following (EMAs) with momentum signals (Stochastic) for a robust, multi-dimensional approach that cuts through market noise.
#### **How It Works**
- **Buy Signal**: Enter long when the 5 EMA crosses above the 10 EMA and the Stochastic rises above 20—catching the uptrend at its sweet spot.
- **Sell Signal**: Go short when the 5 EMA dips below the 10 EMA and the Stochastic falls below 80—riding the downtrend with confidence.
- **Exit Like a Pro**: Take profits at 10 points or when the Stochastic hits overbought/oversold extremes, ensuring you’re in and out before the market shifts.
#### **Perfect for Nifty Scalpers**
Built for the fast-paced world of Nifty trading, this strategy shines during high-volatility sessions like the market open or global overlaps. Whether you’re a beginner honing your skills or a seasoned trader seeking consistency, the Sniper Scalping Strategy offers a clear, actionable framework to scalp profits with discipline and precision.
#### **Get Started**
Test it in a demo account, refine it to your style, and watch your scalping game soar. Trade smart, stay focused, and let the Sniper Scalping Strategy turn Nifty’s 1-minute moves into your edge!
Session Coloring Bar with ICT Macro [dani]The Session Coloring Bar is customizable Pine Script indicator designed to visually enhance your charts by applying unique colors to specific trading sessions or timeframes. This tool allows traders to easily identify and differentiate between macro sessions (e.g., 24-hour cycles) and custom-defined sessions (e.g., Session A, Session B), making it ideal for analyzing market activity during specific periods.
In the context of trading, the term "ICT Macro" , as discussed by Michael J. Huddleston (ICT), refers to specific timeframes or "windows" where market behavior often follows predictable patterns. Traders typically focus on the last 10 minutes of an hour and the first 10 minutes of the next hour (e.g., 0150-0210 , 0050-0110 , or 0950-1010 ) to identify key price movements, liquidity shifts, or market inefficiencies.
This script highlights these macro timeframes, enabling traders to visually analyze price action during these critical periods. Use this tool to support your strategy, but always combine it with your own analysis and risk management.
With this indicator, you can:
Highlight Macro Sessions : Automatically color bars based on predefined 24-hour macro sessions.
Customize Session Settings : Define up to three custom sessions (A & B) with individual start/end times, visibility toggles, and unique bar colors.
Timeframe Filtering : Hide session coloring above a specified timeframe to avoid clutter on higher timeframes.
Personal Notes : Add comments to each session for better organization and quick reference.
Dynamic Color Logic : Bars are colored based on their direction (up, down, or neutral) within the active session.
How to Use:
Enable/Disable Sessions :
Use the Show Coloring toggle to enable or disable session coloring for Macro, Session A, Session B, or Session C.
Set Session Times :
Define the start and end times for each session in the format HHMM-HHMM (e.g., 1600-0930 for an overnight session).
Choose Colors :
Assign unique colors for upward (Bar Up) and downward (Bar Down) bars within each session.
Adjust Timeframe Visibility :
Use the Hide above this TF input to specify the maximum timeframe where session coloring will be visible.
Add Notes :
Use the Comment field to add personal notes or labels for each session.
Example Use Cases:
Overnight Sessions :
Highlight overnight trading hours (e.g., 1600-0930) to analyze price action during low liquidity periods.
Asian/European/US Sessions : Define separate sessions for major trading regions to track regional market behavior.
Macro Analysis : Use the predefined 24-hour macro sessions to study hourly price movements across a full trading day.
Disclaimer:
The Session Coloring Bar is not a trading signal generator and does not predict market direction or provide buy/sell signals. Instead, it is a visualization tool designed to help you identify and analyze specific trading sessions or timeframes on your chart. By highlighting key sessions and their corresponding price movements, this indicator enables you to focus on periods of interest and make more informed trading decisions.
Thank you for choosing this indicator! I hope it becomes a valuable part of your trading toolkit. Remember, trading is a journey, and having the right tools can make all the difference. Whether you're a seasoned trader or just starting out, this indicator is designed to help you stay organized and focused on what matters most—price action. Happy trading, and may your charts be ever in your favor! 😊