Nqaba Goldminer StrategyThis indicator plots the New York session key timing levels used in institutional intraday models.
It automatically marks the 03:00 AM, 10:00 AM, and 2:00 PM (14:00) New York times each day:
Vertical lines show exactly when those time windows open — allowing traders to identify major global liquidity shifts between London, New York, and U.S. session overlaps.
Horizontal lines mark the opening price of the 5-minute candle that begins at each of those key times, providing precision reference levels for potential reversals, continuation setups, and intraday bias shifts.
Users can customize each line’s color, style (solid/dashed/dotted), width, and horizontal-line length.
A history toggle lets you display all past occurrences or just today’s key levels for a cleaner chart.
These reference levels form the foundation for strategies such as:
London Breakout to New York Reversal models
Opening Range / Session Open bias confirmation
Institutional volume transfer windows (London → NY → Asia)
The tool provides a simple visual structure for traders to frame intraday decision-making around recurring institutional time events.
Statistics
Percentile Rank Oscillator (Price + VWMA)A statistical oscillator designed to identify potential market turning points using percentile-based price analytics and volume-weighted confirmation. 
 What is PRO? 
Percentile Rank Oscillator measures how extreme current price behavior is relative to its own recent history. It calculates a rolling percentile rank of price midpoints and VWMA deviation (volume-weighted price drift). When price reaches historically rare levels – high or low percentiles – it may signal exhaustion and potential reversal conditions.
 How it works 
 
 Takes midpoint of each candle ((H+L)/2)
 Ranks the current value vs previous N bars using rolling percentile rank
 Maps percentile to a normalized oscillator scale (-1..+1 or 0–100)
 Optionally evaluates VWMA deviation percentile for volume-confirmed signals
 Highlights extreme conditions and confluence zones
 
 Why percentile rank? 
Median-based percentiles ignore outliers and read the market statistically – not by fixed thresholds. Instead of guessing “overbought/oversold” values, the indicator adapts to current volatility and structure.
 Key features 
 
 Rolling percentile rank of price action
 Optional VWMA-based percentile confirmation
 Adaptive, noise-robust structure
 User-selectable thresholds (default 95/5)
 Confluence highlighting for price + VWMA extremes
 Optional smoothing (RMA)
 Visual extreme zone fills for rapid signal recognition
 
 How to use 
 
 High percentile values –> statistically extreme upward deviation (potential top)
 Low percentile values –> statistically extreme downward deviation (potential bottom)
 Price + VWMA confluence strengthens reversal context
 Best used as part of a broader trading framework (market structure, order flow, etc.)
 
 Tip:  Look for percentile spikes at key HTF levels, after extended moves, or where liquidity sweeps occur. Strong moves into rare percentile territory may precede mean reversion.
 Suggested settings 
 
 Default length: 100 bars
 Thresholds: 95 / 5
 Smoothing: 1–3 (optional)
 
 Important note 
