通达信外汇指标怎么设置(cyc指标公式源码?)

中亿财经网 gengxing 2023-09-08 08:00:06

1. cyc指标公式源码?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}bcD中亿财经网财经门户

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

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

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

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

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

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

}bcD中亿财经网财经门户

}bcD中亿财经网财经门户

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

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

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

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

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

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

}bcD中亿财经网财经门户

}bcD中亿财经网财经门户

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

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

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

}bcD中亿财经网财经门户

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

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

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

}bcD中亿财经网财经门户

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

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

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

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

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

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

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

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

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

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

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

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

}bcD中亿财经网财经门户

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

}bcD中亿财经网财经门户

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

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

2. cyc指标公式源码?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}bcD中亿财经网财经门户

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

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

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

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

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

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

}bcD中亿财经网财经门户

}bcD中亿财经网财经门户

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

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

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

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

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

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

}bcD中亿财经网财经门户

}bcD中亿财经网财经门户

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

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

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

}bcD中亿财经网财经门户

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

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

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

}bcD中亿财经网财经门户

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

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

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

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

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

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

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

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

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

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

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

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

}bcD中亿财经网财经门户

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

}bcD中亿财经网财经门户

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

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

3. cyc指标公式源码?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}bcD中亿财经网财经门户

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

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

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

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

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

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

}bcD中亿财经网财经门户

}bcD中亿财经网财经门户

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

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

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

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

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

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

}bcD中亿财经网财经门户

}bcD中亿财经网财经门户

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

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

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

}bcD中亿财经网财经门户

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

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

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

}bcD中亿财经网财经门户

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

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

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

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

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

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

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

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

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

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

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

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

}bcD中亿财经网财经门户

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

}bcD中亿财经网财经门户

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

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

4. asl指标的参数是多少?

ASL指标是用来评价激光雷达(Lidar)性能的参数,主要包括如下几个:bcD中亿财经网财经门户

1. 探测距离:表示激光雷达的最大探测距离,一般为几十米到几百米。达到500米以上属于长距离型,100米以下为短距离型。bcD中亿财经网财经门户

2. 分辨率:表示每次测距周期内激光雷达扫描获得的采样点个数,每0.1°一个采样点的分辨率常见,分辨率越高越精细。bcD中亿财经网财经门户

3. 扫描频率:表示每秒完成一圈360°扫描的次数,以Hz为单位。频率越高灵敏度越高,广为用于动态检测。一般10-100Hz。bcD中亿财经网财经门户

4. 工作波长:一般为近红外波段,915nm或1555nm比较常见。 different波长在不同的环境下性能表现也不同。bcD中亿财经网财经门户

5. 精度:表示激光雷达测量距离的误差限值,一般小于±3厘米属于高精度,大于±5厘米为中低精度。bcD中亿财经网财经门户

6. 视场角:表示一次扫描覆盖的角度范围,一般为10-360°。视场角越大覆盖范围越广。bcD中亿财经网财经门户

7. 数据接口:常见接口主要有UDP网络接口、RS232串口、PCI高速接口等,用于输出激光雷达采集到的三维坐标点云数据。bcD中亿财经网财经门户

除上述主要参数外,不同类型的激光雷达在抗干扰性、防护等级、工作环境适应性等方面也有差异,需要根据具体应用选择合适的参数指标。bcD中亿财经网财经门户

高分辨率、高精度、宽视场角、高扫频是激光雷达性能好的重要标志,但系统成本也较高。对于一般的室内三维重建与物体检测应用,中等参数指标的激光雷达也能满足要求,性价比较高。bcD中亿财经网财经门户

5. asl指标的参数是多少?

ASL指标是用来评价激光雷达(Lidar)性能的参数,主要包括如下几个:bcD中亿财经网财经门户

1. 探测距离:表示激光雷达的最大探测距离,一般为几十米到几百米。达到500米以上属于长距离型,100米以下为短距离型。bcD中亿财经网财经门户

2. 分辨率:表示每次测距周期内激光雷达扫描获得的采样点个数,每0.1°一个采样点的分辨率常见,分辨率越高越精细。bcD中亿财经网财经门户

3. 扫描频率:表示每秒完成一圈360°扫描的次数,以Hz为单位。频率越高灵敏度越高,广为用于动态检测。一般10-100Hz。bcD中亿财经网财经门户

4. 工作波长:一般为近红外波段,915nm或1555nm比较常见。 different波长在不同的环境下性能表现也不同。bcD中亿财经网财经门户

5. 精度:表示激光雷达测量距离的误差限值,一般小于±3厘米属于高精度,大于±5厘米为中低精度。bcD中亿财经网财经门户

6. 视场角:表示一次扫描覆盖的角度范围,一般为10-360°。视场角越大覆盖范围越广。bcD中亿财经网财经门户

7. 数据接口:常见接口主要有UDP网络接口、RS232串口、PCI高速接口等,用于输出激光雷达采集到的三维坐标点云数据。bcD中亿财经网财经门户

除上述主要参数外,不同类型的激光雷达在抗干扰性、防护等级、工作环境适应性等方面也有差异,需要根据具体应用选择合适的参数指标。bcD中亿财经网财经门户

高分辨率、高精度、宽视场角、高扫频是激光雷达性能好的重要标志,但系统成本也较高。对于一般的室内三维重建与物体检测应用,中等参数指标的激光雷达也能满足要求,性价比较高。bcD中亿财经网财经门户

6. asl指标的参数是多少?

