COT disaggregatedCFTC COT data is exported by quandl.com to tradingview
COT@quandl:
www.quandl.com
COT@tradingview
www.tradingview.com
How to use this script:
Select and load CFTC COT data for the commodity ticker in the chart
Will by default take current ticker, or allow to avvverride it with another
Traders' categories are those for commodities , not financial futs
Select And Configure :
-categories to be plotted
-Futures/Futures+Options
-by num_contracts/percent
-plot "Tot Spreads %" selection (only when also "Show as % of OI" selected)
will plot the total of spreads positions across all categories
This script supercedes my other "MY_ CFTC GC/SI/CL (Disaggregated)" script
Just changed name
Tìm kiếm tập lệnh với "Futures"
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:
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.
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 Sclaping 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.
Normalized EFINormalized EFI (nEFI)
The Normalized EFI (nEFI) is a volume-weighted momentum oscillator that refines the classic Elder Force Index (EFI) by normalizing it against average trading volume. This makes it highly adaptable across different assets, timeframes, and market conditions—especially useful when comparing momentum strength between low- and high-volume instruments.
How It Works:
Relative Price Change: Measures the percentage change in price from the prior bar:
(Close - Close ) / Close
Volume Normalization: Divides current volume by its EMA (default: 30 periods) to create a relative volume factor:
Volume / EMA(Volume, 30)
Normalized Force: Combines the two:
nEFI_raw = PriceChange% × RelativeVolume × 100
Smoothing: Applies an EMA (default: 13 periods) to reduce noise and highlight meaningful trends.
Key Features & Inputs:
Smoothing Length (default: 13): Controls responsiveness of the EMA smoothing.
Volume EMA Length (default: 30): Sets the lookback for volume normalization—longer values create a more stable baseline.
Zero Line Centered: Positive values indicate buying pressure; negative values show selling pressure.
How to Use:
Trend Confirmation: Rising nEFI above zero supports bullish trends; falling below zero confirms bearish moves.
Divergences: Look for price making new highs/lows while nEFI fails to follow — often signals reversal.
Zero Line Crossovers: Cross above zero = potential buy signal; cross below = sell signal.
Extreme Readings: Spikes far from zero may indicate overbought/oversold conditions or climax moves.
Advantages:
Volume-Adaptive: Unlike raw EFI, nEFI scales properly across assets with vastly different volume profiles (e.g., stocks vs. crypto).
Consistent Scaling: Values are intuitive and comparable over time and across symbols.
Reduced Noise: EMA smoothing filters out erratic volume spikes common in illiquid markets.
Cross-Market Friendly: Works reliably on forex, futures, stocks, and crypto without manual recalibration.
Ideal for:
Swing traders, momentum strategies, and multi-asset analysis seeking a clean, interpretable measure of volume-adjusted price force.
XAutoTrade Alert Builder v1.1Automate Your NinjaTrader Trading with TradingView Alerts
The XAutoTrade Alert Builder is a flexible Pine Script strategy that bridges TradingView alerts with
NinjaTrader automated trading. Design custom entry signals, configure exit strategies, and execute trades
automatically on your NinjaTrader account - all from TradingView charts.
Key Features
📊 Flexible Signal Logic
- Configure buy/sell signals independently
- Compare any two indicators or price sources using crossover, crossunder, greater than, or less than
logic
- Visual buy/sell markers on chart for easy signal verification
🎯 Multiple Exit Methods
1. ATM Strategy - Leverage your existing NinjaTrader ATM templates for advanced order management
2. Source Signals - Exit positions based on opposite entry signals
3. Fixed Levels - Set stop loss and profit targets using ticks or percentage
⚙️ NinjaTrader Integration
- Direct webhook integration with XAutoTrade backend service
- Multi-account support (trade multiple accounts simultaneously)
- Position sizing and max position limits
- Market or limit order types with configurable offset
- Time-in-force options (DAY/GTC)
- Active hours filter (US ET timezone) to control when alerts execute
🔐 Secure & Reliable
- Webhook secret authentication
- Symbol override capability
- Real-time status indicator showing configuration readiness
How It Works
1. Configure Entry Signals - Choose your buy/sell logic by comparing any two data sources (price,
indicators, etc.)
2. Set Exit Strategy - Select ATM templates, signal-based exits, or fixed stop/profit levels
3. Connect to NinjaTrader - Enter your XAutoTrade webhook secret and account details
4. Create Alert - Use the strategy's alert system to send formatted JSON payloads to your XAutoTrade
webhook
5. Trade Futures & Stocks Automatically - TradingView alerts trigger real trades in your NinjaTrader account
Perfect For
- Traders wanting to automate TradingView strategies in NinjaTrader
- Users with existing ATM templates who want TradingView signal automation
- Multi-account traders managing several NinjaTrader accounts
- Anyone seeking a no-code bridge between TradingView and NinjaTrader
Requirements
- Active XAutoTrade account and subscription
- NinjaTrader 8 with XAutoTrade AddOn installed
- TradingView Premium/Pro account (for webhook alerts)
Documentation & Support
Full setup guide and API reference available at:
xautotrade.com/docs/api-reference/order-actions
License: Mozilla Public License 2.0
---
Note: This strategy is designed for use with the XAutoTrade automation service. A valid XAutoTrade
subscription and NinjaTrader setup is required for live trading functionality.
Mean Reversion Indicator — Buy the (DCA) Dip Signal (unbiased)Description
The Mean Reversion Signal — Buy the Dip (unbiased) indicator is designed to detect high-probability reversion points within Bitcoin’s cyclical market structure. These signals only appear when momentum has either fully reset on the Stochastic RSI (SRSI) or when a positive momentum reversal is beginning to form.
It combines 6H Relative Strength Index (RSI) data with 2-Week Stochastic RSI (SRSI) dynamics to identify exhaustion and early accumulation phases.
Core logic:
A buy signal appears when the 6H RSI closes below 30, indicating local oversold conditions.
The 2W Stochastic RSI confirms momentum alignment when both K & D are below 20 (deep oversold), above 80 (strong ongoing rally), or when K crosses above D (positive reversal).
The indicator is cycle-aware — active only after a defined date (e.g., 2023-01-01) to ensure it aligns with current market structure and avoids noise from pre-cycle conditions.
Additionally, green signals from previous bull cycles (e.g., 2015, 2019, 2020) are also displayed to highlight historically similar accumulation phases, allowing for cross-cycle comparison.
Color zones:
🟩 High probability of a durable new rally
🟧 Moderate probability zone
🔴 Momentum already extended; potential continuation but weaker signal
Recommended combinations:
For a deeper confirmation framework, this signal pairs well with:
- CoinGlass: Derivatives Risk Index Chart (to assess market (de)leveraging and derivatives pressure)
- BTC Futures Sentiment Index (Axel Adler Jr.) — (to monitor directional sentiment shifts)
- CheckonChain: Bitcoin — Short-Term Holder SOPR (to track realized profit-taking activity)
- CheckonChain: Bitcoin — Short-Term Holder MVRV (to evaluate valuation risk relative to cost basis)
Use case:
This tool helps traders identify favorable mean-reversion opportunities while considering broader cycle context and momentum structure.
It is not financial advice — best used alongside macro structure analysis, derivatives positioning, and on-chain behavior for comprehensive decision-making.






