This tool does not predict direction or guarantee outcomes. It provides statistical context for price extremes to help traders frame probability and timing. Always combine with sound risk management and other tools.
Multi-Mode Seasonality Map [BackQuant]Multi-Mode Seasonality Map  
 A fast, visual way to expose repeatable calendar patterns in returns, volatility, volume, and range across multiple granularities (Day of Week, Day of Month, Hour of Day, Week of Month). Built for idea generation, regime context, and execution timing. 
 What is “seasonality” in markets? 
 Seasonality refers to statistically repeatable patterns tied to the calendar or clock, rather than to price levels. Examples include specific weekdays tending to be stronger, certain hours showing higher realized volatility, or month-end flow boosting volumes. This tool measures those effects directly on your charted symbol.
 Why seasonality matters 
  
  It’s orthogonal alpha: timing edges independent of price structure that can complement trend, mean reversion, or flow-based setups.
  It frames expectations: when a session typically runs hot or cold, you size and pace risk accordingly.
  It improves execution: entering during historically favorable windows, avoiding historically noisy windows.
  It clarifies context: separating normal “calendar noise” from true anomaly helps avoid overreacting to routine moves.
  
 How traders use seasonality in practice 
  
  Timing entries/exits : If Tuesday morning is historically weak for this asset, a mean-reversion buyer may wait for that drift to complete before entering.
  Sizing & stops : If 13:00–15:00 shows elevated volatility, widen stops or reduce size to maintain constant risk.
  Session playbooks : Build repeatable routines around the hours/days that consistently drive PnL.
  Portfolio rotation : Compare seasonal edges across assets to schedule focus and deploy attention where the calendar favors you.
  
 Why Day-of-Week (DOW) can be especially helpful 
  
  Flows cluster by weekday (ETF creations/redemptions, options hedging cadence, futures roll patterns, macro data releases), so DOW often encodes a stable micro-structure signal.
  Desk behavior and liquidity provision differ by weekday, impacting realized range and slippage.
  DOW is simple to operationalize: easy rules like “fade Monday afternoon chop” or “press Thursday trend extension” can be tested and enforced.
  
 What this indicator does 
  
  Multi-mode heatmaps : Switch between  Day of Week, Day of Month, Hour of Day, Week of Month .
  Metric selection : Analyze  Returns ,  Volatility  ((high-low)/open),  Volume  (vs 20-bar average), or  Range  (vs 20-bar average).
  Confidence intervals : Per cell, compute mean, standard deviation, and a z-based CI at your chosen confidence level.
  Sample guards : Enforce a minimum sample size so thin data doesn’t mislead.
  Readable map : Color palettes, value labels, sample size, and an optional legend for fast interpretation.
  Scoreboard : Optional table highlights best/worst DOW and today’s seasonality with CI and a simple “edge” tag.
  
 How it’s calculated (under the hood) 
  
  Per bar, compute the chosen  metric  (return, vol, volume %, or range %) over your lookback window.
  Bucket that metric into the active calendar bin (e.g., Tuesday, the 15th, 10:00 hour, or Week-2 of month).
  For each bin, accumulate  sum ,  sum of squares , and  count , then at render compute  mean ,  std dev , and  confidence interval .
  Color scale normalizes to the observed min/max of eligible bins (those meeting the minimum sample size).
  
 How to read the heatmap 
  
  Color : Greener/warmer typically implies higher mean value for the chosen metric; cooler implies lower.
  Value label : The center number is the bin’s mean (e.g., average % return for Tuesdays).
  Confidence bracket : Optional “ ” shows the CI for the mean, helping you gauge stability.
  n = sample size : More samples = more reliability. Treat small-n bins with skepticism.
  
 Suggested workflows 
  
  Pick the lens : Start with  Analysis Type = Returns ,  Heatmap View = Day of Week ,  lookback ≈ 252 trading days . Note the best/worst weekdays and their CI width.
  Sanity-check volatility : Switch to  Volatility  to see which bins carry the most realized range. Use that to plan stop width and trade pacing.
  Check liquidity proxy : Flip to  Volume , identify thin vs thick windows. Execute risk in thicker windows to reduce slippage.
  Drill to intraday : Use  Hour of Day  to reveal opening bursts, lunchtime lulls, and closing ramps. Combine with your main strategy to schedule entries.
  Calendar nuance : Inspect  Week of Month  and  Day of Month  for end-of-month, options-cycle, or data-release effects.
  Codify rules : Translate stable edges into rules like “no fresh risk during bottom-quartile hours” or “scale entries during top-quartile hours.”
  
 Parameter guidance 
  
  Analysis Period (Days) : 252 for a one-year view. Shorten (100–150) to emphasize the current regime; lengthen (500+) for long-memory effects.
  Heatmap View : Start with DOW for robustness, then refine with Hour-of-Day for your execution window.
  Confidence Level : 95% is standard; use 90% if you want wider coverage with fewer false “insufficient data” bins.
  Min Sample Size : 10–20 helps filter noise. For Hour-of-Day on higher timeframes, consider lowering if your dataset is small.
  Color Scheme : Choose a palette with good mid-tone contrast (e.g., Red-Green or Viridis) for quick thresholding.
  
 Interpreting common patterns 
  
  Return-positive but low-vol bins : Favorable drift windows for passive adds or tight-stop trend continuation.
  Return-flat but high-vol bins : Opportunity for mean reversion or breakout scalping, but manage risk accordingly.
  High-volume bins : Better expected execution quality; schedule size here if slippage matters.
  Wide CI : Edge is unstable or sample is thin; treat as exploratory until more data accumulates.
  
 Best practices 
  
  Revalidate after regime shifts (new macro cycle, liquidity regime change, major exchange microstructure updates).
  Use multiple lenses: DOW to find the day, then Hour-of-Day to refine the entry window.
  Combine with your core setup signals; treat seasonality as a filter or weight, not a standalone trigger.
  Test across assets/timeframes—edges are instrument-specific and may not transfer 1:1.
  
 Limitations & notes 
  
  History-dependent: short histories or sparse intraday data reduce reliability.
  Not causal: a hot Tuesday doesn’t guarantee future Tuesday strength; treat as probabilistic bias.
  Aggregation bias: changing session hours or symbol migrations can distort older samples.
  CI is z-approximate: good for fast triage, not a substitute for full hypothesis testing.
  
 Quick setup 
  
  Use  Returns + Day of Week + 252d  to get a clean yearly map of weekday edge.
  Flip to  Hour of Day  on intraday charts to schedule precise entries/exits.
  Keep  Show Values  and  Confidence Intervals  on while you calibrate; hide later for a clean visual.
  
 The Multi-Mode Seasonality Map helps you convert the calendar from an afterthought into a quantitative edge, surfacing when an asset tends to move, expand, or stay quiet—so you can plan, size, and execute with intent.
