Open Interest:CME e-o-d vs CFTC e-o-wCFTC only publishes total OI on fridays, related to last Tuesday.
But what happened since last Tuesday?
CME Vol & Open Interest data is recorded&exported daily by quandl.com to tradingview
via the che CHRIS/CME datasets
www.quandl.com
Eg. Nat Gas next outstanding cntract n. 20, field n. 7(OI)
@quandl.com:
www.quandl.com
is exported @tradingview:
www.tradingview.com
Every outstanding contract's OI & vol is exported (black column), but not the total (yellow line):
tiny.cc
This script sums up all the existing outstanding contract's OI for the future (the black column), so one can have an idea of the total OI for the day (Yellow line).
As numer of outstanding contracts varies from future to future,Eg:
E-mini (ES) has 4 contracts, Gold(GC) 16 cntrcts, NatGas(NG) has 43, WTI(CL) has 38 etc
the scrips tries to guess how many exist for it and sums them up, to have the total OI for tha day
Number ofoutstanding contracts exported by quandl.com to tradingview is taken from
s3.amazonaws.com
There are 2 params you can enter on the script:
* override the ticket symbol on the chart ,if script cannot guessit or you need a different one
* enter the "preliminary" OI that is published by CME early the next day, butb not yet exported by quandl to tradingview
This script is Open so anyone can copy and modifyit for its use.
Please post comments and ideas if you find it useful
I try to keep a log of my work here:
Search in scripts for "Futures"
Colored Volume Bars All Markets: Combining Volume SourcesUsing volume in Forex is potentially misleading as we are only provided the broker volume or futures exchange volume for the currency or commodity in a decentralised market. This code combines the volumes from FXCM, Onanda and futures for the instrument being studied. The combination of the volumes could improve the reliability of the volume being considered. Using this approach other volume indicators can also be improved.
Bitmex Bitcoin BasisInspired by the Ugly Old Goat's articles about the Bitcoin basis - medium.com
with the help of @Plumptoiletduck this indicator was created to show the Bitmex futures premium or discount.
Note you need to add in the new futures ticker every 3 months.
ACM22 not repaintedДелал данный скрипт для FORTS.Идеально подойдет тем,кто использует трейлинг стопы.В основе стратегии лежит RSI.Как по мне,хорошая вещь для проверки стратегии и ее оптимизиации.На скрине 50 контрактов,так что не сильно радуйтесь,а просто делите на 50 и получите показатели на 1 контракт.
Script make for futures on MICEX.U can change paramets of RSI,traling stop and stop loss .On a ps 50 futures USDollar-russian ruble.Use for testing and optimisation.
Vertical Horizontal Filter BacktestVertical Horizontal Filter was initiated by Adam White. It was first published
in a magazine called “Issues of Futures” in August, 1991. The Vertical Horizontal
Filter (VHF) is a very common Indicator used by traders to find out the Phase of
a Price Trend. Normally, a price trend can be in a Trending Phase or a Congestion
Phase/Choppy Movement Phase. Adam White created this particular Technical Indicator
to determine whether prices are trending in a particular direction or are they going
through a transitional period. He used it to measure the range of Futures available
in the market.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Vertical Horizontal Filter Strategy Vertical Horizontal Filter was initiated by Adam White. It was first published
in a magazine called “Issues of Futures” in August, 1991. The Vertical Horizontal
Filter (VHF) is a very common Indicator used by traders to find out the Phase of
a Price Trend. Normally, a price trend can be in a Trending Phase or a Congestion
Phase/Choppy Movement Phase. Adam White created this particular Technical Indicator
to determine whether prices are trending in a particular direction or are they going
through a transitional period. He used it to measure the range of Futures available
in the market.
WARNING:
- This script to change bars colors.
Vertical Horizontal Filter Vertical Horizontal Filter was initiated by Adam White. It was first published
in a magazine called “Issues of Futures” in August, 1991. The Vertical Horizontal
Filter (VHF) is a very common Indicator used by traders to find out the Phase of
a Price Trend. Normally, a price trend can be in a Trending Phase or a Congestion
Phase/Choppy Movement Phase. Adam White created this particular Technical Indicator
to determine whether prices are trending in a particular direction or are they going
through a transitional period. He used it to measure the range of Futures available
in the market.
BKSqueezeThis is a price volatility compression and expansion indicator that uses the ratio of the Bollinger Band and Keltner Ratio.
Red segments indicate extreme price volatility compression that can be ideal entry points for stock/futures/forex and/or options positions.
Aqua segments indicate price volatility is expanding.
Blue segments indicate price volatility is compressing - can be used as an exit point or partial scale out point.
Note that the indicator doesn't indicate direction. One suggestion is to use the DMI indicator for this purpose - really depends on how early you enter the trade.
Suggest using a time period of 15 bars for volatile stocks, such as TSLA for example, otherwise a period of 20 bars suits most stocks/futures/forex symbols.
T7 JNSARJNSAR stands for Just Nifty -0.14% Stop & Reverse. This is a Trend Following Daily Bar Trading System for NIFTY -0.14% . Original idea belongs to ILLANGO @ I coded the pine version of this system based on a request from @stocksonfire. Use it at your own risk after validation at your end. Neither me or my company is responsible for any losses you may incur using this system. Hope you like this system and enjoy trading it !!!
Updated V3 code for the T7 JNSAR system earlier published here V2 and here V1
Following updates made to the code
1. Added a 22 Period Simple moving average filter over and above the standard JNSAR value for generating trading signals. This simple filter reduces the whipsaw trades drastically along with similar improvements in the max draw down and overall profitability of the system. The SMA filter is turned ON by default but can be turned OFF by user through the settings window.
2. Backtest option is now turned ON by default.
Also am republishing the trading rules here again with some modification
1. Go Long when the daily close is above the JNSAR line. Go Short when the daily close is below the JNSAR line. JNSAR line is the varying green line overlayed over the price chart. Once a signal comes at market close enter in the direction of the signal @ market price @ next day market open.
2. Trade only Nifty -0.14% Index. This system was developed and backtested only for NIFTY -0.14% Index. So trade in its Futures or Options, as you may deem fit. My recommendation is to choose futures for simplicity. If you want to reduce the trading cost and go with options, trade with deep in the money options, preferably 2 strikes far from the spot price.
3. Trade all signals. Markets trend only 30-35% of the time and hence the system is only accurate to that extend. But system tends to make enough money, in this small trending window, to keep the overall profitability in good health. But one never knows when a big trend may come and when it comes its absolutely imperative that you take it. To ensure that, trade all signals and don't be choosy about what signals you are going to trade. Also I wouldn't recommend using your own analysis to trade this system. Too many drivers will crash the car.
4. Like all trend following systems, this system will have many whipsaws during flat markets along with large trade and account drawdowns. Also some months and even years may not be profitable. But to trade this system profitably, it is necessary to take these in one's stride and keep trading. As the backtester results from 1990 to 2017 proves, this system is profitable overall thus far. Take confidence from that objective fact.
5. Trade with only that amount of money you can afford to loose. Initial capital that you need to have to trade one lot of NIFTY -0.14% should be atleast - (Margin Money required to take and hold 1 lot position + maximum drawdown amount per lot)*1.2. Be prepared to add more if need be, but the above formula will give a rough idea of what you need to have to start trading and be in the game always.
6. Place an After Market Order @ Market Price with your broker after market close so that you get to execute the trade next trading day @ Market open to capture near similar price as the daily open price seen on the chart. This execution mode will give you the best chance to minimize the slippage and mimic the backtester results as closely as practically possible.
7. Follow all the 6 rules above religiously, as if your life depends on it. If you cant, then don't trade this system; You will certainly loose money.
Happy Trading !!! As always am looking out for your valuable feedback.
T7 JNSARUpdated code for the T7 JNSAR system earlier published here -
Following updates made to the code
1. Buy / Sell arrows now appear when the corresponding conditions are met.
2. Support for Heikin-Ashi Candles added
3. Different Backtesting Position Sizing Algorithms added for evaluation
Also am republishing the trading rules here again with some modification
1. Go Long when the daily close is above the JNSAR line. Go Short when the daily close is below the JNSAR line. JNSAR line is the varying green line overlayed over the price chart. Once a signal comes at market close enter in the direction of the signal @ market price @ next day market open.
2. Trade only Nifty Index. This system was developed and backtested only for NIFTY Index. So trade in its Futures or Options, as you may deem fit. My recommendation is to choose futures for simplicity. If you want to reduce the trading cost and go with options, trade with deep in the money options, preferably 2 strikes far from the spot price.
3. Trade all signals. Markets trend only 30-35% of the time and hence the system is only accurate to that extend. But system tends to make enough money, in this small trending window, to keep the overall profitability in good health. But one never knows when a big trend may come and when it comes its absolutely imperative that you take it. To ensure that, trade all signals and don't be choosy about what signals you are going to trade. Also I wouldn't recommend using your own analysis to trade this system. Too many drivers will crash the car.
4. Like all trend following systems, this system will have many whipsaws during flat markets along with large trade and account drawdowns. Also some months and even years may not be profitable. But to trade this system profitably, it is necessary to take these in one's stride and keep trading. As the backtester results from 1990 to 2016 proves, this system is profitable overall thus far. Take confidence from that objective fact.
5. Trade with only that amount of money you can afford to loose. Initial capital that you need to have to trade one lot of NIFTY should be atleast - (Margin Money required to take and hold 1 lot position + maximum drawdown amount per lot)*1.2. Be prepared to add more if need be, but the above formula will give a rough idea of what you need to have to start trading and be in the game always.
6. Place an After Market Order @ Market Price with your broker after market close so that you get to execute the trade next trading day @ Market open to capture near similar price as the daily open price seen on the chart. This execution mode will give you the best chance to minimise the slippage and mimic the backtester results as closely as practically possible.
7. Follow all the 6 rules above religiously, as if your life depends on it. If you cant, then don't trade this system; You will certainly loose money.
Happy Trading !!! As always am looking out for your valuable feedback.
T7 JNSARJNSAR stands for Just Nifty Stop & Reverse. This is a trend following daily bar trading system for NIFTY. Original idea belongs to ILLANGO @ I coded the pine version of this system based on a request from @stocksonfire. Use it at your own risk after validation at your end. Neither me or my company is responsible for any losses you may incur using this system. Hope you like this system and enjoy trading it !!!
While trading this system you must follow these simple rules.
1. Go Long when the daily close is above the JNSAR line. Go Short when the daily close is below the JNSAR line. JNSAR line is the varying green line overlayed over the price chart. Once a signal comes at market close enter in the direction of the signal @ market price @ next day market open.
2. Trade only Nifty Index. This system was developed and backtested only for NIFTY Index. So trade in its Futures or Options, as you may deem fit. My recommendation is to choose futures for simplicity. If you want to reduce the trading cost and go with options, trade with deep in the money options, preferably 2 strikes far from the spot price.
3. Trade all signals. Markets trend only 30-35% of the time and hence the system is only accurate to that extend. But system tends to make enough money, in this small trending window, to keep the overall profitability in good health. But one never knows when a big trend may come and when it comes its absolutely imperative that you take it. To ensure that, trade all signals and don't be choosy about what signals you are going to trade. Also I wouldn't recommend using your own analysis to trade this system. Too many drivers will crash the car.
4. Like all trend following systems, this system will have many whipsaws during flat markets along with large trade and account drawdowns. Also some months and even years may not be profitable. But to trade this system profitably, it is necessary to take these in one's stride and keep trading. As the backtester results from 1990 to 2016 proves, this system is profitable overall thus far. Take confidence from that objective fact.
5. Initial capital that you need to have to trade one lot of NIFTY should be atleast - (Margin Money required to take and hold 1 lot position + maximum drawdown amount per lot)*1.2. Be prepared to add more if need be, but the above formula will give a rough idea of what you need to have to start trading and be in the game always.
6. Follow all the 5 rules above religiously as if your life depends on it. If you cant, then don't trade this system; You will certainly loose money.
Accumulation Swing Index The Accumulation Swing Index is a cumulative total of the Swing Index.
The Accumulation Swing Index was developed by Welles Wilder.
The SwingIndex function was developed to help cut through the maze of
Open, High, Low and Close prices to indicate the real strength and direction
of the market. The Swing Index function looks at the Open, High, Low and
Close values for a two-bar period. The theory is that there are four cross-bar
and one intra-bar comparisons that are strong indicators of an up or down day.
The Swing Index returns a number between -100 and 100. If the factors point toward
an up day, then the function value will be positive and vice versa. In this way,
the Swing Index gives us definite short-term swing points, and it can be used to
supplement other methods as a breakout indicator. A breakout is indicated when the
value of the Accumulation Swing Index (ASI) exceeds the ASI value on the day when a
previous significant High Swing Point was made. A downside breakout is indicated when
the value of the ASI drops below the ASI value on a day when a previous significant
low swing point was made.
Since only futures have a relative daily limit value, this function only makes sense
when applied to a futures contract. If you use this function and it only plots a zero
flat line, check the Daily Limit value.
Accumulation Swing Index (ASI) The Accumulation Swing Index is a cumulative total of the Swing Index.
The Accumulation Swing Index was developed by Welles Wilder.
The SwingIndex function was developed to help cut through the maze of
Open, High, Low and Close prices to indicate the real strength and direction
of the market. The Swing Index function looks at the Open, High, Low and
Close values for a two-bar period. The theory is that there are four cross-bar
and one intra-bar comparisons that are strong indicators of an up or down day.
The Swing Index returns a number between -100 and 100. If the factors point toward
an up day, then the function value will be positive and vice versa. In this way,
the Swing Index gives us definite short-term swing points, and it can be used to
supplement other methods as a breakout indicator. A breakout is indicated when the
value of the Accumulation Swing Index (ASI) exceeds the ASI value on the day when a
previous significant High Swing Point was made. A downside breakout is indicated when
the value of the ASI drops below the ASI value on a day when a previous significant
low swing point was made.
Since only futures have a relative daily limit value, this function only makes sense
when applied to a futures contract. If you use this function and it only plots a zero
flat line, check the Daily Limit value.
Analog Flow [KedArc Quant]Overview
AnalogFlow is an advanced analogue based market projection engine that reconstructs future price tendencies by matching current price behavior to historical analogues in the same instrument. Instead of using traditional indicators such as moving averages, RSI, or regression, AnalogFlow applies pattern vector similarity analysis - a data driven technique that identifies historically similar sequences and aggregates their subsequent movements into a smooth, forward looking curve.
Think of it as a market memory system:
If the current pattern looks like one we have seen before, how did price move afterward?
Why AnalogFlow Is Unique
1. Pattern centric - it does not rely on any standard indicator formula; it directly analyzes price movement vectors.
2. Adaptive - it learns from the same instrument's past behavior, making it self calibrating to volatility and regime shifts.
3. Non repainting - the projection is generated on the latest completed bar and remains fixed until new data is available.
4. Noise resistant - the EMA Blend engine smooths the projected trajectory, reducing random variance between analogues.
Inputs and Configuration
Pattern Bars
Number of bars in the reference pattern window: 40
Projection Bars
Number of bars forward to project: 30
Search Depth
Number of bars back to look for matching analogues: 600
Distance Metric
Comparison method: Euclidean, Manhattan, or Cosine (default Euclidean)
Matches
Number of top analogues to blend (1-5): Top 3
Build Mode
Projection type: Cumulative, MeanStep, or EMA Blend (default EMA Blend)
EMA Blend Length
Smoothness of the projected path: 15
Normalize Pattern
Enable Z score normalization for shape matching: true
Dissimilarity Mode
If true, finds inverse analogues for mean reversion analysis: false
Line Color and Width
Style settings for projection curve: Blue, width 2
How It Works with Past Data
1. The system builds a memory bank of patterns from the last N bars based on the scanDepth value.
2. It compares the latest Pattern Bars segment to each historical segment.
3. It selects the Top K most similar or dissimilar analogues.
4. For each analogue, it retrieves what happened after that pattern historically.
5. It averages or smooths those forward moves into a single composite forecast curve.
6. The forecast (blue line) is drawn ahead of the current candle using line.new with no repainting.
Output Explained
Blue Path
The weighted mean future trajectory based on historical analogues.
Smoother when EMA Blend mode is enabled.
Flat Section
Indicates low directional consensus or equilibrium across analogues.
Upward or Downward Slope
Represents historical tendency toward continuation or reversal following similar conditions.
Recommended Timeframes
Scalping / Short Term
1m - 5m : Short winLen (20-30), small ahead (10-15)
Swing Trading
15m - 1h : Balanced settings (winLen 40-60, ahead 20-30)
Positional / Multi Day
4h - 1D : Large windows (winLen 80-120, ahead 30-50)
Instrument Compatibility
Works seamlessly on:
Stocks and ETFs
Indices
Cryptocurrency
Commodities (Gold, Crude, etc.)
Futures and F&O (both intraday and positional)
Forex
No symbol specific calibration needed. It self adapts to volatility.
How Traders Can Use It
Forecast Context
Identify likely short term price path or drift direction.
Reversal Detection
Flip seekOpp to true for mean reversion pattern analysis.
Scenario Comparison
Observe whether the current regime tends to continue or stall.
Momentum Confirmation
Combine with trend tools such as EMA or MACD for directional bias.
Backtesting Support
Compare projected path versus realized price to evaluate reliability.
FAQ
Q1. Does AnalogFlow repaint?
No. It calculates only once per completed bar and projects forward. The future path remains static until a new bar closes.
Q2. Is it a neural network or AI model?
Not in the machine learning sense. It is a deterministic analogue matching engine using statistical distance metrics.
Q3. Why does the projection sometimes flatten?
That means similar historical setups had no clear consensus in direction (neutral expectation).
Q4. Can I use it for live trading signals?
AnalogFlow is not a signal generator. It provides probabilistic context for upcoming movement.
Q5. Does higher scanDepth improve accuracy?
Up to a point. More depth gives more analogues, but too much can dilute recency. Try 400 to 800.
Glossary
Analogue
A past pattern similar to the current price behavior.
Distance Metric
Mathematical formula for pattern similarity.
Step Vector
Difference between consecutive closing prices.
EMA Blend
Exponential smoothing of the projected path.
Cumulative Mode
Adds sequential historical deltas directly.
Z Score Normalization
Rescaling to mean 0 and variance 1 for shape comparison.
Summary
AnalogFlow converts the market's historical echoes into a structured, statistically weighted forward projection. It gives traders a contextual roadmap, not a signal, showing how similar past setups evolved and allowing better informed entries, exits, and scenario planning across all asset classes.
Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and proper risk management when applying this strategy.
Position Sizer (Share Qty)
This indicator enables fast & accurate position sizing for traders using (user defined) fixed dollar risk, eliminating the need for manual calculations and supporting disciplined risk management directly on the chart
Calculates precise share quantity for fixed-risk trades using the formula Shares = Risk Amount / (Current Price – Stop Price), rounded to the nearest whole share, updating in real time on every bar
Offers two dynamic stop-loss options: Low of Day (LoD) — tracked only during Regular Trading Hours (9:30 AM – 4:00 PM ET) with automatic daily reset — or Low of Week (LoW) via weekly timeframe data
Displays all critical trade data in a clean, customizable on-screen table showing: Risk Amount, Stop Loss type (LoD/LoW), Stop Price, and calculated Shares Qty
Allows full table placement control with four corner positions with optional Top Offset and Bottom Offset (0–20 blank rows each) to prevent overlap with price action or other indicators
Provides complete visual styling control for header text/background, value text/background, and share quantity text/background
Ensures efficient rendering by recreating the table only when position, row count, or layout changes, deleting the prior instance to avoid flicker or memory issues
Handles edge cases safely: shows 0 shares if stop is 'na' or above current price, and initializes LoD only on the first RTH bar of each session
For use on equities only (table will not display on futures instruments)
--
Future improvements:
Visual Stop Loss line for either LoD or LoW
Functionality and toggle to include Extended hours (PM /AH) for LoD stop pricing
ATR SL/TP Precision Zones (Dots)ATR SL/TP Precision Zones (Dots) is a volatility-based tool designed to help traders set accurate Stop Loss and Take Profit levels based on real market volatility — not fixed pips or emotion.
This indicator uses ATR (Average True Range) multiplied by 1.2 to calculate dynamic distance bands.
Instead of drawing a ribbon or channel, it places simple dots above and below each candle:
Upper Dot (Green) → Suggested Take Profit / Price Stretch Zone
Lower Dot (Red) → Suggested Stop Loss Cushion / Support Expansion Zone
Because ATR measures market volatility, these dots expand during high volatility and tighten during slow markets, helping traders avoid stop-loss hunts and premature exits.
Why This Works
Most traders lose because:
They set SL too close → stopped out by noise
They set TP too far → price never reaches it
This tool calibrates those distances automatically based on real price movement behavior.
ATR = volatility
Volatility = market breathing room
This indicator ensures your trade has room to breathe, increasing win consistency.
Best Use Cases
Scalping
Swing trading
Trend continuation entries
Reversal confirmations with support/resistance
Works on Crypto / Forex / Stocks / Futures
MEREEP version 2 of air gap scannerMEREEP version 2 of air gap scanner – SummaryThis Pine Script (v6) detects and counts "air gaps" on the 4-hour timeframe, then displays the results in a clean on-chart table — exactly like the Pine Screener in your screenshot.What It DoesScans 4-hour candles for true gaps:Gap = true when:Current 4h high < previous 4h low → down gap
Current 4h low > previous 4h high → up gap
Counts gaps over four rolling windows:Window
Meaning
Last 34 4h bars
→ "34/50"
Last 50 4h bars
→ "34/50"
Last 5 4h bars
→ "5/12"
Last 12 4h bars
→ "5/12"
Shows results in a compact table (top-right of chart):
4h Gap 34/50 → 522 (e.g. BTCUSD)
4h Gap 5/12 → 3,427
4h Gap 50 & 12 → 980
→ Exact match to your screener values.
Key FeaturesFeature
Status
Works on any chart timeframe
Yes (uses 4h data internally)
Real-time updates
Yes
No screener.add_column errors
Yes (uses table)
No ta.sum errors
Yes (uses sum() / math.sum)
shorttitle ≤ 10 chars
Yes ("GapScan")
No syntax errors
Yes
Example Output (BTCUSD)Metric
Value
Gaps in last 34 of 50 4h bars
522
Gaps in last 5 of 12 4h bars
3,427
Gaps in last 50 & 12 4h bars
980
→ Identical to your TradingView Pine ScreenerUse CaseScan any symbol for unusual 4h gap activity
Spot potential volatility or institutional moves
Works on stocks, crypto, forex, futures
Quantura - Fair Value GapIntroduction
“Quantura – Fair Value Gap” is a precision-engineered institutional concept indicator designed to automatically identify, visualize, and manage Fair Value Gaps (FVGs) across any market or timeframe. It enables traders to observe price inefficiencies, potential liquidity voids, and retracement areas that often act as magnets for price rebalancing.
Originality & Value
Unlike many public FVG scripts that only highlight candle gaps, this indicator integrates dynamic filters and adaptive logic to determine the strength and reliability of each gap. It merges overlapping zones intelligently and optionally extends valid imbalances forward for ongoing reference.
Its value lies in:
Dynamic statistical filtering based on gap standard deviation.
Optional volume confirmation for high-confidence FVGs.
Automatic merging of overlapping or adjacent gaps for clean visualization.
Support for both bullish and bearish imbalances.
Signal alerts when gaps are filled or rebalanced by price.
Functionality & Core Logic
Detects Fair Value Gaps by comparing candle-to-candle price displacement.
Applies a Gap Filter (standard deviation-based) to qualify valid gaps.
Optionally validates gaps formed under significant volume conditions.
Draws color-coded boxes to mark bullish (discount) and bearish (premium) inefficiencies.
Monitors each FVG until price fills the gap, at which point the box is visually closed.
Provides optional signal markers (“▲” or “▼”) when rebalancing occurs.
Parameters & Customization
Gap Filter: Sets the minimum statistical deviation required for a valid FVG. Higher values detect fewer, stronger gaps.
Volume Filter: Toggles additional validation using relative volume strength.
Volume Sensitivity: Adjusts how much above-average volume must be present to confirm a gap.
Bullish/Bearish Colors: Customize color schemes for imbalance zones.
Extend Gaps: Optionally extend open gaps forward for better confluence tracking.
Signals: Enables or disables gap-fill signal markers.
Visualization & Display
Bullish FVGs: Appear in blue-tinted boxes, indicating potential demand-side inefficiencies.
Bearish FVGs: Appear in red-tinted boxes, representing potential supply-side inefficiencies.
Overlapping zones are merged automatically to maintain clarity.
Filled gaps remain visible for historical context, allowing for post-event analysis.
Optional signal arrows display when price returns to rebalance an FVG.
Use Cases
Identify institutional inefficiencies and liquidity voids.
Detect premium and discount levels in trending markets.
Combine with market structure or order block indicators for confluence.
Track when price rebalances inefficiencies to refine entry/exit points.
Build FVG-based algorithmic strategies that rely on structural imbalance resolution.
Limitations & Recommendations
The indicator detects structural imbalances but does not predict future direction or guarantee profitability.
Volume filters may behave differently across brokers due to data-source differences.
Use alongside structure or liquidity tools for enhanced decision-making.
Extreme volatility or illiquid assets may generate temporary invalid gaps.
Markets & Timeframes
Compatible with all markets (crypto, forex, equities, indices, futures) and all timeframes. Recommended for multi-timeframe confluence analysis — e.g., detecting higher-timeframe FVGs and refining lower-timeframe entries.
Author & Access
Developed 100% by Quantura. Published as a Open-source script indicator. Access is free.
Compliance Note
This description adheres fully to TradingView’s House Rules and Script Publishing Requirements . It provides a detailed explanation of originality, core logic, limitations, and appropriate use — with no unrealistic or misleading performance claims.
Quantura - Average Intraday Candle VolumeIntroduction
“Quantura – Average Intraday Candle Volume” is a quantitative visualization tool that calculates and displays the average traded volume for each intraday time position based on a user-defined historical lookback period. It allows traders to analyze recurring intraday volume patterns, identify high-activity sessions, and detect liquidity shifts throughout the trading day.
Originality & Value
This indicator goes beyond standard volume averages by normalizing and aligning volume data according to the time of day. Instead of simply smoothing recent bars, it builds an intraday volume profile based on historical daily averages, enabling users to understand when during the day volume typically peaks or drops.
Its originality and usefulness come from:
Converting standard volume data into time-aligned intraday averages.
Visualization of historical intraday liquidity behavior, not just total daily volume.
Dynamic scaling using normalization and transparency to emphasize active and quiet periods.
Optional day-separator lines for precise intraday structure recognition.
Gradient-based coloring for better visual interpretation of volume intensity.
Functionality & Core Logic
The indicator divides each day into discrete intraday time positions (based on chart timeframe).
For each position, it stores and updates historical volume values across the selected number of days.
It calculates an average volume per time position by aggregating all stored values and dividing them by the number of valid days.
The result is plotted as a continuous histogram showing typical intraday volume distribution.
The bar colors and transparency dynamically reflect the relative intensity of volume at each point in the day.
Parameters & Customization
Number of Days for Averaging: Defines how many past days are included in the volume average calculation (default: 365).
UTC Offset: Allows synchronization of intraday cycles with local or exchange time zones.
Base Color: Sets the main color for plotted volume columns.
Color Mode: Choose between “Gradient” (transparency dynamically adjusts by intensity) or “Normal” (fixed opacity).
Day Line: Toggles dashed vertical lines marking the start of each trading day.
Visualization & Display
Volume is plotted as a series of histogram bars, each representing the average volume for a specific intraday time position.
A gradient color mode enhances readability by fading lower-intensity areas and highlighting high-volume regions.
Optional day-separator lines visually segment historical sessions for easy reference.
Works seamlessly across all chart timeframes that divide the 24-hour day into regular bar intervals.
Use Cases
Identify when trading activity typically peaks (e.g., session opens, news windows, or overlapping markets).
Compare current intraday volume to historical averages for early anomaly detection.
Enhance algorithmic or discretionary strategies that depend on volume-timing alignment.
Combine with volatility or price structure indicators to confirm market activity zones.
Evaluate session consistency across different time zones using the UTC offset parameter.
Limitations & Recommendations
The indicator requires intraday data (below 1D resolution) to function properly.
Volume behavior may vary across brokers and assets; adjust averaging period accordingly.
Does not predict price movement — it provides volume-based context for analysis.
Works best when combined with structure or momentum-based indicators.
Markets & Timeframes
Compatible with all intraday markets — including crypto, Forex, equities, and futures — and all intraday timeframes (from 1 minute to 4 hours). It is particularly valuable for analyzing assets with continuous 24-hour trading activity.
Author & Access
Developed 100% by Quantura. Published as a Open-source script indicator. Access is free.
Important
This description complies with TradingView’s Script Publishing and House Rules. It provides a clear explanation of the indicator’s originality, logic, and purpose, without any unrealistic performance or predictive claims.
无敌大饺子缺口Indicator Name:Dumpling Price Action Gaps (Price Action Gaps)
Type: Price Action Indicator / Technical Analysis Tool
Applicable Markets: Stocks, Futures, Forex, Cryptocurrencies, and other charting markets
Timeframe: Any timeframe; supports multi-timeframe EMA smoothing
Indicator Overview
This indicator is a visual analysis tool based on Price Action and Fair Value Gaps (FVGs). It automatically identifies bullish and bearish gaps in the market, helping traders spot potential support and resistance areas, gap fill opportunities, and market sentiment turning points.
By combining EMA (Exponential Moving Average) and ATR (Average True Range) filtering, the indicator clearly plots on the chart:
Bullish Gaps: Highlight rapid upward price gaps.
Bearish Gaps: Highlight rapid downward price gaps.
Mitigation Zones: Mark areas where gaps are likely to be filled, assisting in judging potential price retracements.
Historical Gaps: Optionally display past gaps for multi-timeframe analysis.
Smoothed EMA20: Provides both current and multi-timeframe trend references to make gap analysis more reliable.
Key Features
Intelligent Gap Detection: Automatically identifies gap types by comparing the high and low of the current bar with the previous two bars.
Fair Value Filtering: Uses ATR to filter out insignificant gaps, reducing noise.
Visual Gap Fill Percentage: Displays the percentage of gap fill, helping traders gauge the strength of retracement.
Multi-Timeframe Smoothing: Supports current and 5-minute smoothed EMA to capture short-term trend impacts.
Flexible Across Timeframes: Suitable for intraday or swing trading strategies.
Use Cases
Support/Resistance Identification: Gap tops and bottoms can act as potential support or resistance levels.
Trend Continuation Confirmation: If price breaks through a gap without filling it, the trend is likely to continue.
Retracement Strategy: Gap fill zones can serve as potential entry or exit points for short-term trades.
Risk Management: Historical gaps help identify high-risk zones, optimizing stop-loss placement.
中文:
指标介绍
指标名称:无敌大饺子价格行为缺口(Dumpling Price Action Gaps)
类型:价格行为指标 / 技术分析工具
适用市场:股票、期货、外汇、加密货币等各类K线图市场
周期适用:任意时间周期,指标支持跨周期 EMA 平滑显示
功能概述
是一种基于价格行为(Price Action)和公允价值缺口(Fair Value Gap, FVG)的可视化分析工具。它通过自动识别市场中的看涨和看跌缺口,帮助交易者发现潜在的支撑与阻力区域、回补机会以及市场情绪转折点。
该指标结合了 EMA(指数移动平均)和 ATR(平均真实波幅)过滤,能够在图表上清晰绘制出:
看涨缺口(Bullish Gap):显示市场快速上涨形成的价格缺口。
看跌缺口(Bearish Gap):显示市场快速下跌形成的价格缺口。
回补区域(Mitigation Zone):标记缺口可能被回补的区域,辅助判断价格回调的概率。
历史缺口(Historical Gaps):可选择显示历史上形成的缺口,便于进行多周期分析。
平滑 EMA20(Smoothed EMA20):提供当前周期和跨周期的趋势参考,使缺口分析更加可靠。
核心特点
智能缺口识别:通过比较当前 K 线与前两根 K 线的高低价,自动判断缺口类型。
公允价值过滤:结合 ATR 值过滤掉微小缺口,避免噪音干扰。
可视化百分比显示:支持显示缺口回补的百分比,让交易者直观判断回补强弱。
跨周期平滑:可显示当前周期和平滑 5 分钟 EMA,帮助捕捉短期趋势与缺口冲击。
多周期适用:支持不同时间周期图表,可灵活应用于日内交易或波段策略。
使用场景
支撑/阻力判断:缺口上沿和下沿可以作为潜在支撑或阻力区域。
趋势延续确认:价格突破缺口并未回补时,表明趋势可能继续延续。
回调策略:当价格回补缺口至回补区域时,可作为短线交易的进出参考。
风险管理:历史缺口帮助交易者识别潜在高风险区域,优化止损设置。
MACD Remastered [CHE]MACD Remastered — Robust MACD with confirmed pivot-based divergence, optional signal bands, and ready-to-use alerts.
Summary
This indicator augments classic MACD with a robust, confirmed pivot-based divergence engine and an optional signal channel using Bollinger Bands. Divergence signals are only produced after a pivot is confirmed, which reduces noise from transient swings. A line-of-sight clearance check filters cases where the MACD histogram path contradicts the divergence, further cutting false flags. Histogram coloring clarifies momentum changes, while optional triangles project the same signals onto the main chart for quick context.
Motivation: Why this design?
Standard MACD divergence tools tend to fire early in volatile phases and flip during consolidation. The core idea here is to delay decision points until a pivot is confirmed and to validate the path between pivots. This addresses fake flips and improves signal credibility at the cost of some latency. Optional bands around the Signal line add context about compression and expansion without altering MACD’s core behavior.
What’s different vs. standard approaches?
Reference baseline: Classical MACD (fast and slow moving averages, Signal line, histogram) with simple divergence checks.
Architecture differences:
Confirmed pivot logic with left and right bars.
Line-of-sight clearance test across the histogram path between pivots.
Optional Signal-line Bollinger Bands with configurable length and width.
Composite “Any Divergence” alert plus separate regular and hidden alerts.
Optional main-chart triangles using forced overlay for at-a-glance context.
Practical effect: Fewer early or contradictory divergence signals, clearer momentum context via histogram colors and a visible Signal channel during compression and expansion.
How it works (technical)
The MACD line derives from a fast and a slow moving average on a chosen source. The Signal line smooths the MACD line using a selected moving average type and length. The histogram is the difference between MACD and Signal and is colored by direction and acceleration.
Divergence uses confirmed pivots: a pivot forms only after a set number of bars on the right side, so the event is locked in. The engine retrieves the last two relevant pivots and checks price movement versus the MACD histogram movement to classify regular or hidden divergence. A line-of-sight clearance routine traverses the histogram path between the two pivots and rejects the signal if the path invalidates the directional relationship. When enabled, Bollinger Bands are plotted around the Signal line; width scales with standard deviation. Programmatic alerts fire only on confirmed bars. No higher-timeframe requests are used.
Parameter Guide
Oscillator MA Type — Sets fast and slow MA family for MACD. Default: EMA. Tip: EMA is more responsive; SMA is steadier.
Fast Length — Fast MA period. Default: 12. Trade-off: Shorter is quicker but noisier.
Slow Length — Slow MA period. Default: 26. Trade-off: Longer reduces noise but adds lag.
Source — Price input. Default: Close. Tip: Use a stable source for consistency.
Signal MA Type — Moving average family for Signal. Default: EMA.
Signal Length — Smoothing of MACD into Signal. Default: 9. Trade-off: Longer smooths more, reacts slower.
Calculate Divergence — Enables divergence engine. Default: True.
Enable Bollinger Bands on Signal — Adds bands around Signal. Default: False.
BB Length — Sampling window for bands. Default: 20. Active: Only when bands are enabled.
BB StdDev — Band width in standard deviations. Default: 2.0. Bounds: between about zero point zero zero one and fifty.
Pivot Left / Pivot Right — Bars to the left and right that define a confirmed pivot. Default: five and five. Trade-off: Larger values mean stronger but slower pivots.
Min / Max Bars Between Pivots — Valid window between two pivots. Default: five and sixty. Tip: Increase minimum to reduce micro-divergences.
Detect Hidden — Include hidden divergence. Default: True.
Draw Lines — Draw connector lines on the MACD pane. Default: True.
Alerts: Enable / Regular / Hidden / Frequency / Prefix — Control alert emission, categories, cadence, and label. Defaults: Enabled, both categories on, once per bar close, prefix “MACD RM”.
Reading & Interpretation
Histogram: Columns above zero reflect positive momentum; below zero reflect negative momentum. Color shifts indicate momentum increasing or decreasing within each side.
MACD and Signal: Crosses and distance indicate momentum shifts and strength. When bands are enabled, touches and departures hint at compression and expansion around the Signal.
Divergence: Solid green lines and labels indicate regular bullish; solid red indicate regular bearish. Dashed teal and dashed orange denote hidden bullish and hidden bearish. Triangles on the main chart mirror these events for quicker visibility.
Practical Workflows & Combinations
Trend following: Use histogram color transitions with a structure filter such as higher highs and higher lows for long bias, or lower highs and lower lows for short bias. Divergence against the prevailing structure suggests caution or partial exits.
Exits and risk: In a long, regular bearish divergence near resistance can justify scaling out or tightening stops. Hidden divergence in the trend direction can support continuation but should not replace risk controls.
Multi-asset / Multi-timeframe: Works across liquid futures, forex, indices, and large-cap equities. Start with defaults on four-hour and daily; shorten lengths on intraday only when liquidity is strong.
Behavior, Constraints & Performance
Repaint and confirmation: Signals are anchored only after the right-side pivot bars complete; alerts trigger on confirmed bars. This intentionally adds latency to reduce noise.
No higher-timeframe requests: No `security` calls are used; repaint risk is primarily tied to live bars before confirmation.
Resources: Declared `max_bars_back` is five hundred. The divergence path check iterates between pivots, bounded by the maximum bars parameter. Line objects may accumulate; limits are set for lines and labels.
Known limits: Latency at sharp turns, potential misses during fast single-bar reversals, and sensitivity to extremely choppy sessions if minimum gap between pivots is set too low.
Sensible Defaults & Quick Tunin g
Starting point: EMA, twelve and twenty-six with Signal nine; pivots five and five; minimum five, maximum sixty; alerts on close; bands off.
Too many flips: Increase Signal length, raise pivot counts, and increase minimum bars between pivots. Consider disabling hidden divergence.
Too sluggish: Reduce pivot counts, lower Signal length, and enable bands to visualize early compression.
Cluttered chart: Keep lines off and rely on labels and main-chart triangles. Use the alert prefix to route events cleanly.
What this indicator is—and isn’t
This is a visualization and signal layer for MACD with confirmed, path-checked divergence and optional Signal bands. It is not a trading system, not predictive, and not a position management framework. Use it together with structure analysis, liquidity context, and explicit risk controls.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
Ultimate Scalping IndicatorOverview
The Confluence Signal Indicator is a precision-built scalping tool designed to identify high-probability reversal points in the market.
It combines three core technical elements:
Trend
Mean reversion
Momentum
into a single, efficient system.
By filtering out weak RSI signals and focusing only on setups that align with trend direction and recent momentum shifts, this indicator delivers cleaner and more accurate short-term trade signals.
Core Components
200-Period Moving Average (MA200, 5-Minute Timeframe)
The MA200 is always calculated from the 5-minute chart, regardless of your current timeframe. It defines the macro trend direction and ensures that all trades align with the prevailing momentum.
Session VWAP (Volume-Weighted Average Price)
The VWAP tracks the real-time average price weighted by volume for the current trading session. It acts as a dynamic mean-reversion level and helps identify key areas of institutional activity and short-term balance.
RSI (Relative Strength Index)
The indicator uses a standard 14-period RSI to detect overbought and oversold market conditions.
A “recency filter” is added to ensure signals only appear when RSI has recently transitioned from strength to weakness or vice versa, reducing false signals in trending markets.
Signal Logic
Bullish Signal (Green Arrow)
A bullish reversal signal is plotted below a candle when:
Price is above both the 5-minute MA200 and the Session VWAP.
RSI is oversold (below 30).
The last time RSI was above 50 occurred within the last 10 candles before going oversold.
This ensures that the dip is a fresh pullback within an uptrend, not a prolonged oversold condition.
Bearish Signal (Red Arrow)
A bearish reversal signal is plotted above a candle when:
Price is below both the 5-minute MA200 and the Session VWAP.
RSI is overbought (above 70).
The last time RSI was below 50 occurred within the last 10 candles before going overbought.
This ensures that the overbought reading follows a recent move from weakness, identifying potential short entries in a downtrend.
Recommended Usage
This is a scalping-focused indicator, intended for use on timeframes of 5 minutes or lower. Therefore I would highly recommend to use it on Equity futures trading, such as NQ!, ES!, GC! and so on.
It performs best when combined with additional tools such as support and resistance zones, order blocks, or liquidity levels for context.
Avoid counter-trend signals unless confirmed by price structure or volume behavior.
Apebox COTversion 0.1, pine script 6
dependency: Tradingview cotlib/4
shows the Commitments of Traders (COT) **legacy** report data as published by the CFTC, in absolute value or as a percentage of the OI.
A simple tool, mostly untested.






















