Hi eSignal Community,
In this topic we intend to publish new EFS Studies with source codes, full descriptions and instructions, several times per week.
You're invited to ask any questions concerning EFS programming or post your wishes we'll surely take into account ASAP.
The first indicator we are publishing is Z-score by Veronique Valcu.
Miscellaneous > Z-Score [eSignal EFS Indicators]
Download: http://share.esignal.com/download.js...le=z-score.efs
Category: Indicator > Miscellaneous
Description:
The author of this indicator is Veronique Valcu. The z-score (z) for a data item x measures the distance (in standard deviations StdDev) and direction of the item from its mean (U):
z = (x-StdDev) / U
A value of zero indicates that the data item x is equal to the mean U, while positive or negative values show that the data item is above (x>U) or below (x Values of +2 and -2 show that the data item is two standard deviations above or below the chosen mean, respectively, and over 95.5% of all data items are contained within these two horizontal references (see Figure 1).
We substitute x with the closing price C, the mean U with simple moving average (SMA) of n periods (n), and StdDev with the standard deviation of closing prices for n periods, the above formula becomes:
Z–score = (C – SMA(n)) / StdDev(C,n)
The z-score indicator is not new, but its use can be seen as a supplement to Bollinger bands. It offers a simple way to assess the position of the price vis-a-vis its resistance and support levels expressed by the Bollinger Bands. In addition, crossings of z-score averages may signal the start or the end of a tradable trend. Traders may take a step further and look for stronger signals by identifying common crossing points of z-score, its average, and average of average.
Inputs:
Period - number of bars to use in calculation
EFS Code:
In this topic we intend to publish new EFS Studies with source codes, full descriptions and instructions, several times per week.
You're invited to ask any questions concerning EFS programming or post your wishes we'll surely take into account ASAP.
The first indicator we are publishing is Z-score by Veronique Valcu.
Miscellaneous > Z-Score [eSignal EFS Indicators]
Download: http://share.esignal.com/download.js...le=z-score.efs
Category: Indicator > Miscellaneous
Description:
The author of this indicator is Veronique Valcu. The z-score (z) for a data item x measures the distance (in standard deviations StdDev) and direction of the item from its mean (U):
z = (x-StdDev) / U
A value of zero indicates that the data item x is equal to the mean U, while positive or negative values show that the data item is above (x>U) or below (x Values of +2 and -2 show that the data item is two standard deviations above or below the chosen mean, respectively, and over 95.5% of all data items are contained within these two horizontal references (see Figure 1).
We substitute x with the closing price C, the mean U with simple moving average (SMA) of n periods (n), and StdDev with the standard deviation of closing prices for n periods, the above formula becomes:
Z–score = (C – SMA(n)) / StdDev(C,n)
The z-score indicator is not new, but its use can be seen as a supplement to Bollinger bands. It offers a simple way to assess the position of the price vis-a-vis its resistance and support levels expressed by the Bollinger Bands. In addition, crossings of z-score averages may signal the start or the end of a tradable trend. Traders may take a step further and look for stronger signals by identifying common crossing points of z-score, its average, and average of average.
Inputs:
Period - number of bars to use in calculation
EFS Code:
Code:
/************************************************* Desctiption: Z-Score Indicator by Veronique Valcu Provided by: TS Support, LLC for eSignal. (c) Copyright 2002 *************************************************/ var ma = null; function preMain() { setStudyTitle("Z-Score"); setCursorLabelName("Z-Score", 0); setDefaultBarFgColor(Color.red, 0); addBand(0, PS_SOLID, 1, Color.lightgrey); } function main(Period) { var StdDev = 0; var SumSqr = 0; var counter = 0; if(Period == null) Period = 20; if(ma == null) ma = new MAStudy(Period, 0, "Close", MAStudy.SIMPLE); for(counter = - Period + 1; counter <= 0; counter++) SumSqr += Math.pow((close(counter) - ma.getValue(MAStudy.MA)),2); StdDev = Math.sqrt(SumSqr / Period); return (close() - ma.getValue(MAStudy.MA)) / StdDev; }
Comment