首页 > 问答热点>正文

通达信CYC指标图(cyc指标公式源码?)

中亿财经网 gengxing 2023-09-08 15:57:08

1. cyc指标公式源码?

Cyc指标(Cycle Indicator)是一种用于研究股票、期货、外汇等市场的技术指标。它的计算方法比较复杂,涉及到多个参数和数学公式。以下是Cyc指标的计算公式源码,供参考:qDt中亿财经网财经门户

```qDt中亿财经网财经门户

// 计算Cyc指标qDt中亿财经网财经门户

double[] Cyc(double[] close, int n, double w) {qDt中亿财经网财经门户

// 初始化变量qDt中亿财经网财经门户

double[] cycle = new double[close.Length];qDt中亿财经网财经门户

double[] trend = new double[close.Length];qDt中亿财经网财经门户

double[] deviation = new double[close.Length];qDt中亿财经网财经门户

double[] period = new double[close.Length];qDt中亿财经网财经门户

double[] smooth = new double[close.Length];qDt中亿财经网财经门户

double[] dc = new double[close.Length];qDt中亿财经网财经门户

double[] cyc = new double[close.Length];qDt中亿财经网财经门户

double[] sum1 = new double[close.Length];qDt中亿财经网财经门户

double[] sum2 = new double[close.Length];qDt中亿财经网财经门户

double[] sum3 = new double[close.Length];qDt中亿财经网财经门户

double[] sum4 = new double[close.Length];qDt中亿财经网财经门户

double[] sum5 = new double[close.Length];qDt中亿财经网财经门户

double[] sum6 = new double[close.Length];qDt中亿财经网财经门户

double[] sum7 = new double[close.Length];qDt中亿财经网财经门户

double[] sum8 = new double[close.Length];qDt中亿财经网财经门户

double[] sum9 = new double[close.Length];qDt中亿财经网财经门户

// 计算周期qDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

// 计算价格波动率qDt中亿财经网财经门户

double sum = 0;qDt中亿财经网财经门户

for (int j = i - n; j <= i; j++) {qDt中亿财经网财经门户

sum += Math.Abs(close[j] - close[j - 1]);qDt中亿财经网财经门户

}qDt中亿财经网财经门户

deviation[i] = sum / n;qDt中亿财经网财经门户

// 计算周期qDt中亿财经网财经门户

if (deviation[i] != 0) {qDt中亿财经网财经门户

period[i] = 0.5 / (deviation[i] / close[i - 1]);qDt中亿财经网财经门户

} else {qDt中亿财经网财经门户

period[i] = period[i - 1];qDt中亿财经网财经门户

}qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算趋势qDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

if (i == n + 1) {qDt中亿财经网财经门户

trend[i] = 0.5 * (close[i] - close[i - n]);qDt中亿财经网财经门户

} else {qDt中亿财经网财经门户

trend[i] = (1 - w) * trend[i - 1] + w * 0.5 * (close[i] - close[i - n]);qDt中亿财经网财经门户

}qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算平滑系数qDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

smooth[i] = 0.15 * period[i] + 0.85 * smooth[i - 1];qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算DCqDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

dc[i] = 0.5 * (1 + Math.Cos(2 * Math.PI / smooth[i]));qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算CycqDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

sum1[i] = 0.0962 * close[i] + 0.5769 * close[i - 2] - 0.5769 * close[i - 4] - 0.0962 * close[i - 6];qDt中亿财经网财经门户

sum2[i] = 0.075 * sum1[i] + 0.54 * sum1[i - 1] + 0.54 * sum1[i - 2] + 0.075 * sum1[i - 3];qDt中亿财经网财经门户

sum3[i] = sum2[i] - dc[i] * sum2[i];qDt中亿财经网财经门户

sum4[i] = 0.0962 * sum3[i] + 0.5769 * sum3[i - 2] - 0.5769 * sum3[i - 4] - 0.0962 * sum3[i - 6];qDt中亿财经网财经门户

sum5[i] = 0.075 * sum4[i] + 0.54 * sum4[i - 1] + 0.54 * sum4[i - 2] + 0.075 * sum4[i - 3];qDt中亿财经网财经门户

sum6[i] = sum5[i] - dc[i] * sum5[i];qDt中亿财经网财经门户

sum7[i] = 0.0962 * sum6[i] + 0.5769 * sum6[i - 2] - 0.5769 * sum6[i - 4] - 0.0962 * sum6[i - 6];qDt中亿财经网财经门户

sum8[i] = 0.075 * sum7[i] + 0.54 * sum7[i - 1] + 0.54 * sum7[i - 2] + 0.075 * sum7[i - 3];qDt中亿财经网财经门户

sum9[i] = sum8[i] - dc[i] * sum8[i];qDt中亿财经网财经门户

cyc[i] = 0.2 * sum9[i] + 0.8 * cyc[i - 1];qDt中亿财经网财经门户

}qDt中亿财经网财经门户

return cyc;qDt中亿财经网财经门户

}qDt中亿财经网财经门户

```qDt中亿财经网财经门户

