TradingView
loxx
Jul 23, 2022 10:26 PM

Price-Filtered Spearman Rank Correl. w/ Floating Levels [Loxx] 

U.S. Dollar/Canadian DollarFXCM

描述

Price-Filtered Spearman Rank Correl. w/ Floating Levels [Loxx] is a Spearman Rank Correlation indicator with optional source filtering and floating levels.

What is Spearman rank correlation?
Spearman rank correlation, also known as Spearman coefficient is a formula used to identify the strength of the link between two datasets. This coefficient is a method that can be used to assess the strength of a relationship apart from the direction it takes. The formula, named after Charles Spearman, a mathematician, can only be used in circumstances where data can be categorized or put in order, for instance, the highest to the lowest.

For a better understanding of Spearman coefficient, it helps to get a sense of what monotonic function means. There’s a monotonic relationship under these circumstances:

– When the variable values rise together.
– When one variable value rises the other variable value lowers.
– The rate of movement of the variables need not necessarily be constant.
The Spearman correlation coefficient or rs, between +1 and -1, where +1 indicates a perfect strength between variables, while zero shows no association and -1 shows a perfect negative strength.

Spearman rank correlation theory:
A nonparametric (distribution-free) rank statistic proposed by Spearman in 1904 as a measure of the strength of the associations between two variables (Lehmann and D'Abrera 1998). The Spearman rank correlation coefficient can be used to give an R-estimate, and is a measure of monotone association that is used when the distribution of the data make Pearson's correlation coefficient undesirable or misleading.

Included:
  • Zero-line and signal cross options for bar coloring, signals, and alerts
  • Alerts
  • 3 Signal types
  • Loxx's Expanded Source Types

版本注释

Removed unused inputs.

版本注释

Small UI update.Next update I'll add the ability to paint reversals, but it should be obvious where the reversal prints are right now.
评论
bencameron1978
If it compares two datasets why are their no inputs - there is no ability to compare two data sets?
slowcoconut
@bencameron1978, look at lines 46-52, 116-119, adjust as needed
slowcoconut
@loxx I don't see a reference to a second source either... though I've added custom external source selection changing the lines I mentioned above, a closer look at the matrix manipulation within Spearman shows no comparison to price... correct me if I'm wrong here... thanks
loxx
@slowcoconut, its autocorrelation
slowcoconut
@loxx, oh I see -- some sort of static autocorrelation? typically with autocorrelation as each new value occurs, the correlation with previous values adjusts accordingly -- in this case you are adapting spearman to autocorrelate against some set moving window of values? The window is determined by rank size, default 32..
loxx
@slowcoconut, yep, this works more like a Stochastic indicator and a reversal indicator but with better outcomes
更多