Smart Flow Tracker [The_lurker]
Smart Flow Tracker (SFT): Advanced Order Flow Tracking Indicator
Overview
Smart Flow Tracker (SFT) is an advanced indicator designed for real-time tracking and analysis of order flows. It focuses on detecting institutional patterns, massive orders, and potential reversals through analysis of lower timeframes (Lower Timeframe) or live ticks. It provides deep insights into market behavior using a multi-layered intelligent detection system and a clear visual interface, giving traders a competitive edge.
SFT focuses on trade volumes, directions, and frequencies to uncover unusual activity that may indicate institutional intervention, massive orders, or manipulation attempts (traps).
Indicator Operation Levels
SFT operates on three main levels:
1. Microscopic Monitoring: Tracks every trade at precise timeframes (down to one second), providing visibility not available in standard timeframes.
2. Advanced Statistical Analysis: Calculates averages, deviations, patterns, and anomalies using precise mathematical algorithms.
3. Behavioral Artificial Intelligence: Recognizes behavioral patterns such as hidden institutional accumulation, manipulation attempts and traps, and potential reversal points.
Key Features
SFT features a set of advanced functions to enhance the trader's experience:
1. Intelligent Order Classification System: Classifies orders into six categories based on size and pattern:
- Standard: Normal orders with typical size.
- Significant 💎: Orders larger than average by 1.5 times.
- Major 🔥: Orders larger than average by 2.5 times.
- Massive 🐋: Orders larger than average by 3 times.
- Institutional 🏛️: Consistent patterns indicating institutional activity.
- Reversal 🔄: Large orders indicating direction change.
- Trap ⚠️: Patterns that may be price traps.
2. Institutional Patterns Detection: Tracks sequences of similar-sized orders, detects organized institutional activity, and is customizable (number of trades, variance ratio).
3. Reversals Detection: Compares recent flows with previous ones, detects direction shifts from up to down or vice versa, and operates only on large orders (Major/Massive/Institutional).
4. Traps Detection: Identifies sequences of large orders in one direction, followed by an institutional order in the opposite direction, with early alerts for false moves.
5. Flow Delta Bar: Displays the difference between buy and sell volumes as a percentage for balance, with instant updates per trade.
6. Dynamic Statistics Panel: Displays overall buy and sell ratios with real-time updates and interactive colors.
How It Works and Understanding
SFT relies on logical sequential stages for data processing:
A. Data Collection: Uses the `request.security_lower_tf()` function to extract data from a lower timeframe (like 1S) even on a higher timeframe (like 5D). For each time unit, it calculates:
- Adjusted Volume: Either normal volume or "price-weighted volume" (hlc3 * volume) based on user choice.
- Trade Direction: Compared to previous close (rise → buy, fall → sell).
B. Building Temporary Memory: Maintains a dynamic list (sizeHistory) of the last 100 trade sizes, continuously calculating the moving average (meanSize).
C. Intelligent Classification: Compares each new trade to the average:
- > 1.5 × average → Significant.
- > 2.5 × average → Major.
- > 3.0 × average → Massive.
- Institutional Patterns Check: A certain number of trades (e.g., 5) with a specified variance ratio (±5%) → Institutional.
D. Advanced Detection:
- Reversal: Compares buy/sell totals in two consecutive periods.
- Trap: Sequence of large trades in one direction followed by an opposite institutional trade.
E. Display and Alerts: Results displayed in an automatically updated table, with option to enable alerts for notable events.
Settings (Fully Customizable)
SFT offers extensive options to adapt to the trader's needs:
A. Display Settings:
- Language: English / Arabic.
- Table Position: 9 options (e.g., Top Right, Middle Right, Bottom Left).
- Display Size: Tiny / Small / Normal / Large.
- Max Rows: 10–100.
- Enable Flow Delta Bar: Yes / No.
- Enable Statistics Panel: Yes / No (displays buy/sell % ratio).
B.- Technical Settings:
- Data Source: Lower Timeframe / Live Tick (simulation).
- Timeframe: Optional (e.g., 1S, 5S, 1).
- Calculation Type: Volume / Price Volume.
C. Intelligent Detection System:
- Enable Institutional Patterns Detection.
- Pattern Length: 3–20 trades.
- Allowed Variance Ratio: 1%–20%.
- Massive Orders Detection Factor: 2.0–10.0.
D. Classification Criteria:
- Significant Orders Factor: 1.2–3.0.
- Major Orders Factor: 2.0–5.0.
E. **Advanced Detection**:
- Enable Reversals Detection (with review period).
- Enable Traps Detection (with minimum sequence limit).
F. Alerts System:
- Enable for each type: Massive orders, institutional patterns, reversals, traps, severe imbalance (60%–90%).
G. Color System: Manual customization for each category:
- Standard Buy 🟢: Dark gray green.
- Standard Sell 🔴: Dark gray red.
- Significant Buy 🟢: Medium green.
- Significant Sell 🔴: Medium red.
- Major Orders 🟣: Purple.
- Massive Orders 🟠: Orange.
- Institutional 🟦: Sky blue.
- Reversal 🔵: Blue.
- Trap 🟣: Pink-purple.
Target Audiences
SFT benefits a wide range of traders and investors:
1. Scalpers: Instant detection of large orders, liquidity points identification, avoiding traps in critical moments.
2. Day Traders: Tracking smart money footprint, determining real session direction, early reversals detection.
3. Swing Traders: Confirming trend strength, detecting institutional accumulation/distribution, identifying optimal entry points.
4. Investors: Understanding true market sentiments, avoiding entry at false peaks, identifying real value zones.
⚠️ Disclaimer:
This indicator is for educational and analytical purposes only. It does not constitute financial, investment, or trading advice. Use it in conjunction with your own strategy and risk management. Neither TradingView nor the developer is liable for any financial decisions or losses.
Smart Flow Tracker (SFT): مؤشر متقدم لتتبع تدفقات الأوامر
نظرة عامة
Smart Flow Tracker (SFT) مؤشر متقدم مصمم لتتبع وتحليل تدفقات الأوامر في الوقت الفعلي. يركز على كشف الأنماط المؤسسية، الأوامر الضخمة، والانعكاسات المحتملة من خلال تحليل الأطر الزمنية الأقل (Lower Timeframe) أو التيك الحي. يوفر رؤية عميقة لسلوك السوق باستخدام نظام كشف ذكي متعدد الطبقات وواجهة مرئية واضحة، مما يمنح المتداولين ميزة تنافسية.
يركز SFT على حجم الصفقات، اتجاهها، وتكرارها لكشف النشاط غير العادي الذي قد يشير إلى تدخل مؤسسات، أوامر ضخمة، أو محاولات تلاعب (فخاخ).
مستويات عمل المؤشر
يعمل SFT على ثلاثة مستويات رئيسية:
1. المراقبة المجهرية: يتتبع كل صفقة على مستوى الأطر الزمنية الدقيقة (حتى الثانية الواحدة)، مما يوفر رؤية غير متوفرة في الأطر الزمنية العادية.
2. التحليل الإحصائي المتقدم: يحسب المتوسطات، الانحرافات، الأنماط، والشذوذات باستخدام خوارزميات رياضية دقيقة.
3. الذكاء الاصطناعي السلوكي: يتعرف على أنماط سلوكية مثل التراكم المؤسسي المخفي، محاولات التلاعب والفخاخ، ونقاط الانعكاس المحتملة.
الميزات الرئيسية
يتميز SFT بمجموعة من الوظائف المتقدمة لتحسين تجربة المتداول:
1. نظام تصنيف الأوامر الذكي: يصنف الأوامر إلى ست فئات بناءً على الحجم والنمط:
- Standard (قياسي)**: أوامر عادية بحجم طبيعي.
- Significant 💎 (مهم)**: أوامر أكبر من المتوسط بـ1.5 ضعف.
- Major 🔥 (كبير)**: أوامر أكبر من المتوسط بـ2.5 ضعف.
- Massive 🐋 (ضخم)**: أوامر أكبر من المتوسط بـ3 أضعاف.
- Institutional 🏛️ (مؤسسي)**: أنماط متسقة تشير إلى نشاط مؤسسي.
- Reversal 🔄 (انعكاس)**: أوامر كبيرة تشير إلى تغيير اتجاه.
- Trap ⚠️ (فخ)**: أنماط قد تكون فخاخًا سعرية.
2. كشف الأنماط المؤسسية: يتتبع تسلسل الأوامر المتشابهة في الحجم، يكشف النشاط المؤسسي المنظم، وقابل للتخصيص (عدد الصفقات، نسبة التباين).
3. كشف الانعكاسات: يقارن التدفقات الأخيرة بالسابقة، يكشف تحول الاتجاه من صعود إلى هبوط أو العكس، ويعمل فقط على الأوامر الكبيرة (Major/Massive/Institutional).
4. كشف الفخاخ: يحدد تسلسل أوامر كبيرة في اتجاه واحد، يليها أمر مؤسسي في الاتجاه المعاكس، مع تنبيه مبكر للحركات الكاذبة.
5. شريط دلتا التدفق: يعرض الفرق بين حجم الشراء والبيع كنسبة مئوية للتوازن، مع تحديث فوري لكل صفقة.
6. لوحة إحصائيات ديناميكية: تعرض نسبة الشراء والبيع الإجمالية مع تحديث لحظي وألوان تفاعلية.
طريقة العمل والفهم
يعتمد SFT على مراحل منطقية متسلسلة لمعالجة البيانات:
أ. جمع البيانات: يستخدم دالة `request.security_lower_tf()` لاستخراج بيانات من إطار زمني أدنى (مثل 1S) حتى على إطار زمني أعلى (مثل 5D). لكل وحدة زمنية، يحسب:
- الحجم المعدّل: إما الحجم العادي (volume) أو "الحجم المرجّح بالسعر" (hlc3 * volume) حسب الاختيار.
- اتجاه الصفقة: مقارنة الإغلاق الحالي بالسابق (ارتفاع → شراء، انخفاض → بيع).
ب. بناء الذاكرة المؤقتة: يحتفظ بقائمة ديناميكية (sizeHistory) لآخر 100 حجم صفقة، ويحسب المتوسط المتحرك (meanSize) باستمرار.
ج. التصنيف الذكي: يقارن كل صفقة جديدة بالمتوسط:
- > 1.5 × المتوسط → Significant.
- > 2.5 × المتوسط → Major.
- > 3.0 × المتوسط → Massive.
- فحص الأنماط المؤسسية: عدد معين من الصفقات (مثل 5) بنسبة تباين محددة (±5%) → Institutional.
د. الكشف المتقدم:
- الانعكاس: مقارنة مجموع الشراء/البيع في فترتين متتاليتين.
- الفخ: تسلسل صفقات كبيرة في اتجاه واحد يتبعها صفقة مؤسسية معاكسة.
هـ. العرض والتنبيه: عرض النتائج في جدول محدّث تلقائيًا، مع إمكانية تفعيل تنبيهات للأحداث المميزة.
لإعدادات (قابلة للتخصيص بالكامل)
يوفر SFT خيارات واسعة للتكييف مع احتياجات المتداول:
أ. إعدادات العرض:
- اللغة: English / العربية.
- موقع الجدول: 9 خيارات (مثل Top Right, Middle Right, Bottom Left).
- حجم العرض: Tiny / Small / Normal / Large.
- الحد الأقصى للصفوف: 10–100.
- تفعيل شريط دلتا التدفق: نعم / لا.
- تفعيل لوحة الإحصائيات: نعم / لا (تعرض نسبة الشراء/البيع %).
ب. الإعدادات التقنية:
- مصدر البيانات: Lower Timeframe / Live Tick (محاكاة).
- الإطار الزمني: اختياري (مثل 1S, 5S, 1).
- نوع الحساب: Volume / Price Volume.
ج. نظام الكشف الذكي:
- تفعيل كشف الأنماط المؤسسية.
- طول النمط: 3–20 صفقة.
- نسبة التباين: 1%–20%.
- عامل كشف الأوامر الضخمة: 2.0–10.0.
د. معايير التصنيف:
- عامل الأوامر المهمة: 1.2–3.0.
- عامل الأوامر الكبرى: 2.0–5.0.
هـ. الكشف المتقدم:
- تفعيل كشف الانعكاسات (مع فترة مراجعة).
- تفعيل كشف الفخاخ (مع حد أدنى للتسلسل).
و. نظام التنبيهات:
- تفعيل لكل نوع: أوامر ضخمة، أنماط مؤسسية، انعكاسات، فخاخ، عدم توازن شديد (60%–90%).
ز. نظام الألوان**: تخصيص يدوي لكل فئة:
- شراء قياسي 🟢: أخضر رمادي داكن.
- بيع قياسي 🔴: أحمر رمادي داكن.
- شراء مهم 🟢: أخضر متوسط.
- بيع مهم 🔴: أحمر متوسط.
- أوامر كبرى 🟣: بنفسجي.
- أوامر ضخمة 🟠: برتقالي.
- مؤسسي 🟦: أزرق سماوي.
- انعكاس 🔵: أزرق.
- فخ 🟣: وردي-أرجواني.
الفئات المستهدفة
يستفيد من SFT مجموعة واسعة من المتداولين والمستثمرين:
1. السكالبرز (Scalpers): كشف لحظي للأوامر الكبيرة، تحديد نقاط السيولة، تجنب الفخاخ في اللحظات الحرجة.
2. المتداولون اليوميون (Day Traders): تتبع بصمة الأموال الذكية، تحديد اتجاه الجلسة الحقيقي، كشف الانعكاسات المبكرة.
3. المتداولون المتأرجحون (Swing Traders): تأكيد قوة الاتجاه، كشف التراكم/التوزيع المؤسسي، تحديد نقاط الدخول المثلى.
4. المستثمرون: فهم معنويات السوق الحقيقية، تجنب الدخول في قمم كاذبة، تحديد مناطق القيمة الحقيقية.
⚠️ إخلاء مسؤولية:
هذا المؤشر لأغراض تعليمية وتحليلية فقط. لا يُمثل نصيحة مالية أو استثمارية أو تداولية. استخدمه بالتزامن مع استراتيجيتك الخاصة وإدارة المخاطر. لا يتحمل TradingView ولا المطور مسؤولية أي قرارات مالية أو خسائر.
Statistics
Index Weighted Returns [SS]This is the index weighted return indicator.
It supports a few ETFs, including:
SPY/SPX
QQQ/NDX
ARKK
SMH
UFO
XBI
QTUM
What it does is it takes the top, approximately 40, of the most heavily weighted tickers on the ETF, monitors their returns using the request security function, and then uses their weight to calculate the synthetic returns of the ETF of interest.
For example, in the chart we have SMH.
The indicator is looking at the top weighted tickers of SMH, calculating their returns, adjusting it for their individual weight on SMH and then predicting the expected return of SMH based on the weighing and holding's returns themselves.
How to Use it
The indicator is pretty straight forward, you select which ever index you are on and your desired timeframe (you can do as low as 30-Minutes or as high as monthly or quarterly).
The indicator will then retrieve the top holdings for that ticker, their corresponding weights and calculate the expected daily return based on the weight and return of these tickers.
It will plot this return for you on the chart.
Other Options
There is an optional table for you to view the actual weight, ticker composition and period returns for each of the top x tickers for an index. You can simply toggle "Show Table" in the settings menu, and it will show you the list of all tickers included, their period returns and their weight on the ETF.
Tips for Use
Works well to see when an index may be over the actual top weighted tickers, implying a pullback/sell, or under. For example:
SPY today fell well below its top tickers and is currently rallying back up to the expected close range.
You can see in the primary chart, SMH fell below and returned to its balance, being at the expected close range based on its component tickers.
That is the indicator!
Its simple but powerful!
Hope you enjoy and as always, safe trades!
super trader Prosuper trader Pro
super trader Pro
super trader Pro
super trader Pro
super trader Pro
Full Floating Dashboard YUJiDisplay information on top right corner.
Info shown:
High and Low
Current Price
24 Hour Change
Risk & Position DashboardRisk & Position Dashboard
Overview
The Risk & Position Dashboard is a comprehensive trading tool designed to help traders calculate optimal position sizes, manage risk, and visualize potential profit/loss scenarios before entering trades. This indicator provides real-time calculations for position sizing based on account size, risk percentage, and stop-loss levels, while displaying multiple take-profit targets with customizable risk-reward ratios.
Key Features
Position Sizing & Risk Management:
Automatic position size calculation based on account size and risk percentage
Support for leveraged trading with maximum leverage limits
Fractional shares support for brokers that allow partial share trading
Real-time fee calculation including entry, stop-loss, and take-profit fees
Break-even price calculation including trading fees
Multi-Target Profit Management:
Support for up to 3 take-profit levels with individual portion allocations
Customizable risk-reward ratios for each take-profit target
Visual profit/loss zones displayed as colored boxes on the chart
Individual profit calculations for each take-profit level
Visual Dashboard:
Clean, customizable table display showing all key metrics
Configurable label positioning and styling options
Real-time tracking of whether stop-loss or take-profit levels have been reached
Color-coded visual zones for easy identification of risk and reward areas
Advanced Configuration:
Comprehensive input validation and error handling
Support for different chart timeframes and symbols
Customizable colors, fonts, and display options
Hide/show individual data fields for personalized dashboard views
How to Use
Set Account Parameters: Configure your account size, maximum risk percentage per trade, and trading fees in the "Account Settings" section.
Define Trade Setup: Use the "Entry" time picker to select your entry point on the chart, then input your entry price and stop-loss level.
Configure Take Profits: Set your desired risk-reward ratios and portion allocations for each take-profit level. The script supports 1-3 take-profit targets.
Analyze Results: The dashboard will automatically calculate and display position size, number of shares, potential profits/losses, fees, and break-even levels.
Visual Confirmation: Colored boxes on the chart show profit zones (green) and loss zones (red), with lines extending to current price levels.
Reset Entry and SL:
You can easily reset the entry and stop-loss by clicking the "Reset points..." button from the script's "More" menu.
This is useful if you want to quickly clear your current trade setup and start fresh without manually adjusting the points on the chart.
Calculations
The script performs sophisticated calculations including:
Position size based on risk amount and price difference between entry and stop-loss
Leverage requirements and position amount calculations
Fee-adjusted risk-reward ratios for realistic profit expectations
Break-even price including all trading costs
Individual profit calculations for partial position closures
Detailed Take-Profit Calculation Formula:
The take-profit prices are calculated using the following mathematical formula:
// Core variables:
// risk_amount = account_size * (risk_percentage / 100)
// total_risk_per_share = |entry_price - sl_price| + (entry_price * fee%) + (sl_price * fee%)
// shares = risk_amount / total_risk_per_share
// direction_factor = 1 for long positions, -1 for short positions
// Take-profit calculation:
net_win = total_risk_per_share * shares * RR_ratio
tp_price = (net_win + (direction_factor * entry_price * shares) + (entry_price * fee% * shares)) / (direction_factor * shares - fee% * shares)
Step-by-step example for a long position (based on screenshot):
Account Size: 2,000 USDT, Risk: 2% = 40 USDT
Entry: 102,062.9 USDT, Stop Loss: 102,178.4 USDT, Fee: 0.06%
Risk per share: |102,062.9 - 102,178.4| + (102,062.9 × 0.0006) + (102,178.4 × 0.0006) = 115.5 + 61.24 + 61.31 = 238.05 USDT
Shares: 40 ÷ 238.05 = 0.168 shares (rounded to 0.17 in display)
Position Size: 0.17 × 102,062.9 = 17,350.69 USDT
Position Amount (with 9x leverage): 17,350.69 ÷ 9 = 1,927.85 USDT
For 2:1 RR: Net win = 238.05 × 0.17 × 2 = 80.94 USDT
TP1 price = (80.94 + (1 × 102,062.9 × 0.17) + (102,062.9 × 0.0006 × 0.17)) ÷ (1 × 0.17 - 0.0006 × 0.17) = 101,464.7 USDT
For 3:1 RR: TP2 price = 101,226.7 USDT (following same formula with RR=3)
This ensures that after accounting for all fees, the actual risk-reward ratio matches the specified target ratio.
Risk Management Features
Maximum Trade Amount: Optional setting to limit position size regardless of account size
Leverage Limits: Built-in maximum leverage protection
Fee Integration: All calculations include realistic trading fees for accurate expectations
Validation: Automatic checking that take-profit portions sum to 100%
Historical Tracking: Visual indication when stop-loss or take-profit levels are reached (within last 5000 bars)
Understanding Max Trade Amount - Multiple Simultaneous Trades:
The "Max Trade Amount" feature is designed for traders who want to open multiple positions simultaneously while maintaining proper risk management. Here's how it works:
Key Concept:
- Risk percentage (2%) always applies to your full Account Size
- Max Trade Amount limits the capital allocated per individual trade
- This allows multiple trades with full risk on each trade
Example from Screenshot:
Account Size: 2,000 USDT
Max Trade Amount: 500 USDT
Risk per Trade: 2% × 2,000 = 40 USDT per trade
Stop Loss Distance: 0.11% from entry
Result: Position Size = 17,350.69 USDT with 35x leverage
Total Risk (including fees): 40.46 USDT
Multiple Trades Strategy:
With this setup, you can open:
Trade 1: 40 USDT risk, 495.73 USDT position amount (35x leverage)
Trade 2: 40 USDT risk, 495.73 USDT position amount (35x leverage)
Trade 3: 40 USDT risk, 495.73 USDT position amount (35x leverage)
Trade 4: 40 USDT risk, 495.73 USDT position amount (35x leverage)
Total Portfolio Exposure:
- 4 simultaneous trades = 4 × 495.73 = 1,982.92 USDT position amount
- Total risk exposure = 4 × 40 = 160 USDT (8% of account)
Trading ScorecardChecklist, note, scorecard, custom table. I originally created the table for currency strength analysis, but it can be used as a checklist. You can also create your own scoring system. The number of columns and rows can be changed. The color and size of the table are customizable.
Price Action Bar Counter for Crypto Traders标注美股开收盘时间的K线辅助指标,自动调整夏令时与冬令时,适用于5m、15m、30m与1h级别。
Highlights U.S. stock market open and close times with automatic DST adjustment.
Best used on 5m, 15m, 30m, and 1h charts.
Dashboard — Vol & PriceDashboard for traders
Indicator Description
1. Prev Day High
What it shows: the previous trading day's high.
Why it shows: a resistance level. Many traders watch to see if the price will hold above or below this level. A breakout can signal buying strength.
2. Prev Day Low
What it shows: the previous day's low.
Why it shows: a support level. If the price breaks downwards, it signals weakness and a possible continuation of the decline.
3. Today
What it shows:
The difference between the current price and yesterday's close (in absolute values and as a percentage).
Color: green for an increase, red for a decrease.
Why it shows: immediately shows how strong a gap or movement is today relative to yesterday. This is an indicator of current momentum.
4. ADR, % (Average Daily Range)
What it shows: Average daily range (High – Low), expressed as a percentage of the closing price, for the selected period (default 7 days).
Why it's useful: To understand the "normal" volatility of an instrument. For example, if the ADR is 3%, then a 1% move is small, while a 6% move is very large.
5. ATR (Average True Range)
What it shows: Average fluctuation range (including gaps), in absolute points, for the specified period (default 7 days).
Why it's useful: A classic volatility indicator. Useful for setting stops, calculating position sizes, and identifying "noise" movements.
6. ATR (Today), %
What it shows: How much the current movement today (from yesterday's close to the current price) represents in % of the average ATR.
Why it shows: Shows whether the instrument has "played out" its average range. If the value is already >100%, there is a high probability that the movement will begin to slow.
7. Vol (Today)
What it shows:
Current trading volume for the day (in millions/billions).
Comparison with yesterday as a percentage (for example: 77.32M (-52.78%)).
Color: green if the volume is higher than yesterday; red if lower.
Why it shows:Quickly shows whether the market is active today. Volume = fuel for price movement.
8. Avg Vol (20d)
What it shows: Average daily volume over the last 20 trading days.
Why it's useful:"normal" activity level. It's a convenient backdrop for assessing today's turnover.
9. Rel. Vol (Today), % (Relative Volume)
What it shows: Deviation of the current volume from the average (20 days).
Formula: `(today / average - 1)` * 100`.
+30% = volume 30% above average, -40% = 40% below average.
Color: green for +, red for –.
Why it's useful:A key indicator for a trader. If RelVol > 100% (green), the market is "charged," and the movement is more significant. If low, activity is weak and movements are less reliable.
10. Normalized RS (Relative Strength)
What it shows: the relative strength of a stock to a selected benchmark (e.g., SPY), normalized by the period (default 7 days).
100 = same result as the market.
> 100 = the stock is stronger than the index.
<100 = weaker than the index.
Why it's needed: filtering ideas. Strong stocks rise faster when the market rises, weak stocks fall more sharply. This helps trade in the direction of the trend and select the best candidates.
In summary:
Prev High / Low — key support and resistance levels.
Today — an instant understanding of the current momentum.
ADR and ATR — volatility and potential movement.
ATR (Today) — how much the instrument has already "run."
Vol + Rel.Vol — activity and confirmation of the movement's strength.
RS — selecting strong/weak leaders against the market.
ATR/ADX Trend Table - Compact & Positionable (Fixed init)Table to determine qualified ATR & ADX DI for follow trend entry
Position Size & Drawdown ManagerThis tool is designed to help traders dynamically adjust their position size and drawdown expectations as their trading capital changes over time. It provides a simple and intuitive way to translate backtest results into real-world position sizing decisions.
Purpose and Functionality
The indicator uses your original backtest parameters — including base capital, base drawdown percentage, and base position size — and your current account balance to calculate how your risk profile changes. It presents two main scenarios:
Lock Drawdown %: Keeps your original drawdown percentage fixed and calculates the new position size required.
Lock Position Size: Keeps your position size unchanged and shows how your drawdown percentage will shift.
Why it’s useful
Many traders face the challenge of scaling their strategies as their account grows or shrinks. This tool makes it easy to visualize the relationship between position sizing, capital, and drawdown. It’s particularly valuable for risk management, portfolio rebalancing, and maintaining consistent exposure when transitioning from backtest conditions to live trading.
How it works
The calculations are displayed in a clean, color-coded table that updates dynamically. This allows you to instantly see how capital fluctuations impact your expected drawdown or position size. You can toggle between light and dark themes and highlight important cells for clarity.
Practical use case
Combine this tool with your TradingView strategy results to better interpret your backtests and adjust your real-world trade sizes accordingly. It bridges the gap between simulated performance and actual account management.
Chart example
The chart included focuses only on this indicator, showing the output table and visual layout clearly without additional scripts or overlays.
Machine Learning Moving Average [BackQuant]Machine Learning Moving Average
A powerful tool combining clustering, pseudo-machine learning, and adaptive prediction, enabling traders to understand and react to price behavior across multiple market regimes (Bullish, Neutral, Bearish). This script uses a dynamic clustering approach based on percentile thresholds and calculates an adaptive moving average, ideal for forecasting price movements with enhanced confidence levels.
What is Percentile Clustering?
Percentile clustering is a method that sorts and categorizes data into distinct groups based on its statistical distribution. In this script, the clustering process relies on the percentile values of a composite feature (based on technical indicators like RSI, CCI, ATR, etc.). By identifying key thresholds (lower and upper percentiles), the script assigns each data point (price movement) to a cluster (Bullish, Neutral, or Bearish), based on its proximity to these thresholds.
This approach mimics aspects of machine learning, where we “train” the model on past price behavior to predict future movements. The key difference is that this is not true machine learning; rather, it uses data-driven statistical techniques to "cluster" the market into patterns.
Why Percentile Clustering is Useful
Clustering price data into meaningful patterns (Bullish, Neutral, Bearish) helps traders visualize how price behavior can be grouped over time.
By leveraging past price behavior and technical indicators, percentile clustering adapts dynamically to evolving market conditions.
It helps you understand whether price behavior today aligns with past bullish or bearish trends, improving market context.
Clusters can be used to predict upcoming market conditions by identifying regimes with high confidence, improving entry/exit timing.
What This Script Does
Clustering Based on Percentiles : The script uses historical price data and various technical features to compute a "composite feature" for each bar. This feature is then sorted and clustered based on predefined percentile thresholds (e.g., 10th percentile for lower, 90th percentile for upper).
Cluster-Based Prediction : Once clustered, the script uses a weighted average, cluster momentum, or regime transition model to predict future price behavior over a specified number of bars.
Dynamic Moving Average : The script calculates a machine-learning-inspired moving average (MLMA) based on the current cluster, adjusting its behavior according to the cluster regime (Bullish, Neutral, Bearish).
Adaptive Confidence Levels : Confidence in the predicted return is calculated based on the distance between the current value and the other clusters. The further it is from the next closest cluster, the higher the confidence.
Visual Cluster Mapping : The script visually highlights different clusters on the chart with distinct colors for Bullish, Neutral, and Bearish regimes, and plots the MLMA line.
Prediction Output : It projects the predicted price based on the selected method and shows both predicted price and confidence percentage for each prediction horizon.
Trend Identification : Using the clustering output, the script colors the bars based on the current cluster to reflect whether the market is trending Bullish (green), Bearish (red), or is Neutral (gray).
How Traders Use It
Predicting Price Movements : The script provides traders with an idea of where prices might go based on past market behavior. Traders can use this forecast for short-term and long-term predictions, guiding their trades.
Clustering for Regime Analysis : Traders can identify whether the market is in a Bullish, Neutral, or Bearish regime, using that information to adjust trading strategies.
Adaptive Moving Average for Trend Following : The adaptive moving average can be used as a trend-following indicator, helping traders stay in the market when it’s aligned with the current trend (Bullish or Bearish).
Entry/Exit Strategy : By understanding the current cluster and its associated trend, traders can time entries and exits with higher precision, taking advantage of favorable conditions when the confidence in the predicted price is high.
Confidence for Risk Management : The confidence level associated with the predicted returns allows traders to manage risk better. Higher confidence levels indicate stronger market conditions, which can lead to higher position sizes.
Pseudo Machine Learning Aspect
While the script does not use conventional machine learning models (e.g., neural networks or decision trees), it mimics certain aspects of machine learning in its approach. By using clustering and the dynamic adjustment of a moving average, the model learns from historical data to adjust predictions for future price behavior. The "learning" comes from how the script uses past price data (and technical indicators) to create patterns (clusters) and predict future market movements based on those patterns.
Why This Is Important for Traders
Understanding market regimes helps to adjust trading strategies in a way that adapts to current market conditions.
Forecasting price behavior provides an additional edge, enabling traders to time entries and exits based on predicted price movements.
By leveraging the clustering technique, traders can separate noise from signal, improving the reliability of trading signals.
The combination of clustering and predictive modeling in one tool reduces the complexity for traders, allowing them to focus on actionable insights rather than manual analysis.
How to Interpret the Output
Bullish (Green) Zone : When the price behavior clusters into the Bullish zone, expect upward price movement. The MLMA line will help confirm if the trend remains upward.
Bearish (Red) Zone : When the price behavior clusters into the Bearish zone, expect downward price movement. The MLMA line will assist in tracking any downward trends.
Neutral (Gray) Zone : A neutral market condition signals indecision or range-bound behavior. The MLMA line can help track any potential breakouts or trend reversals.
Predicted Price : The projected price is shown on the chart, based on the cluster's predicted behavior. This provides a useful reference for where the price might move in the near future.
Prediction Confidence : The confidence percentage helps you gauge the reliability of the predicted price. A higher percentage indicates stronger market confidence in the forecasted move.
Tips for Use
Combining with Other Indicators : Use the output of this indicator in combination with your existing strategy (e.g., RSI, MACD, or moving averages) to enhance signal accuracy.
Position Sizing with Confidence : Increase position size when the prediction confidence is high, and decrease size when it’s low, based on the confidence interval.
Regime-Based Strategy : Consider developing a multi-strategy approach where you use this tool for Bullish or Bearish regimes and a separate strategy for Neutral markets.
Optimization : Adjust the lookback period and percentile settings to optimize the clustering algorithm based on your asset’s characteristics.
Conclusion
The Machine Learning Moving Average offers a novel approach to price prediction by leveraging percentile clustering and a dynamically adapting moving average. While not a traditional machine learning model, this tool mimics the adaptive behavior of machine learning by adjusting to evolving market conditions, helping traders predict price movements and identify trends with improved confidence and accuracy.
Intraday Perpetual Premium & Z-ScoreThis indicator measures the real-time premium of a perpetual futures contract relative to its spot market and interprets it through a statistical lens.
It helps traders detect when funding pressure is building, when leverage is being unwound, and when crowding in the futures market may precede volatility.
How it works
• Premium (%) = (Perp – Spot) ÷ Spot × 100
The script fetches both spot and perpetual prices and calculates their percentage difference each minute.
• Rolling Mean & Z-Score
Over a 4-hour look-back, it computes the average premium and standard deviation to derive a Z-Score, showing how stretched current sentiment is.
• Dynamic ±2σ Bands highlight statistically extreme premiums or discounts.
• Rate of Change (ROC) over one hour gauges the short-term directional acceleration of funding flows.
Colour & Label Interpretation
Visual cue Meaning Trading Implication
🟢 Green bars + “BULL Pressure” Premium rising faster than mean Leverage inflows → momentum strengthening
🔴 Red bars + “BEAR Pressure” Premium shrinking Leverage unwind → pull-back or consolidation
⚠️ Orange “EXTREME Premium/Discount” Crowded trade → heightened reversal risk
⚪ Grey bars Neutral Balanced conditions
Alerts
• Bull Pressure Alert → funding & premium rising (momentum building)
• Bear Pressure Alert → premium falling (deleveraging)
• Extreme Premium Alert → crowded longs; potential top
• Extreme Discount Alert → capitulation; possible bottom
Use case
Combine this indicator with your Heikin-Ashi, RSI, and MACD confluence rules:
• Enter only when your oscillators are low → curling up and Bull Pressure triggers.
• Trim or exit when Bear Pressure or Extreme Premium appears.
• Watch for Extreme Discount during flushes as an early bottoming clue.
Vandan V2Vandan V2 is an automated trading strategy for NQ1! (E-mini Nasdaq-100) based on short-term mean reversion with dynamic risk control. It combines volatility filters and overbought/oversold signals to capture local market imbalances.
Backtested from 2015 to 2025, it achieved a +730% total return, Profit Factor of 1.40, max drawdown of only 1.61%, and over 106,000 trades. Designed for systematic scalping or intraday arbitrage with a limit of 3 simultaneous contracts.
Fractal Dimension Index (FDI) by CoryP1990 – Quant ToolkitThe Fractal Dimension Index (FDI) quantifies how directional or choppy price movement is; in other words, it measures the “roughness” of a trend. FDI values near 1.0–1.3 indicate strong directional trends, while values near 1.5–2.0 reflect chaotic or range-bound behavior. This makes FDI a powerful tool for detecting trend vs. mean-reversion regimes.
How it works
Calculates the ratio of average price changes over full and half-length windows to estimate the fractal dimension of price movement.
Teal line = FDI decreasing → trending behavior (market smoother, more directional).
Orange line = FDI increasing → choppiness or consolidation.
Background:
Green tint = trend-friendly regime (FDI below low threshold).
Orange tint = choppy regime (FDI above high threshold).
Use cases
Detect when markets shift from trend-following to mean-reverting conditions.
Filter trades: favor trend strategies when FDI < 1.3 and reversion setups when FDI > 1.7.
Combine with momentum or volatility metrics to classify regimes.
Defaults
Length = 20
High-FDI threshold = 1.8
Low-FDI threshold = 1.2
Example — TSLA (1D, 2021)
Early 2021 trades choppy to sideways with FDI swinging up toward 1.5, then the index drops below 1.2 as Tesla transitions into a persistent trend-friendly regime through the second half of the year (green background). During the Q4 breakout, FDI holds ~1.0–1.2, confirming strong directionality; brief pullbacks lift FDI back toward the mid-range before trending pressure resumes. At the right edge, FDI sits well below the low threshold, signaling that price remains in a trend-supportive state.
Part of the Quant Toolkit — transparent, open-source indicators for modern quantitative analysis. Built by CoryP1990.
Intraday Intensity Percent (IIP) by CoryP1990 – Quant ToolkitThe Intraday Intensity Percent (IIP) quantifies buying vs. selling pressure within each bar by combining price position inside the range and trading volume. It’s essentially a volume-weighted order-flow indicator, showing whether volume concentrates near highs (buying pressure) or lows (selling pressure).
How it works
Computes the Intraday Intensity (II) = ((Close − Low) − (High − Close)) / (High − Low) × Volume.
Then compares total “intensity” to total volume over a look-back window to produce a normalized percentage.
Lime line: IIP rising → accumulation / increasing buy pressure.
Red line: IIP falling → distribution / increasing sell pressure.
Background: Green tint = heavy buying, Red tint = heavy selling.
Use cases
Identify accumulation or distribution phases early.
Confirm momentum with volume-backed pressure.
Detect divergences between price and volume flow.
Defaults
Length = 14
High-pressure threshold = +5 %
Low-pressure threshold = −5 %
Example — AAPL (2H)
Late July into early August shows sustained distribution as IIP sinks below −5% (deep red), marking heavy sell pressure during the drop. From early to mid-August, IIP flips positive and holds > +5% (green background), aligning with the rebound. After a brief mid-September shakeout, late Sep–mid Oct features renewed accumulation with repeated green surges. Most recently, IIP prints around −33%, indicating dominant selling pressure into the latest two-hour bars.
Part of the Quant Toolkit — transparent, open-source indicators for modern quantitative analysis. Built by CoryP1990.
ChainAggLib - library for aggregation of main chain tickersLibrary "ChainAggLib"
ChainAggLib — token -> main protocol coin (chain) and top-5 exchange tickers for volume aggregation.
Library only (no plots). All helpers are pure functions and do not modify globals.
norm_sym(s)
Parameters:
s (string)
get_base_from_symbol(full_symbol)
Parameters:
full_symbol (string)
get_chain_for_token(token_symbol)
Parameters:
token_symbol (string)
get_top5_exchange_tickers_for_chain(chain_code)
Parameters:
chain_code (string)
get_top5_exchange_tickers_for_token(token_symbol)
Parameters:
token_symbol (string)
join_tickers(arr)
Parameters:
arr (array)
contains_symbol(arr, symbol)
Parameters:
arr (array)
symbol (string)
contains_current(arr)
Parameters:
arr (array)
get_arr_for_current_token()
get_chain_for_current()
Yang-Zhang Volatility (YZVol) by CoryP1990 – Quant ToolkitThe Yang-Zhang Volatility (YZVol) estimator measures realized volatility using both overnight gaps and intraday moves. It combines three components: overnight returns, open-to-close returns, and the Rogers–Satchell term, weighted by Zhang’s k to reduce bias.
How to read it
Line color: Green when YZVol is rising (volatility expansion), Red when falling (volatility compression).
Background: Green tint = above High-vol threshold (active regime). Red tint = below Low-vol threshold (quiet regime).
Units: Displays Daily % by default on any timeframe (values are normalized to daily). An optional toggle shows Annualized % (√252 × Daily %).
Typical uses
Spot transitions between quiet and active regimes.
Compare realized vol vs implied vol or a risk-target.
Adapt position sizing to volatility clustering.
Defaults
Length = 20
High-vol threshold = 5% (Daily)
Low-vol threshold = 1% (Daily)
Optional: Annualized % display
Example — SPY (1D)
During the 2020 crash, YZVol surged to 5.8 % per day, capturing the height of pandemic-era volatility before compressing into a calm regime through 2021. Volatility re-expanded in 2022 due to reinflamed COVID fears and gradually stabilized through 2023. A sharp, liquidity-driven volatility event in August 2024 caused another brief YZVol surge, reflecting the historic one-day VIX spike triggered by market-wide risk-off flows and thin pre-market liquidity. A second, policy-driven expansion followed in April–May 2025, coinciding with the renewed U.S.–China tariff conflict and a sharp equity pullback. Since mid-2025, YZVol has settled near 1 % per day, with the red background confirming that realized volatility has once again compressed into a quiet, low-risk regime.
Part of the Quant Toolkit — transparent, open-source indicators for modern quantitative analysis. Built by CoryP1990.
Ulcer Index (UI) by CoryP1990 – Quant ToolkitThe Ulcer Index measures downside volatility, i.e. how deep and persistent drawdowns are from recent highs. Unlike standard deviation, which treats upside and downside equally, the Ulcer Index focuses purely on pain . It’s a favorite of risk-adjusted performance metrics like the Martin Ratio.
How it works
Computes the RMS (root-mean-square) of drawdowns over a look-back window.
Rising UI → drawdowns worsening (stress increasing).
Falling UI → drawdowns shrinking (recovery phase).
Red line = Ulcer Index rising.
Lime line = Ulcer Index falling.
Red background = High-risk regime (above threshold).
Green background = Low-risk regime (below threshold).
Use cases
Gauge portfolio stress levels and timing of recovery phases.
Identify “calm vs storm” periods for position sizing.
Combine with volatility or sentiment measures for regime classification.
Defaults
Length = 14
High-risk threshold = 10
Low-risk threshold = 5
Example — NVIDIA (NVDA, 1D)
During the sharp decline through 2022, the Ulcer Index repeatedly spiked above 10 while the background turned red, highlighting an extended high-stress drawdown phase. As NVDA began recovering in early 2023, the UI line switched to lime and drifted below 5, marking a transition into a low-risk regime. Throughout 2024–2025, the index stayed mostly sub-5 with brief red pulses on minor corrections, which is clear evidence that downside volatility has remained contained during the broader uptrend.
Part of the Quant Toolkit - a series of transparent, open-source indicators designed for professional-grade analytics and education. Built by CoryP1990.
korea time with 200 korea time
start time
08
09
17
18
23
00
This script makes it easier to look at the charts
The time automatically displays even if you don't bother to bring the mouse by hand
Now you can see the time intuitively
Run a very happy trading session
India Vix based Strangle StrikesA clean Nifty–VIX dashboard that converts India VIX into expected daily moves, price ranges, and suggested strangle strikes. Includes VIX %, expanded 1.2× range, and smart rounded strike levels for options trading.
This script provides a professional on-chart dashboard that converts India VIX into actionable trading levels for Nifty. It calculates the VIX-based expected daily move, projected price ranges, expanded 1.2× ranges, and suggested strangle strike prices. Includes clean formatting, color-coded sections, and real-time updates.
Ideal for traders using straddles, strangles, intraday volatility models, range-bound setups, and options-based risk management.
1.2x expanded range is better success probability, may keep 20% of strangle value as stop loss.
The vix based system is intended to give approx. 70%+ success rate.
JiNFOJiNFO is a clean, data-driven overlay that displays key information about the current symbol directly on your chart — without clutter.
🧭 What it shows
Company & Symbol Info – Name, ticker, sector, industry, market cap
Timeframe Label – Current chart timeframe (auto-formatted)
ATR (14) & % Volatility – With color dots for low 🟢 / medium 🟡 / high 🔴 volatility
Moving Average Status – Indicates if price is above or below the selected MA (default 150)
RSI & RSI-SMA (14) – Compact line with live values and color dot for overbought/neutral/oversold zones
Distance from SMA (50) – Shows how far price is from the 50 MA (+/- %) and grades it A–D by distance 🟢🟠🔴
Earnings Countdown – Days remaining until the next earnings date (if available)
⚙️ Customization
Position (top/middle/bottom, left/center/right)
Text size (default Small), color, opacity (100 %)
Toggle any data row on or off
Choose compact or verbose labels
🧩 Purpose
JiNFO replaces bulky data panels with a lightweight, transparent information layer — perfect for traders who want essential fundamentals, volatility, and technical context at a glance.
Custom Horizontal Lines | Trade Symmetry📊 Custom Horizontal Lines
🔍 Overview
The Custom Horizontal Lines is a precision utility designed for traders who perform manual higher-timeframe analysis and want to preserve their marked price levels directly on the chart.
It doesn’t calculate or detect anything automatically — instead, it acts as your personal level memory, preserving your analyzed zones and reference prices throughout the session.
Ideal for traders who manually mark the High, Low, Open, Close, Mean Thresholds, and Quarter Levels of Order Blocks, Fair Value Gaps, Inversion Fair Value Gaps and Wicks before the trading day begins.
⚙️ Key Features
✅ Manual Level Entry — Input your analyzed price levels (OB, FVG, WICK,etc) directly into the indicator settings.
✅ Preserved Levels — Once entered, your lines stay visible and consistent — even after switching symbols, timeframes, or reloading the chart.
✅ Supports All Level Types — Store any kind of manually defined level: OB highs/lows, FVG boundaries, Wicks, Mean Thresholds, Quarter levels, or custom reference prices.
✅ Clean Visualization — Customize line color, style, and labels for easy visual organization.
✅ Session-Ready Workflow — Built for pre-market preparation — enter your HTF levels once, and trade around them all day.
✅ No Auto Calculations — 100% manual by design — ensuring only your analyzed levels are shown, exactly as you defined them.
💡 How to Use
Open the indicator’s settings and manually enter those price values.
The indicator will plot and preserve those exact levels on your chart.
Switch to your lower timeframe and observe how price reacts around them — without ever needing to redraw.
🎯 Why It’s Useful
Keeps your HTF levels organized and persistent across sessions.
Saves time by avoiding redrawing.
Fits perfectly into ICT / Smart Money trading workflows.
Ensures full manual control and precision over what’s displayed on your chart.
🧩 Ideal For
ICT and Smart Money traders
Institutional-style manual analysts
Traders marking Mean Thresholds, or Quarter Levels of OBs, FVGs, Wicks etc
Anyone who wants a clean, reliable way to preserve their manual analysis






