其中,参数`close`表示收盘价序列,`n`表示周期长度,`w`表示趋势平滑系数。该源码中包含了Cyc指标的完整计算过程,可以直接调用该方法进行计算。qDt中亿财经网财经门户

2. cyc指标公式源码?

Cyc指标(Cycle Indicator)是一种用于研究股票、期货、外汇等市场的技术指标。它的计算方法比较复杂,涉及到多个参数和数学公式。以下是Cyc指标的计算公式源码,供参考:qDt中亿财经网财经门户

```qDt中亿财经网财经门户

// 计算Cyc指标qDt中亿财经网财经门户

double[] Cyc(double[] close, int n, double w) {qDt中亿财经网财经门户

// 初始化变量qDt中亿财经网财经门户

double[] cycle = new double[close.Length];qDt中亿财经网财经门户

double[] trend = new double[close.Length];qDt中亿财经网财经门户

double[] deviation = new double[close.Length];qDt中亿财经网财经门户

double[] period = new double[close.Length];qDt中亿财经网财经门户

double[] smooth = new double[close.Length];qDt中亿财经网财经门户

double[] dc = new double[close.Length];qDt中亿财经网财经门户

double[] cyc = new double[close.Length];qDt中亿财经网财经门户

double[] sum1 = new double[close.Length];qDt中亿财经网财经门户

double[] sum2 = new double[close.Length];qDt中亿财经网财经门户

double[] sum3 = new double[close.Length];qDt中亿财经网财经门户

double[] sum4 = new double[close.Length];qDt中亿财经网财经门户

double[] sum5 = new double[close.Length];qDt中亿财经网财经门户

double[] sum6 = new double[close.Length];qDt中亿财经网财经门户

double[] sum7 = new double[close.Length];qDt中亿财经网财经门户

double[] sum8 = new double[close.Length];qDt中亿财经网财经门户

double[] sum9 = new double[close.Length];qDt中亿财经网财经门户

// 计算周期qDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

// 计算价格波动率qDt中亿财经网财经门户

double sum = 0;qDt中亿财经网财经门户

for (int j = i - n; j <= i; j++) {qDt中亿财经网财经门户

sum += Math.Abs(close[j] - close[j - 1]);qDt中亿财经网财经门户

}qDt中亿财经网财经门户

deviation[i] = sum / n;qDt中亿财经网财经门户

// 计算周期qDt中亿财经网财经门户

if (deviation[i] != 0) {qDt中亿财经网财经门户

period[i] = 0.5 / (deviation[i] / close[i - 1]);qDt中亿财经网财经门户

} else {qDt中亿财经网财经门户

period[i] = period[i - 1];qDt中亿财经网财经门户

}qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算趋势qDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

if (i == n + 1) {qDt中亿财经网财经门户

trend[i] = 0.5 * (close[i] - close[i - n]);qDt中亿财经网财经门户

} else {qDt中亿财经网财经门户

trend[i] = (1 - w) * trend[i - 1] + w * 0.5 * (close[i] - close[i - n]);qDt中亿财经网财经门户

}qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算平滑系数qDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

smooth[i] = 0.15 * period[i] + 0.85 * smooth[i - 1];qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算DCqDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

dc[i] = 0.5 * (1 + Math.Cos(2 * Math.PI / smooth[i]));qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算CycqDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

sum1[i] = 0.0962 * close[i] + 0.5769 * close[i - 2] - 0.5769 * close[i - 4] - 0.0962 * close[i - 6];qDt中亿财经网财经门户

sum2[i] = 0.075 * sum1[i] + 0.54 * sum1[i - 1] + 0.54 * sum1[i - 2] + 0.075 * sum1[i - 3];qDt中亿财经网财经门户

sum3[i] = sum2[i] - dc[i] * sum2[i];qDt中亿财经网财经门户

sum4[i] = 0.0962 * sum3[i] + 0.5769 * sum3[i - 2] - 0.5769 * sum3[i - 4] - 0.0962 * sum3[i - 6];qDt中亿财经网财经门户

sum5[i] = 0.075 * sum4[i] + 0.54 * sum4[i - 1] + 0.54 * sum4[i - 2] + 0.075 * sum4[i - 3];qDt中亿财经网财经门户

sum6[i] = sum5[i] - dc[i] * sum5[i];qDt中亿财经网财经门户

sum7[i] = 0.0962 * sum6[i] + 0.5769 * sum6[i - 2] - 0.5769 * sum6[i - 4] - 0.0962 * sum6[i - 6];qDt中亿财经网财经门户

sum8[i] = 0.075 * sum7[i] + 0.54 * sum7[i - 1] + 0.54 * sum7[i - 2] + 0.075 * sum7[i - 3];qDt中亿财经网财经门户

sum9[i] = sum8[i] - dc[i] * sum8[i];qDt中亿财经网财经门户

cyc[i] = 0.2 * sum9[i] + 0.8 * cyc[i - 1];qDt中亿财经网财经门户

}qDt中亿财经网财经门户

return cyc;qDt中亿财经网财经门户

}qDt中亿财经网财经门户

```qDt中亿财经网财经门户

