OPEN-SOURCE SCRIPT
Average Two Sources - Z-Score [supruzr]

Average Two Sources – Z-Score
This utility indicator lets you combine and compare any two sources on a common scale using Z‑score normalization. It’s designed for cases where you want to blend indicators or prices that live on different value ranges.
How it works
Each source is converted to a Z‑score over the selected Normalization Period (value minus mean, divided by standard deviation).
The script plots both Z‑scores plus their simple average.
A value above 0 means the source is above its recent mean; below 0 means it’s below its recent mean.
Typical uses
Combine two different oscillators (e.g., RSI + custom momentum) into a single averaged signal.
Blend price‑based data with breadth, volume, or volatility measures.
Quickly see when both inputs are stretched in the same direction versus when they diverge.
Inputs
Source 1 / Source 2: Any price or indicator output.
Normalization Period: Lookback length used to compute Z‑scores (default 20).
Created by supruzr.
This utility indicator lets you combine and compare any two sources on a common scale using Z‑score normalization. It’s designed for cases where you want to blend indicators or prices that live on different value ranges.
How it works
Each source is converted to a Z‑score over the selected Normalization Period (value minus mean, divided by standard deviation).
The script plots both Z‑scores plus their simple average.
A value above 0 means the source is above its recent mean; below 0 means it’s below its recent mean.
Typical uses
Combine two different oscillators (e.g., RSI + custom momentum) into a single averaged signal.
Blend price‑based data with breadth, volume, or volatility measures.
Quickly see when both inputs are stretched in the same direction versus when they diverge.
Inputs
Source 1 / Source 2: Any price or indicator output.
Normalization Period: Lookback length used to compute Z‑scores (default 20).
Created by supruzr.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.