Vandan V2Vandan V2 is an automated trend-following strategy for NASDAQ E-mini Futures (NQ1!).  
It uses multi-timeframe momentum and volatility filters to identify high-probability entries.  
Includes dynamic risk management and trailing logic optimized for intraday trading.
Info Box⚙️ Purpose
Shows useful trade and event-related data such as:
% Distance from stop levels (D, DH)
Earnings countdown in bars
All displayed in a single floating info box (table) on the chart.
📋 Key Features
Customizable Display
Choose table position (Top Right, Bottom Center, etc.)
Choose table size (Auto, Large, Tiny, etc.)
Custom text and background colors
Metrics Shown
D: % Distance from stop (difference between close and low/high)
DH: % Distance from midpoint of the candle
Earnings Countdown: Number of bars until next earnings event
Conditional Styling
If earnings are within 3 bars, text color turns red as a warning.
Execution Conditions
Runs only on daily timeframe
Updates on last bar only (no historical clutter)
Output
Displays all selected metrics in one line, separated by “×”
e.g. → D: -2.1% × 5 × DH: 1.4%
🧩 Overall Function
Creates a clean, customizable “info box” showing trade distances and upcoming earnings countdown for quick decision-making directly on your TradingView chart.
Market SessionsMarket Sessions (Asian, London, NY, Pacific) 
 Summary 
This indicator plots the main global market sessions (Asian, European, American, Pacific) as boxes on your chart, complete with dynamic high/low tracking.
It's an essential tool for intraday traders to track session-based volatility patterns and visualize key support/resistance levels (like the Asian Range) that often define price action for the rest of the day.
 Who it’s for 
Intraday traders, scalpers, and day traders who need to visualize market hours and session-based ranges. If your strategy depends on the London open, the New York close, or the Asian range, this script will map it out for you.
 What it shows 
Customizable Session Boxes: Four fully configurable boxes for the Asian, European (London), American (New York), and Pacific (Sydney) sessions.
Session High & Low: The script tracks and boxes the highest high and lowest low of each session, dynamically updating as the session progresses.
Session Labels: Clear labels (e.g., "AS", "EU") mark each session, anchored to the start time.
 Key Features 
Powerful Timezone Control: This is the core feature.
Use Exchange Timezone (Default): Simply enter session times (e.g., 8:00 for London) relative to the exchange's timezone (e.g., "NASDAQ" or "BINANCE").
Use UTC Offset: Uncheck the box and enter a UTC offset (e.g., +3 or -5). Now, all session times you enter are relative to that specific UTC offset. This gives you full control regardless of the chart you're on.
Fully Customizable: Toggle any session on/off.
Style Control: Change the fill color, border color, transparency, border width, and line style (Solid, Dashed, Dotted) for each session individually.
Smart Labels: Labels stay anchored to the start of the session (no "sliding") and float just above the session high.
 Why this helps 
Track Volatility & Market Behavior: Visually identify the "personality" of each session. Some sessions might consistently produce powerful pumps or dumps, while others are prone to sideways "chop" or accumulation. This indicator helps you see these repeating patterns.
Find Key Support/Resistance Levels: The High and Low of a session (e.g., the Asian Range) often become critical support and resistance levels for the next session (e.g., London). This script makes it easy to spot these "session-to-session" S/R flips and reactions.
Aid Statistical Analysis: The script provides the core visual data for your statistical research. You can easily track how often the London session breaks the Asian high, or which session is most likely to reverse the trend, helping you build a robust trading plan.
Context is King: Instantly see which market is active, which are overlapping (like the high-volume London-NY overlap), and which have closed.
 Quick setup 
Go to Timezone Settings.
 Decide how you want to enter times: 
Easy (Default): Leave Use Exchange Timezone checked. Enter session times based on the chart's native exchange (e.g., for BTC/USDT on Binance, use UTC+0 times).
Manual (Pro): Uncheck Use Exchange Timezone. Enter your UTC Offset (e.g., +2 for Berlin). Now, enter all session times as they appear on the clock in Berlin.
Go to each session tab (Asian, European...) to enable/disable it and set the correct start/end hours and minutes.
Style the colors to match your chart theme.
 Disclaimer 
 For educational/informational purposes only; not financial advice. Trading involves risk—manage it responsibly.
