RegressionDivergence

Modified on 2017/05/26 10:37 by Eugene — Categorized as: TASCIndicators

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

barsBars object
barsFirstFirst symbol for building correlation (FXY)
barsSecondSecondsymbol for building correlation (SPY)
periodRegressionDivergence regression lookback period
periodRegressionMomentumRegression momentum lookback period
periodROCROC 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.