其中,参数`close`表示收盘价序列,`n`表示周期长度,`w`表示趋势平滑系数。该源码中包含了Cyc指标的完整计算过程,可以直接调用该方法进行计算。qDt中亿财经网财经门户

3. cyc指标公式源码?

Cyc指标(Cycle Indicator)是一种用于研究股票、期货、外汇等市场的技术指标。它的计算方法比较复杂,涉及到多个参数和数学公式。以下是Cyc指标的计算公式源码,供参考:qDt中亿财经网财经门户

```qDt中亿财经网财经门户

// 计算Cyc指标qDt中亿财经网财经门户

double[] Cyc(double[] close, int n, double w) {qDt中亿财经网财经门户

// 初始化变量qDt中亿财经网财经门户

double[] cycle = new double[close.Length];qDt中亿财经网财经门户

double[] trend = new double[close.Length];qDt中亿财经网财经门户

double[] deviation = new double[close.Length];qDt中亿财经网财经门户

double[] period = new double[close.Length];qDt中亿财经网财经门户

double[] smooth = new double[close.Length];qDt中亿财经网财经门户

double[] dc = new double[close.Length];qDt中亿财经网财经门户

double[] cyc = new double[close.Length];qDt中亿财经网财经门户

double[] sum1 = new double[close.Length];qDt中亿财经网财经门户

double[] sum2 = new double[close.Length];qDt中亿财经网财经门户

double[] sum3 = new double[close.Length];qDt中亿财经网财经门户

double[] sum4 = new double[close.Length];qDt中亿财经网财经门户

double[] sum5 = new double[close.Length];qDt中亿财经网财经门户

double[] sum6 = new double[close.Length];qDt中亿财经网财经门户

double[] sum7 = new double[close.Length];qDt中亿财经网财经门户

double[] sum8 = new double[close.Length];qDt中亿财经网财经门户

double[] sum9 = new double[close.Length];qDt中亿财经网财经门户

// 计算周期qDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

// 计算价格波动率qDt中亿财经网财经门户

double sum = 0;qDt中亿财经网财经门户

for (int j = i - n; j <= i; j++) {qDt中亿财经网财经门户

sum += Math.Abs(close[j] - close[j - 1]);qDt中亿财经网财经门户

}qDt中亿财经网财经门户

deviation[i] = sum / n;qDt中亿财经网财经门户

// 计算周期qDt中亿财经网财经门户

if (deviation[i] != 0) {qDt中亿财经网财经门户

period[i] = 0.5 / (deviation[i] / close[i - 1]);qDt中亿财经网财经门户

} else {qDt中亿财经网财经门户

period[i] = period[i - 1];qDt中亿财经网财经门户

}qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算趋势qDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

if (i == n + 1) {qDt中亿财经网财经门户

trend[i] = 0.5 * (close[i] - close[i - n]);qDt中亿财经网财经门户

} else {qDt中亿财经网财经门户

trend[i] = (1 - w) * trend[i - 1] + w * 0.5 * (close[i] - close[i - n]);qDt中亿财经网财经门户

}qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算平滑系数qDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

smooth[i] = 0.15 * period[i] + 0.85 * smooth[i - 1];qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算DCqDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

dc[i] = 0.5 * (1 + Math.Cos(2 * Math.PI / smooth[i]));qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算CycqDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

sum1[i] = 0.0962 * close[i] + 0.5769 * close[i - 2] - 0.5769 * close[i - 4] - 0.0962 * close[i - 6];qDt中亿财经网财经门户

sum2[i] = 0.075 * sum1[i] + 0.54 * sum1[i - 1] + 0.54 * sum1[i - 2] + 0.075 * sum1[i - 3];qDt中亿财经网财经门户

sum3[i] = sum2[i] - dc[i] * sum2[i];qDt中亿财经网财经门户

sum4[i] = 0.0962 * sum3[i] + 0.5769 * sum3[i - 2] - 0.5769 * sum3[i - 4] - 0.0962 * sum3[i - 6];qDt中亿财经网财经门户

sum5[i] = 0.075 * sum4[i] + 0.54 * sum4[i - 1] + 0.54 * sum4[i - 2] + 0.075 * sum4[i - 3];qDt中亿财经网财经门户

sum6[i] = sum5[i] - dc[i] * sum5[i];qDt中亿财经网财经门户

sum7[i] = 0.0962 * sum6[i] + 0.5769 * sum6[i - 2] - 0.5769 * sum6[i - 4] - 0.0962 * sum6[i - 6];qDt中亿财经网财经门户

sum8[i] = 0.075 * sum7[i] + 0.54 * sum7[i - 1] + 0.54 * sum7[i - 2] + 0.075 * sum7[i - 3];qDt中亿财经网财经门户

sum9[i] = sum8[i] - dc[i] * sum8[i];qDt中亿财经网财经门户

cyc[i] = 0.2 * sum9[i] + 0.8 * cyc[i - 1];qDt中亿财经网财经门户

}qDt中亿财经网财经门户

return cyc;qDt中亿财经网财经门户

}qDt中亿财经网财经门户

```qDt中亿财经网财经门户

