DojiEmoji

Trend Finder with Coefficient of Variation

DojiEmoji Aktualisiert   
Coefficient of variation (“COV”) is a statistical measure used to describe the variability of values within a data set, it’s calculated by taking the standard deviation divided by the mean.

Traditionally, COV is applied to the expected returns of competing investment portfolios. A risk adverse investor prefers to accept a portfolio with a relatively lower COV value.

On the other hand, when applying COV to price charts, the difference is that instead of looking at expected returns, we now treat price as the source of data. We look at price from a moving average perspective. This script purely focuses on price.

What this indicator does:

Firstly, to go over the parameters:
Let ‘n’ be the lookback period for computing COV, and ‘m’ be the period for comparing the ranking of COVs.

Logics in a nutshell:
This program will (A) calculate the COV by dividing the moving standard deviation by moving average over ‘n’ bars, and then (B) illustrate the relationship of how COV at each bar ranks compared to COVs over past ‘m’ bars. We use a color scale (default black and yellow) for visualizing ranking in terms of percentiles. If COV is below its median value, then we assume that price is consolidating.

Hypothesis:
Using COV on top of regular SMA signals should reduce a lot of unwanted noise such as consecutive crossovers during ranging-periods. Traders want volatility, but not too much of it when sniping for entry opportunities (speaking of initial position; need to add to winning positions after, but this is for another topic). For this reason, the median value of COV is suitable as a metric for signals.

Applications:
We use the median value of COV to form a decision rule. A signal is generated when COV > median(COV,m), and the direction of trend is determined based on relative position of price with respect to sma(price,n). When the value of COV is increasing, it can also be thought of seeing Bollinger Bands beginning to bulge. When trends begin, this program will plot triangles to signify entry opportunities.



Versionshinweise:
Added option to turn background colors on/off
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?