OPEN-SOURCE SCRIPT
Leviatan CVD - Aggression and Divergence

Technical Description and Methodology:
The Leviatã CVD (Cumulative Volume Delta) is an institutional-grade tool designed to track market aggression (Market Orders) by estimating the delta within each price bar. Since standard data feeds often lack tick-by-tick delta, this script uses an Intrabar Pressure Proxy based on the following mathematical logic:
1. Delta Calculation: It calculates the relative position of the Close within the High-Low range to estimate the balance of power.
Formula: ((Close - Low) - (High - Close)) / (High - Low) * Volume
2. Cumulative Accumulation: The delta is accumulated throughout the session. The user can choose to reset the values at the start of each daily session (ta.change(time("D"))).
3. Signal Line: A 21-period Simple Moving Average (SMA) is applied to the CVD to identify momentum shifts.
4. Divergence Engine: The script automatically detects "Hidden Whales" by finding divergences between Price and CVD:
*. Bullish Div: Price makes a lower low while CVD makes a higher low (Aggressive Buying).
*. Bearish Div: Price makes a higher high while CVD makes a lower high (Aggressive Selling).
How to use:
*. Green Columns: Buying Aggression.
*. Red Columns: Selling Aggression.
*. Optimized for Pine Script v6.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
🔱 LeviatanSignals® — automação de fluxo institucional (SMC) para Binance e MEXC Futures. Vídeos, app e mais: leviatansignals.com.br/
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
🔱 LeviatanSignals® — automação de fluxo institucional (SMC) para Binance e MEXC Futures. Vídeos, app e mais: leviatansignals.com.br/
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.