其中,参数`close`表示收盘价序列,`n`表示周期长度,`w`表示趋势平滑系数。该源码中包含了Cyc指标的完整计算过程,可以直接调用该方法进行计算。qDt中亿财经网财经门户

4. cyc指标公式源码?

Cyc指标(Cycle Indicator)是一种用于研究股票、期货、外汇等市场的技术指标。它的计算方法比较复杂,涉及到多个参数和数学公式。以下是Cyc指标的计算公式源码,供参考:qDt中亿财经网财经门户

```qDt中亿财经网财经门户

// 计算Cyc指标qDt中亿财经网财经门户

double[] Cyc(double[] close, int n, double w) {qDt中亿财经网财经门户

// 初始化变量qDt中亿财经网财经门户

double[] cycle = new double[close.Length];qDt中亿财经网财经门户

double[] trend = new double[close.Length];qDt中亿财经网财经门户

double[] deviation = new double[close.Length];qDt中亿财经网财经门户

double[] period = new double[close.Length];qDt中亿财经网财经门户

double[] smooth = new double[close.Length];qDt中亿财经网财经门户

double[] dc = new double[close.Length];qDt中亿财经网财经门户

double[] cyc = new double[close.Length];qDt中亿财经网财经门户

double[] sum1 = new double[close.Length];qDt中亿财经网财经门户

double[] sum2 = new double[close.Length];qDt中亿财经网财经门户

double[] sum3 = new double[close.Length];qDt中亿财经网财经门户

double[] sum4 = new double[close.Length];qDt中亿财经网财经门户

double[] sum5 = new double[close.Length];qDt中亿财经网财经门户

double[] sum6 = new double[close.Length];qDt中亿财经网财经门户

double[] sum7 = new double[close.Length];qDt中亿财经网财经门户

double[] sum8 = new double[close.Length];qDt中亿财经网财经门户

double[] sum9 = new double[close.Length];qDt中亿财经网财经门户

// 计算周期qDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

// 计算价格波动率qDt中亿财经网财经门户

double sum = 0;qDt中亿财经网财经门户

for (int j = i - n; j <= i; j++) {qDt中亿财经网财经门户

sum += Math.Abs(close[j] - close[j - 1]);qDt中亿财经网财经门户

}qDt中亿财经网财经门户

deviation[i] = sum / n;qDt中亿财经网财经门户

// 计算周期qDt中亿财经网财经门户

if (deviation[i] != 0) {qDt中亿财经网财经门户

period[i] = 0.5 / (deviation[i] / close[i - 1]);qDt中亿财经网财经门户

} else {qDt中亿财经网财经门户

period[i] = period[i - 1];qDt中亿财经网财经门户

}qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算趋势qDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

if (i == n + 1) {qDt中亿财经网财经门户

trend[i] = 0.5 * (close[i] - close[i - n]);qDt中亿财经网财经门户

} else {qDt中亿财经网财经门户

trend[i] = (1 - w) * trend[i - 1] + w * 0.5 * (close[i] - close[i - n]);qDt中亿财经网财经门户

}qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算平滑系数qDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

smooth[i] = 0.15 * period[i] + 0.85 * smooth[i - 1];qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算DCqDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

dc[i] = 0.5 * (1 + Math.Cos(2 * Math.PI / smooth[i]));qDt中亿财经网财经门户

}qDt中亿财经网财经门户

// 计算CycqDt中亿财经网财经门户

for (int i = n + 1; i < close.Length; i++) {qDt中亿财经网财经门户

sum1[i] = 0.0962 * close[i] + 0.5769 * close[i - 2] - 0.5769 * close[i - 4] - 0.0962 * close[i - 6];qDt中亿财经网财经门户

sum2[i] = 0.075 * sum1[i] + 0.54 * sum1[i - 1] + 0.54 * sum1[i - 2] + 0.075 * sum1[i - 3];qDt中亿财经网财经门户

sum3[i] = sum2[i] - dc[i] * sum2[i];qDt中亿财经网财经门户

sum4[i] = 0.0962 * sum3[i] + 0.5769 * sum3[i - 2] - 0.5769 * sum3[i - 4] - 0.0962 * sum3[i - 6];qDt中亿财经网财经门户

sum5[i] = 0.075 * sum4[i] + 0.54 * sum4[i - 1] + 0.54 * sum4[i - 2] + 0.075 * sum4[i - 3];qDt中亿财经网财经门户

sum6[i] = sum5[i] - dc[i] * sum5[i];qDt中亿财经网财经门户

sum7[i] = 0.0962 * sum6[i] + 0.5769 * sum6[i - 2] - 0.5769 * sum6[i - 4] - 0.0962 * sum6[i - 6];qDt中亿财经网财经门户

sum8[i] = 0.075 * sum7[i] + 0.54 * sum7[i - 1] + 0.54 * sum7[i - 2] + 0.075 * sum7[i - 3];qDt中亿财经网财经门户

sum9[i] = sum8[i] - dc[i] * sum8[i];qDt中亿财经网财经门户

cyc[i] = 0.2 * sum9[i] + 0.8 * cyc[i - 1];qDt中亿财经网财经门户

}qDt中亿财经网财经门户

return cyc;qDt中亿财经网财经门户

}qDt中亿财经网财经门户

```qDt中亿财经网财经门户

其中,参数`close`表示收盘价序列,`n`表示周期长度,`w`表示趋势平滑系数。该源码中包含了Cyc指标的完整计算过程,可以直接调用该方法进行计算。qDt中亿财经网财经门户