ASL指标是用来评价激光雷达(Lidar)性能的参数,主要包括如下几个:bcD中亿财经网财经门户

1. 探测距离:表示激光雷达的最大探测距离,一般为几十米到几百米。达到500米以上属于长距离型,100米以下为短距离型。bcD中亿财经网财经门户

2. 分辨率:表示每次测距周期内激光雷达扫描获得的采样点个数,每0.1°一个采样点的分辨率常见,分辨率越高越精细。bcD中亿财经网财经门户

3. 扫描频率:表示每秒完成一圈360°扫描的次数,以Hz为单位。频率越高灵敏度越高,广为用于动态检测。一般10-100Hz。bcD中亿财经网财经门户

4. 工作波长:一般为近红外波段,915nm或1555nm比较常见。 different波长在不同的环境下性能表现也不同。bcD中亿财经网财经门户

5. 精度:表示激光雷达测量距离的误差限值,一般小于±3厘米属于高精度,大于±5厘米为中低精度。bcD中亿财经网财经门户

6. 视场角:表示一次扫描覆盖的角度范围,一般为10-360°。视场角越大覆盖范围越广。bcD中亿财经网财经门户

7. 数据接口:常见接口主要有UDP网络接口、RS232串口、PCI高速接口等,用于输出激光雷达采集到的三维坐标点云数据。bcD中亿财经网财经门户

除上述主要参数外,不同类型的激光雷达在抗干扰性、防护等级、工作环境适应性等方面也有差异,需要根据具体应用选择合适的参数指标。bcD中亿财经网财经门户

高分辨率、高精度、宽视场角、高扫频是激光雷达性能好的重要标志,但系统成本也较高。对于一般的室内三维重建与物体检测应用,中等参数指标的激光雷达也能满足要求,性价比较高。bcD中亿财经网财经门户

7. asl指标的参数是多少?

ASL指标是用来评价激光雷达(Lidar)性能的参数,主要包括如下几个:bcD中亿财经网财经门户

1. 探测距离:表示激光雷达的最大探测距离,一般为几十米到几百米。达到500米以上属于长距离型,100米以下为短距离型。bcD中亿财经网财经门户

2. 分辨率:表示每次测距周期内激光雷达扫描获得的采样点个数,每0.1°一个采样点的分辨率常见,分辨率越高越精细。bcD中亿财经网财经门户

3. 扫描频率:表示每秒完成一圈360°扫描的次数,以Hz为单位。频率越高灵敏度越高,广为用于动态检测。一般10-100Hz。bcD中亿财经网财经门户

4. 工作波长:一般为近红外波段,915nm或1555nm比较常见。 different波长在不同的环境下性能表现也不同。bcD中亿财经网财经门户

5. 精度:表示激光雷达测量距离的误差限值,一般小于±3厘米属于高精度,大于±5厘米为中低精度。bcD中亿财经网财经门户

6. 视场角:表示一次扫描覆盖的角度范围,一般为10-360°。视场角越大覆盖范围越广。bcD中亿财经网财经门户

7. 数据接口:常见接口主要有UDP网络接口、RS232串口、PCI高速接口等,用于输出激光雷达采集到的三维坐标点云数据。bcD中亿财经网财经门户

除上述主要参数外,不同类型的激光雷达在抗干扰性、防护等级、工作环境适应性等方面也有差异,需要根据具体应用选择合适的参数指标。bcD中亿财经网财经门户

高分辨率、高精度、宽视场角、高扫频是激光雷达性能好的重要标志,但系统成本也较高。对于一般的室内三维重建与物体检测应用,中等参数指标的激光雷达也能满足要求,性价比较高。bcD中亿财经网财经门户

8. cyc指标公式源码?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}bcD中亿财经网财经门户

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

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

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

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

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

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

}bcD中亿财经网财经门户

}bcD中亿财经网财经门户

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

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

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

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

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

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

}bcD中亿财经网财经门户

}bcD中亿财经网财经门户

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

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

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

}bcD中亿财经网财经门户

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

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

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

}bcD中亿财经网财经门户

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

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

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

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

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

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

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

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

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

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

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

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

}bcD中亿财经网财经门户

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

}bcD中亿财经网财经门户

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

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

9. 通达信软件看外汇行情,总是数据跟不上,怎么解决?

通达信本身非外汇行情软件,外盘数据是延时的,若是做实时交易不适合的,盘后看看可以。若做交易最好下载交易商提供的行情软件,一般常见为mt4,或者文华的赢顺,或博弈大师之类。 bcD中亿财经网财经门户

10. 通达信软件看外汇行情,总是数据跟不上,怎么解决?

通达信本身非外汇行情软件,外盘数据是延时的,若是做实时交易不适合的,盘后看看可以。若做交易最好下载交易商提供的行情软件,一般常见为mt4,或者文华的赢顺,或博弈大师之类。 bcD中亿财经网财经门户

11. 通达信软件看外汇行情,总是数据跟不上,怎么解决?

通达信本身非外汇行情软件,外盘数据是延时的,若是做实时交易不适合的,盘后看看可以。若做交易最好下载交易商提供的行情软件,一般常见为mt4,或者文华的赢顺,或博弈大师之类。 bcD中亿财经网财经门户

12. 通达信软件看外汇行情,总是数据跟不上,怎么解决?

通达信本身非外汇行情软件,外盘数据是延时的,若是做实时交易不适合的,盘后看看可以。若做交易最好下载交易商提供的行情软件,一般常见为mt4,或者文华的赢顺,或博弈大师之类。 bcD中亿财经网财经门户