Simple FloatFloat Display Indicator
A simple, clean indicator that displays the current float (shares outstanding float) for any stock directly in your indicator status line at the top left of the chart.
Features:
- Shows the float value with automatic K/M formatting for thousands and millions
- No chart clutter - value only appears in the status line, nothing plotted on the chart
- Works on any stock that has float data available
- Lightweight and efficient
Perfect for traders who want quick access to float information without switching between windows or cluttering their charts.
Note: Float data availability depends on TradingView's financial data for the specific ticker. Some tickers may not have this data available.
Risk Position Sizer (Entry=Close, Stop=Daily Low)This is for trading stocks/shares. Its main goal is to help you gauge how big or how small of a position you should add based on your account size. 
Continuation Probability (0–100)This indicator helps measure how likely the current candle trend will continue or reverse, giving a probability score between 0–100.
It combines multiple market factors trend, candle strength, volume, and volatility to create a single, intuitive signal.
NFCI National Financial Conditions IndexChicago Fed National Financial Conditions Index (NFCI)
This indicator plots the Chicago Fed’s National Financial Conditions Index (NFCI).
The NFCI updates weekly, and its latest value is displayed across all chart intervals.
The NFCI measures how tight or loose overall U.S. financial conditions are. It combines over 100 weekly indicators from the money, bond, and equity markets—along with credit and leverage data—into a single composite index.
The NFCI has three key subcomponents, each of which can be independently selected within the indicator:
Risk: Captures volatility, credit spreads, and overall market stress.
Credit: Tracks how easy or difficult it is to borrow across households and businesses.
Leverage: Reflects the level of debt and balance-sheet strength in the financial system.
When the NFCI rises, financial conditions are tightening — liquidity is contracting, borrowing costs are climbing, and investors tend to reduce risk.
When the NFCI falls, conditions are loosening — liquidity expands, credit flows more freely, and markets generally become more risk-seeking.
Traders often use the NFCI as a macro backdrop for risk appetite: rising values signal growing stress and defensive positioning, while falling values indicate improving liquidity and a more supportive market environment.
Mirpapa_Lib_boxLibrary   "Mirpapa_Lib_box" 
 AddFVG(boxes, htfTimeframe, htfBarIndex, top, bottom, isBull, _text) 
  AddFVG
@description FVG 박스 데이터 추가
  Parameters:
     boxes (array) : array 박스 배열
     htfTimeframe (string) : string HTF 시간대 ("60", "240", "D")
     htfBarIndex (int) : int HTF bar_index
     top (float) : float 상단 가격
     bottom (float) : float 하단 가격
     isBull (bool) : bool 방향 (true=상승, false=하락)
     _text (string) 
  Returns: void
 AddOB(boxes, htfTimeframe, htfBarIndex, top, bottom, isBull, _text) 
  AddOB
@description OB 박스 데이터 추가
  Parameters:
     boxes (array) : array 박스 배열
     htfTimeframe (string) : string HTF 시간대
     htfBarIndex (int) : int HTF bar_index
     top (float) : float 상단 가격
     bottom (float) : float 하단 가격
     isBull (bool) : bool 방향
     _text (string) 
  Returns: void
 AddBB(boxes, htfTimeframe, htfBarIndex, top, bottom, isBull, _text) 
  AddBB
@description BB 박스 데이터 추가
  Parameters:
     boxes (array) : array 박스 배열
     htfTimeframe (string) : string HTF 시간대
     htfBarIndex (int) : int HTF bar_index
     top (float) : float 상단 가격
     bottom (float) : float 하단 가격
     isBull (bool) : bool 방향
     _text (string) 
  Returns: void
 AddRB(boxes, htfTimeframe, htfBarIndex, top, bottom, isBull, _text) 
  AddRB
@description RB 박스 데이터 추가
  Parameters:
     boxes (array) : array 박스 배열
     htfTimeframe (string) : string HTF 시간대
     htfBarIndex (int) : int HTF bar_index
     top (float) : float 상단 가격
     bottom (float) : float 하단 가격
     isBull (bool) : bool 방향
     _text (string) 
  Returns: void
 ProcessBoxes(boxes, boxType, colorBull, colorBear, closeCount, useLine, textAlignH, textAlignV, closeColor) 
  ProcessBoxes
@description 박스 배열 처리 (생성→확장→터치→종료)
  Parameters:
     boxes (array) : array 박스 배열
     boxType (string) : string 박스 타입 ("FVG", "OB", "BB", "RB")
     colorBull (color) : color 상승 색상
     colorBear (color) : color 하락 색상
     closeCount (int) : int 터치 종료 횟수
     useLine (bool) : bool 중간라인 사용 여부
     textAlignH (string) : string 수평 정렬
     textAlignV (string) : string 수직 정렬
     closeColor (color) : color 종료 색상
  Returns: void
 GetActiveBoxCount(boxes) 
  GetActiveBoxCount
@description 활성 박스 개수 반환
  Parameters:
     boxes (array) : array 박스 배열
  Returns: int 활성 박스 개수
 ClearInactiveBoxes(boxes) 
  ClearInactiveBoxes
