OPEN-SOURCE SCRIPT
Order Flow System [v6]

What it does overall
It's a separate panel indicator that sits below your price chart and tracks who is in control of the market — buyers or sellers — on every single bar using volume analysis and smart money concepts.
1. Buy/Sell Volume Estimation
Since Pine Script can't see actual tick data, it estimates which side was more aggressive on each bar. If price closed near the high, most volume was likely buying. If it closed near the low, most was selling. The formula splits the bar's total volume proportionally based on where price closed within the high/low range.
2. Bar Delta Histogram
The difference between estimated buy volume and sell volume on each bar. Green bars mean buyers were more aggressive, red bars mean sellers were. The taller the bar, the stronger the imbalance between the two sides.
3. Cumulative Delta (CVD)
It adds up every bar's delta over time into a running total. This line shows you the overall trend of buying vs selling pressure across the session. When CVD is rising, buyers are consistently in control. When it's falling, sellers are. The EMA of CVD acts as a signal line — when CVD crosses above it that's bullish, below is bearish.
4. Volume Imbalance
When buyers dominate more than 60% of a bar's volume the background flashes green. When sellers dominate more than 60% it flashes red. This highlights bars where one side completely overwhelmed the other.
5. Large Print Detection
When a bar's volume is significantly larger than the 20-bar average, it gets labeled. These are institutional-sized prints — someone placed a very large order. The label shows the volume size and whether it was net buying or selling.
6. Absorption Detection
This is one of the more powerful signals. It looks for situations where a large amount of selling is happening but price refuses to go down — or large buying but price won't go up. That means the opposing side is quietly absorbing all those orders, which often precedes a reversal.
7. SMT Divergence
Compares your chart's swing highs and lows against a correlated market like NQ vs ES. If ES makes a new low but NQ doesn't confirm it, smart money likely didn't participate in that move — signaling the low may be fake and a reversal is coming. Same logic in reverse for highs. A dashed line connects the two swing points and a label marks the signal.
8. Dashboard Table
A live readout in the top right corner showing Bar Delta, Cumulative Delta, Buy%, Sell%, Volume, CVD Signal, SMT Signal, and which symbol it's comparing against. All colors are fully customizable in the settings.
9. Alerts
Ten alert conditions covering every major signal — large prints, imbalance, absorption, CVD crossovers, and both SMT directions — so you can get notified without watching the screen.
It's a separate panel indicator that sits below your price chart and tracks who is in control of the market — buyers or sellers — on every single bar using volume analysis and smart money concepts.
1. Buy/Sell Volume Estimation
Since Pine Script can't see actual tick data, it estimates which side was more aggressive on each bar. If price closed near the high, most volume was likely buying. If it closed near the low, most was selling. The formula splits the bar's total volume proportionally based on where price closed within the high/low range.
2. Bar Delta Histogram
The difference between estimated buy volume and sell volume on each bar. Green bars mean buyers were more aggressive, red bars mean sellers were. The taller the bar, the stronger the imbalance between the two sides.
3. Cumulative Delta (CVD)
It adds up every bar's delta over time into a running total. This line shows you the overall trend of buying vs selling pressure across the session. When CVD is rising, buyers are consistently in control. When it's falling, sellers are. The EMA of CVD acts as a signal line — when CVD crosses above it that's bullish, below is bearish.
4. Volume Imbalance
When buyers dominate more than 60% of a bar's volume the background flashes green. When sellers dominate more than 60% it flashes red. This highlights bars where one side completely overwhelmed the other.
5. Large Print Detection
When a bar's volume is significantly larger than the 20-bar average, it gets labeled. These are institutional-sized prints — someone placed a very large order. The label shows the volume size and whether it was net buying or selling.
6. Absorption Detection
This is one of the more powerful signals. It looks for situations where a large amount of selling is happening but price refuses to go down — or large buying but price won't go up. That means the opposing side is quietly absorbing all those orders, which often precedes a reversal.
7. SMT Divergence
Compares your chart's swing highs and lows against a correlated market like NQ vs ES. If ES makes a new low but NQ doesn't confirm it, smart money likely didn't participate in that move — signaling the low may be fake and a reversal is coming. Same logic in reverse for highs. A dashed line connects the two swing points and a label marks the signal.
8. Dashboard Table
A live readout in the top right corner showing Bar Delta, Cumulative Delta, Buy%, Sell%, Volume, CVD Signal, SMT Signal, and which symbol it's comparing against. All colors are fully customizable in the settings.
9. Alerts
Ten alert conditions covering every major signal — large prints, imbalance, absorption, CVD crossovers, and both SMT directions — so you can get notified without watching the screen.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。