Syntax
public RegressionDivergence(Bars bars, Bars barsFirst, Bars barsSecond, int periodRegression, int periodRegressionMomentum, int periodROC, string description)
public static RegressionDivergence Series(Bars bars, Bars barsFirst, Bars barsSecond, int periodRegression, int periodRegressionMomentum, int periodROC)
Parameter Description
bars | Bars object |
barsFirst | First symbol for building correlation (FXY) |
barsSecond | Secondsymbol for building correlation (SPY) |
periodRegression | Divergence regression lookback period |
periodRegressionMomentum | Regression momentum lookback period |
periodROC | ROC lookback period |
Description
Created by Markos Katsanos, Regression Divergence calculates the divergence between a security and related market by regressing the rate of change between the two securities and then calculating the difference of the actual from the forecasted price.
Example
Please refer to
July 2017 Traders' Tip article's code in Stocks and Commodities Magazine.