@description 비활성 박스 제거 (메모리 절약)
  Parameters:
     boxes (array) : array 박스 배열
  Returns: void
 BoxData 
  BoxData
  Fields:
     _isActive (series bool) : 박스 활성화 상태
     _isBull (series bool) : 방향 (true=상승, false=하락)
     _boxTop (series float) : 상단 가격
     _boxBot (series float) : 하단 가격
     _basePoint (series float) : 터치 감지 기준점
     _stage (series int) : 터치 횟수 카운터
     _type (series string) : 박스 타입 ("FVG", "OB", "BB", "RB")
     _htfTimeframe (series string) : HTF 시간대 ("60", "240", "D")
     _htfBarIndex (series int) : HTF 기준 bar_index
     _text (series string) : 사용자 추가 텍스트
     _box (series box) : 박스 객체 (ProcessBoxes에서 생성)
     _line (series line) : 라인 객체 (ProcessBoxes에서 생성)
Mirpapa_Lib_DivergenceLibrary   "Mirpapa_Lib_Divergence" 
다이버전스 감지 및 시각화 라이브러리 (범용 설계)
 newPivot(bar, priceVal, indVal) 
  피벗 포인트 생성
  Parameters:
     bar (int) : 바 인덱스
     priceVal (float) : 가격
     indVal (float) : 지표값
  Returns: PivotPoint
 newDivSettings(pivotLen, maxStore, maxShow) 
  다이버전스 설정 생성
  Parameters:
     pivotLen (int) : 피벗 좌우 캔들
     maxStore (int) : 저장 개수
     maxShow (int) : 표시 라인 개수
  Returns: DivergenceSettings
 emptyDivResult() 
  빈 다이버전스 결과
  Returns: 감지 안 된 DivergenceResult
 checkPivotHigh(length, source) 
  고점 피벗 감지
  Parameters:
     length (int) : 좌우 비교 캔들 수
     source (float) : 비교할 데이터 (지표값)
  Returns: 피벗 값 또는 na
 checkPivotLow(length, source) 
  저점 피벗 감지
  Parameters:
     length (int) : 좌우 비교 캔들 수
     source (float) : 비교할 데이터 (지표값)
  Returns: 피벗 값 또는 na
 addPivotToArray(pivotArray, pivot, maxSize) 
  피벗을 배열에 추가 (FIFO 방식)
  Parameters:
     pivotArray (array) : 피벗 배열
     pivot (PivotPoint) : 추가할 피벗
     maxSize (int) : 최대 크기
 checkBullishDivergence(pivotArray) 
  상승 다이버전스 체크 (Bullish)
  Parameters:
     pivotArray (array) : 저점 피벗 배열
  Returns: DivergenceResult
 checkBearishDivergence(pivotArray) 
  하락 다이버전스 체크 (Bearish)
  Parameters:
     pivotArray (array) : 고점 피벗 배열
  Returns: DivergenceResult
 createDivLine(result, lineColor, isOverlay) 
  다이버전스 라인 생성
  Parameters:
     result (DivergenceResult) : DivergenceResult
     lineColor (color) : 라인 색상
     isOverlay (bool) : true면 가격 기준, false면 지표 기준
  Returns:  
 cleanupLines(lineArray, labelArray, maxLines) 
  오래된 라인/라벨 정리
  Parameters:
     lineArray (array) : 라인 배열
     labelArray (array) : 라벨 배열
     maxLines (int) : 최대 유지 개수
 addLineAndCleanup(lineArray, labelArray, newLine, newLabel, maxLines) 
  라인/라벨 추가 및 자동 정리
  Parameters:
     lineArray (array) : 라인 배열
     labelArray (array) : 라벨 배열
     newLine (line) : 새 라인
     newLabel (label) : 새 라벨
     maxLines (int) : 최대 개수
 PivotPoint 
  피벗 데이터 저장
  Fields:
     barIndex (series int) : 바 인덱스
     price (series float) : 종가
     indicatorValue (series float) : 지표값
 DivergenceSettings 
  다이버전스 설정
  Fields:
     pivotLength (series int) : 피벗 좌우 캔들 수
     maxPivotsStore (series int) : 저장할 최대 피벗 개수
     maxLinesShow (series int) : 표시할 최대 라인 개수
 DivergenceResult 
  다이버전스 감지 결과
  Fields:
     detected (series bool) : 다이버전스 감지 여부
     isBullish (series bool) : true면 상승, false면 하락
     bar1 (series int) : 첫 번째 피벗 바 인덱스
     value1_price (series float) : 첫 번째 가격
     value1_ind (series float) : 첫 번째 지표값
     bar2 (series int) : 두 번째 피벗 바 인덱스
     value2_price (series float) : 두 번째 가격
     value2_ind (series float) : 두 번째 지표값
