PROTECTED SOURCE SCRIPT
מעודכן Exact-Month Avg & Vol (USDT) + Winsor/Clip/RV - V0.95d by McToga

What the indicator does
1) Data basis & window Uses the chart symbol by default (or manually via input). Works internally with daily closing prices (request.security(..., “D”, ...)) – regardless of whether you use D/W/M in the chart. Exact monthly logic: The evaluation window is determined by actual calendar months (1/3/6/12 or custom), not by fixed 30/90 days.
2) Returns & preprocessingReturn definition selectable: logarithmic (default) or simple return – each in %/day. Winsorizing (lower/upper percentile) and clipping (|r| ≤ X percentage points) optional to limit outliers.
3) Key figures (not annualized)Arithmetic daily volatility: Mean of absolute daily returns in %.Median volatility: Median of absolute daily returns in %. Standard deviation (StdDev) of daily returns in %. Realized variance (RV) = Σ r² and √RV (indicative of cumulative realized vol).
4) Annualization (optional) Basis 252 or 365 days. For |r|-based measures (arithmetic/median), optional Abs→Sigma factor √(π/2) to bring them closer to StdDev. Provides arithmetic p.a., median p.a., StdDev p.a., RV p.a..
5) Additional metrics Avg Price: Arithmetic average of daily closes in the window. Days (effDays): Number of trading days actually considered in the window.
6) Display & operation Only active on D/W/M (intraday everything is suppressed). Short mode (default): compact table with Avg Price • Days • Arith Vol • Median Vol • StdDev • √RV • Arith p.a. • Median p.a. • StdDev p.a. • RV p.a. Full mode: detailed table; individual rows can be toggled (Avg Price, Arith/Median/StdDev, RV, Annuals). Positions: table can be selected at 4 corners; toggle without restarting. Label (optional): compact text summary on the chart (corner selectable). Price plot (optional): 1D close as overlay.
7) Help, Debug & AlertsOnline help: 3 lines in the status bar (Help-On variant).Debug table (optional): shows RetCount, Winsor limits, clip status, key figures.Alert: Trigger when arithmetic daily volatility ≥ threshold value.
8) RobustnessTables/label handles are correctly deleted/recreated when TF/mode/position changes.No prohibited global writes in functions; clear typing (no na on bool).Typical useSelect monthly window (e.g., 3M) → optionally set Winsor/clip.Short or full as needed; select position. Annualization on/off; activate Abs→Sigma if necessary. Optional: Switch on label/price plot/debug; set alert threshold.
1) Data basis & window Uses the chart symbol by default (or manually via input). Works internally with daily closing prices (request.security(..., “D”, ...)) – regardless of whether you use D/W/M in the chart. Exact monthly logic: The evaluation window is determined by actual calendar months (1/3/6/12 or custom), not by fixed 30/90 days.
2) Returns & preprocessingReturn definition selectable: logarithmic (default) or simple return – each in %/day. Winsorizing (lower/upper percentile) and clipping (|r| ≤ X percentage points) optional to limit outliers.
3) Key figures (not annualized)Arithmetic daily volatility: Mean of absolute daily returns in %.Median volatility: Median of absolute daily returns in %. Standard deviation (StdDev) of daily returns in %. Realized variance (RV) = Σ r² and √RV (indicative of cumulative realized vol).
4) Annualization (optional) Basis 252 or 365 days. For |r|-based measures (arithmetic/median), optional Abs→Sigma factor √(π/2) to bring them closer to StdDev. Provides arithmetic p.a., median p.a., StdDev p.a., RV p.a..
5) Additional metrics Avg Price: Arithmetic average of daily closes in the window. Days (effDays): Number of trading days actually considered in the window.
6) Display & operation Only active on D/W/M (intraday everything is suppressed). Short mode (default): compact table with Avg Price • Days • Arith Vol • Median Vol • StdDev • √RV • Arith p.a. • Median p.a. • StdDev p.a. • RV p.a. Full mode: detailed table; individual rows can be toggled (Avg Price, Arith/Median/StdDev, RV, Annuals). Positions: table can be selected at 4 corners; toggle without restarting. Label (optional): compact text summary on the chart (corner selectable). Price plot (optional): 1D close as overlay.
7) Help, Debug & AlertsOnline help: 3 lines in the status bar (Help-On variant).Debug table (optional): shows RetCount, Winsor limits, clip status, key figures.Alert: Trigger when arithmetic daily volatility ≥ threshold value.
8) RobustnessTables/label handles are correctly deleted/recreated when TF/mode/position changes.No prohibited global writes in functions; clear typing (no na on bool).Typical useSelect monthly window (e.g., 3M) → optionally set Winsor/clip.Short or full as needed; select position. Annualization on/off; activate Abs→Sigma if necessary. Optional: Switch on label/price plot/debug; set alert threshold.
הערות שחרור
What the indicator does1.) Data basis & window Uses the chart symbol by default (or manually via input).
Works internally with daily closing prices (request.security(..., “D”, ...))
regardless of whether you use D/W/M in the chart.
Exact monthly logic: The evaluation window is determined by
actual calendar months (1/3/6/12 or custom), not by fixed 30/90 days.
2.) Returns & preprocessingReturn definition selectable:
logarithmic (default) or simple return – each in %/day.
Winsorizing (lower/upper percentile) and clipping (|r| ≤ X percentage points)
optional to limit outliers.
3.) Key figures (not annualized) Arithmetic daily volatility:
Mean of absolute daily returns in %.Median volatility: Median of absolute daily returns in %.
Standard deviation (StdDev) of daily returns in %.
Realized variance (RV) = Σ r² and √RV (indicative of cumulative realized vol).
4.) Annualization (optional) Basis 252 or 365 days.
For |r|-based measures (arithmetic/median), optional Abs→Sigma factor √(π/2)
to bring them closer to StdDev. Provides arithmetic p.a., median p.a., StdDev p.a., RV p.a..
5.) Additional metrics Avg Price:
Arithmetic average of daily closes in the window.
Days (effDays): Number of trading days actually considered in the window.
6.) Display & operation Only active on D/W/M (intraday everything is suppressed).
Short mode (default):
compact table with
Avg Price • Days • Arith Vol • Median Vol • StdDev • √RV • Arith p.a. •
Median p.a. • StdDev p.a. • RV p.a.
Full mode: detailed table; individual rows can be toggled
(Avg Price, Arith/Median/StdDev, RV, Annuals).
Positions: table can be selected at 4 corners; toggle without restarting.
Label (optional): compact text summary on the chart (corner selectable).
Price plot (optional): 1D close as overlay.
7.) Help, Debug & AlertsOnline help: 3 lines in the status bar (Help-On variant).
Debug table (optional): shows RetCount, Winsor limits, clip status, key figures.
Alert: Trigger when arithmetic daily volatility ≥ threshold value.
8.) RobustnessTables/label handles are correctly deleted/recreated
when TF/mode/position changes.
No prohibited global writes in functions; clear typing (no na on bool).
Typical useSelect monthly window (e.g., 3M) → optionally set Winsor/clip.
Short or full as needed; select position. Annualization on/off;
activate Abs→Sigma if necessary.
Optional: Switch on label/price plot/debug; set alert threshold.
סקריפט מוגן
סקריפט זה פורסם כמקור סגור. עם זאת, אתה יכול להשתמש בו באופן חופשי וללא כל הגבלה - למד עוד כאן.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
סקריפט מוגן
סקריפט זה פורסם כמקור סגור. עם זאת, אתה יכול להשתמש בו באופן חופשי וללא כל הגבלה - למד עוד כאן.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.