Mirpapa_Lib_MACDLibrary   "Mirpapa_Lib_MACD" 
MACD 계산 및 크로스 체크를 위한 라이브러리
 calc_smma(src, len) 
  SMMA (Smoothed Moving Average) 계산
  Parameters:
     src (float) : 소스 데이터
     len (simple int) : 길이
  Returns: SMMA 값
 calc_zlema(src, length) 
  ZLEMA (Zero Lag EMA) 계산
  Parameters:
     src (float) : 소스 데이터
     length (simple int) : 길이
  Returns: ZLEMA 값
 checkMacdCross(lengthMA, lengthSignal, src, enabled) 
  MACD 크로스오버 체크
  Parameters:
     lengthMA (simple int) : MACD 길이
     lengthSignal (int) : 시그널 길이
     src (float) : 소스 (기본값: hlc3)
     enabled (bool) : 계산 활성화 여부 (기본값: true)
  Returns: 
Cumulative Volume Library (plyst)Library   "CumulativeVolumeLib" 
 GetVolumeMetrics(lookback, calcType, useUSD, includeBybit, includeOKX, includeCoinbase, includeBitget, includeKucoin, includeKraken, includeMexc, includeGateio, includeHTX) 
  Parameters:
     lookback (simple int) 
     calcType (simple string) 
     useUSD (simple bool) 
     includeBybit (bool) 
     includeOKX (bool) 
     includeCoinbase (bool) 
     includeBitget (bool) 
     includeKucoin (bool) 
     includeKraken (bool) 
     includeMexc (bool) 
     includeGateio (bool) 
     includeHTX (bool)
Change% by Amit Multi-Period Returns Table 
This indicator displays percentage returns across multiple timeframes — 
1 Week, 
1 Month, 
3 Months, 
6 Months, 
12 Months.
This helps traders quickly assess short-term and long-term performance trends.
Positive returns are highlighted in blue, while negative returns are shown in red, allowing instant visual recognition of strength or weakness.
Ideal for spotting momentum shifts, relative performance, and trend consistency across different horizons.
Volume Profile, Pivot Anchored by DGT, updated by PlystEnhanced version of the original "Volume Profile, Pivot Anchored" indicator by @dgtrd.
**Original Features (by @dgtrd):**
- Volume Profile anchored to pivot points
- Point of Control (PoC), Value Area High/Low
- Customizable profile visualisation
- Volume-weighted colored bars
**My Additions:**
- Multi-exchange volume aggregation (Spot + Perpetuals)
- Support for 10 major exchanges (Binance, Bybit, OKX, Coinbase, Bitget, Kucoin, Kraken, MEXC, Gateio, HTX)
- Customizable spot and perpetual currency pairs
- Aggregation calculation options (SUM/AVG/MEDIAN/VARIANCE)
- Updated to Pine Script v6
The indicator now calculates volume profiles using aggregated volume data across multiple exchanges and markets, providing a more comprehensive view of market activity.
Full credit to @dgtrd for the original Volume Profile implementation. This version builds upon their excellent work with enhanced multi-exchange capabilities.
Rolling Correlation vs Another Symbol (SPY Default)This indicator visualizes the rolling correlation between the current chart symbol and another selected asset, helping traders understand how closely the two move together over time.
It calculates the Pearson correlation coefficient over a user-defined period (default 22 bars) and plots it as a color-coded line:
	•	Green line → positive correlation (move in the same direction)
	•	Red line → negative correlation (move in opposite directions)
	•	A gray dashed line marks the zero level (no correlation).
The background highlights periods of strong relationship:
	•	Light green when correlation > +0.7 (strong positive)
	•	Light red when correlation < –0.7 (strong negative)
Use this tool to quickly spot diversification opportunities, confirm hedges, or understand how assets interact during different market regimes.
Aggression IndexAggression index is a simple yet very helpful indicator. 
It measures:
-  the number of bull vs bear candles;
- bull vs bear volume;
- length bull vs bear candlesticks over a predetermined lookback period. 
It will use that information to come up with a delta for each measurement and an Aggression Index in the end.
Standardization (Z-score)Standardization, often referred to as Z-score normalization, is a data preprocessing technique that rescales data to have a mean of 0 and a standard deviation of 1. The resulting values, known as Z-scores, indicate how many standard deviations an individual data point is from the mean of the dataset (or a rolling sample of it).
This indicator calculates and plots the Z-score for a given input series over a specified lookback period. It is a fundamental tool for statistical analysis, outlier detection, and preparing data for certain machine learning algorithms.
## Core Concepts
*   **Standardization:** The process of transforming data to fit a standard normal distribution (or more generally, to have a mean of 0 and standard deviation of 1).
*   **Z-score (Standard Score):** A dimensionless quantity that represents the number of standard deviations by which a data point deviates from the mean of its sample.
    The formula for a Z-score is:
    `Z = (x - μ) / σ`
    Where:
    *   `x` is the individual data point (e.g., current value of the source series).
    *   `μ` (mu) is the mean of the sample (calculated over the lookback period).
    *   `σ` (sigma) is the standard deviation of the sample (calculated over the lookback period).
*   **Mean (μ):** The average value of the data points in the sample.
*   **Standard Deviation (σ):** A measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean, while a high standard deviation indicates that the values are spread out over a wider range.
## Common Settings and Parameters
| Parameter       | Type         | Default | Function                                                                                                | When to Adjust                                                                                                                                                              |
| :-------------- | :----------- | :------ | :------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Source          | series float | close   | The input data series (e.g., price, volume, indicator values).                                          | Choose the series you want to standardize.                                                                                                                                  |
| Lookback Period | int          | 20      | The number of bars (sample size) used for calculating the mean (μ) and standard deviation (σ). Min 2.   | A larger period provides more stable estimates of μ and σ but will be less responsive to recent changes. A shorter period is more reactive. `minval` is 2 because `ta.stdev` requires it. |
**Pro Tip:** Z-scores are excellent for identifying anomalies or extreme values. For instance, applying Standardization to trading volume can help quickly spot days with unusually high or low activity relative to the recent norm (e.g., Z-score > 2 or < -2).
## Calculation and Mathematical Foundation
The Z-score is calculated for each bar as follows, using a rolling window defined by the `Lookback Period`:
1.  **Calculate Mean (μ):** The simple moving average (`ta.sma`) of the `Source` data over the specified `Lookback Period` is calculated. This serves as the sample mean `μ`.
    `μ = ta.sma(Source, Lookback Period)`
2.  **Calculate Standard Deviation (σ):** The standard deviation (`ta.stdev`) of the `Source` data over the same `Lookback Period` is calculated. This serves as the sample standard deviation `σ`.
    `σ = ta.stdev(Source, Lookback Period)`
3.  **Calculate Z-score:**
    *   If `σ > 0`: The Z-score is calculated using the formula:
        `Z = (Current Source Value - μ) / σ`
    *   If `σ = 0`: This implies all values in the lookback window are identical (and equal to the mean). In this case, the Z-score is defined as 0, as the current source value is also equal to the mean.
    *   If `σ` is `na` (e.g., insufficient data in the lookback period), the Z-score is `na`.
> 🔍 **Technical Note:**
> *   The `Lookback Period` must be at least 2 for `ta.stdev` to compute a valid standard deviation.
> *   The Z-score calculation uses the sample mean and sample standard deviation from the rolling lookback window.
## Interpreting the Z-score
*   **Magnitude and Sign:**
    *   A Z-score of **0** means the data point is identical to the sample mean.
    *   A **positive Z-score** indicates the data point is above the sample mean. For example, Z = 1 means the point is 1 standard deviation above the mean.
    *   A **negative Z-score** indicates the data point is below the sample mean. For example, Z = -1 means the point is 1 standard deviation below the mean.
*   **Typical Range:** For data that is approximately normally distributed (bell-shaped curve):
    *   About 68% of Z-scores fall between -1 and +1.
    *   About 95% of Z-scores fall between -2 and +2.
    *   About 99.7% of Z-scores fall between -3 and +3.
*   **Outlier Detection:** Z-scores significantly outside the -2 to +2 range, and especially outside -3 to +3, are often considered outliers or extreme values relative to the recent historical data in the lookback window.
*   **Volatility Indication:** When applied to price, large absolute Z-scores can indicate moments of high volatility or significant deviation from the recent price trend.
The indicator plots horizontal lines at ±1, ±2, and ±3 standard deviations to help visualize these common thresholds.
## Common Applications
1.  **Outlier Detection:** Identifying data points that are unusual or extreme compared to the rest of the sample. This is a primary use in financial markets for spotting abnormal price moves, volume spikes, etc.
2.  **Comparative Analysis:** Allows for comparison of scores from different distributions that might have different means and standard deviations. For example, comparing the Z-score of returns for two different assets.
3.  **Feature Scaling in Machine Learning:** Standardizing features to have a mean of 0 and standard deviation of 1 is a common preprocessing step for many machine learning algorithms (e.g., SVMs, logistic regression, neural networks) to improve performance and convergence.
4.  **Creating Normalized Oscillators:** The Z-score itself can be used as a bounded (though not strictly between -1 and +1) oscillator, indicating how far the current price has deviated from its moving average in terms of standard deviations.
5.  **Statistical Process Control:** Used in quality control charts to monitor if a process is within expected statistical limits.
## Limitations and Considerations
*   **Assumption of Normality for Probabilistic Interpretation:** While Z-scores can always be calculated, the probabilistic interpretations (e.g., "68% of data within ±1σ") strictly apply to normally distributed data. Financial data is often not perfectly normal (e.g., it can have fat tails).
*   **Sensitivity of Mean and Standard Deviation to Outliers:** The sample mean (μ) and standard deviation (σ) used in the Z-score calculation can themselves be influenced by extreme outliers within the lookback period. This can sometimes mask or exaggerate the Z-score of other points.
*   **Choice of Lookback Period:** The Z-score is highly dependent on the `Lookback Period`. A short period makes it very sensitive to recent fluctuations, while a long period makes it smoother and less responsive. The appropriate period depends on the analytical goal.
*   **Stationarity:** For time series data, Z-scores are calculated based on a rolling window. This implicitly assumes some level of local stationarity (i.e., the mean and standard deviation are relatively stable within the window).
Multi-Session Viewer and AnalyzerFully customizable multi-session viewer that takes session analysis to the next level. It allows you to fully customize each session to your liking. Includes a feature that highlights certain periods of time on the chart and a Time Range Marker.
It helps you analyze the instrument that you trade and pinpoint which times are more volatile than others. It also helps you choose the best time to trade your instrument and align your life schedule with the market.
NZDUSD Example:
- 3 major sessions displayed.
- Although this is NZDUSD, Sydney is not the best time to trade this pair. Volatility picks up at Tokyo open.
- I have time to trade in the evening from 18:00 to 22:00 PST. I live in a different time zone, whereas market is based on EST. How does the pair behave during the time I am available to trade based on my time zone? Time Range Marker feature allows you to see this clearly on the chart (black lines).
- I have some time in the morning to trade during New York session, but there is no way I am waking up at 05:00 PST. 06:30 PST seems doable. Blue highlighted area is good time to trade during New York session based on what Bob said. It seem like this aligns with when I am available and when I am able to trade. Volatility is also at its peak.
- I am also available to trade between London close and Tokyo open on some days of the week, but... based on what I see, green highlighted area is clearly showing that I probably don't want to waste my time trading this pair from London close and until Tokyo open. I will use this time for something else rather than be stuck in a range.
MAHAR K Stochastic IndicatorWhat It Does
%K line calculates fast stochastic of _src over length, then re-smoothed twice: sk (smoothK), %D (smoothD), and slower %F (smoothF).
Plots the three lines, draws 80/50/20 bands, and highlights extreme values by drawing red circles when sk hits 100 and green when it hits 0.
Notable Details
sma_signal chooses the smoothing kernel (SMA, EMA, WMA, DEMA). ma() delegates to the selected function and contains a VWMA branch even though VWMA is not listed in the input options.
A custom dema() helper implements the classic double EMA.
stOBOS is always true, so the ternary wrappers around the circle plots can be simplified.
Risk / Edge Cases
If highestHigh == lowestLow (flat price over the window) the %K calculation divides by zero, yielding na. Consider guarding against that or defaulting to previous values.
To actually expose VWMA, add it to the input options; otherwise remove the dead code branch.
Next Steps
Decide whether to safeguard the denominator before plotting.
Align the smoothing options with the available choices and prune the redundant conditionals if desired.
LAST UPA FOR DA DAYWell been fing around most the day now, TBH this is showing results , Much respect to all along the journey , mess with the setting make them natural colors for you
Forex Dynamic Lot Size CalculatorForex Dynamic Lot Size Calculator for Forex. Works on USD Base and USD Quote pairs. Provides real-time data based on stop-loss location. Allows you to know in real-time how the number of lots you need to purchase to match your risk %.
Number of Lots is calculated based on total risk. Total risk is calculated based on Stop-Loss + Commission + Spread Fees + Slippage measured in pips. Also includes data such as break-even pips, net take profit, margin required, buying power used, and a few others. All are real-time and anchored to the current price.
The intention of creating this indicator is to help with risk management. You know exactly how many lots you need to get this very moment to have your total risk at lets say $250, which includes commission fees, spread fees, and slippage.
To put it simply, if I was to enter the trade right now and willing to risk exactly $250, how many lots will I need to get right this second?
---
- To use adjust Account Settings along with other variables.
- Stop Loss Mode can be Manual or Dynamic. If you select Dynamic, then you will have to adjust Stop Loss Level to where you can see the reference line on the screen. It is at 1.1 by default. Just enter current price and the line will appear. Adjust it by dragging it to where you want your stop loss to be.
- Take Profit Mode can also be Manual or Dynamic. I just keep my TP at Manual and use Quick Access to set Quick RR levels.
- Adjust Spreads and Slippage to your liking. I tried to have TV calculate current spread, but it seem like it doesn't have access to real-life data for me like MT5 does. I just use average instead. Both are optional, depending on your broker and type of account you use.
- Pip Value for the current pair, Return on Margin, and Break-even line can be turned on and off, based on your needs. I just get the Break-even value in pips from the pannel and use that as reference where I need to relocate my stop loss to break-ever (commission + spreds + slippage).
- Panel is fully customizable based on your liking. Important fields are highlighted along with reference lines.






















