首页 > 问答热点>正文

通达信期货经典指标公式(怎样编写期货指标?)

中亿财经网 gengxing 2023-09-06 06:19:07

1. 怎样编写期货指标?

编写期货指标需要具备专业知识和技能,不是一个简单的任务期货指标编写需要了解期货市场的相关知识和交易策略,也需要掌握数据处理和编程工具的使用技巧如果能够系统学习和运用相关知识和技能,结合实践经验和市场观察,就可以编写出有效的期货指标来,提高交易效率和盈利能力zjx中亿财经网财经门户

2. cyc指标公式源码?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}zjx中亿财经网财经门户

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

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

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

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

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

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

}zjx中亿财经网财经门户

}zjx中亿财经网财经门户

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

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

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

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

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

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

}zjx中亿财经网财经门户

}zjx中亿财经网财经门户

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

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

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

}zjx中亿财经网财经门户

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

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

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

}zjx中亿财经网财经门户

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

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

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

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

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

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

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

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

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

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

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

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

}zjx中亿财经网财经门户

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

}zjx中亿财经网财经门户

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

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

3. cyc指标公式源码?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}zjx中亿财经网财经门户

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

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

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

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

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

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

}zjx中亿财经网财经门户

}zjx中亿财经网财经门户

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

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

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

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

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

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

}zjx中亿财经网财经门户

}zjx中亿财经网财经门户

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

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

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

}zjx中亿财经网财经门户

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

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

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

}zjx中亿财经网财经门户

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

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

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

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

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

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

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

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

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

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

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

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

}zjx中亿财经网财经门户

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

}zjx中亿财经网财经门户

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

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

4. cyc指标公式源码?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}zjx中亿财经网财经门户

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

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

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

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

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

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

}zjx中亿财经网财经门户

}zjx中亿财经网财经门户

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

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

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

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

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

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

}zjx中亿财经网财经门户

}zjx中亿财经网财经门户

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

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

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

}zjx中亿财经网财经门户

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

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

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

}zjx中亿财经网财经门户

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

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

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

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

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

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

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

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

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

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

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

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

}zjx中亿财经网财经门户

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

}zjx中亿财经网财经门户

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

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

5. 通达信交易函数怎么用?

(一)行情函数zjx中亿财经网财经门户

1)HIGH(H)最高价返回该周期最高价.zjx中亿财经网财经门户

2)LOW(L)最低价返回该周期最低价.zjx中亿财经网财经门户

3)CLOSE(C)收盘价返回该周期收盘价.zjx中亿财经网财经门户

4)VOL(V)成交量(手)返回该周期成交量.zjx中亿财经网财经门户

5)OPEN(O)开盘价返回该周期开盘价.zjx中亿财经网财经门户

6)ADVANCE上涨家数返回该周期上涨家数.(本函数仅对大盘有效)zjx中亿财经网财经门户

7)DECLINE下跌家数返回该周期下跌家数.(本函数仅对大盘有效)zjx中亿财经网财经门户

8)AMOUNT成交额(元)返回该周期成交额.zjx中亿财经网财经门户

9)VOLINSTK持仓量返回期货该周期持仓量.zjx中亿财经网财经门户

10) QHJSJ 期货结算价 返回期货该周期结算价.zjx中亿财经网财经门户

11)BUYVOL外盘(手)返回外盘,即时行情数据zjx中亿财经网财经门户

12)SELVOL外盘(手)返回外盘zjx中亿财经网财经门户

13)ISBUYORDER主动性买单返回当前成交是否为主动性买单.用法:ISBUYORDER,当本笔成交为主动性买盘时,返回1,否则为0zjx中亿财经网财经门户

14)DHIGH不定周期最高价返回该不定周期最高价.zjx中亿财经网财经门户

15)DOPEN不定周期开盘价返回该不定周期开盘价.zjx中亿财经网财经门户

16)DLOW不定周期最低价返回该不定周期最低价.zjx中亿财经网财经门户

17)DCLOSE不定周期收盘价返回该不定周期收盘价.zjx中亿财经网财经门户

18)DVOL不定周期成交量价返回该不定周期成交量价.zjx中亿财经网财经门户

19)NAMELIKE模糊股票名称返回股票名称是否以参数开头.zjx中亿财经网财经门户

用法: if(NAMELIKE('ST'),x,y);zjx中亿财经网财经门户

20)CODELIKE 模糊股票代码 返回股票代码是否以参数开头.zjx中亿财经网财经门户

用法: if(CODELIKE('600'),x,y);zjx中亿财经网财经门户

21)INBLOCK 属于某板块 返回股票是否属于某板块.zjx中亿财经网财经门户

用法: if(INBLOCK('沪深300'),x,y);zjx中亿财经网财经门户

6. 通达信交易函数怎么用?

(一)行情函数zjx中亿财经网财经门户

1)HIGH(H)最高价返回该周期最高价.zjx中亿财经网财经门户

2)LOW(L)最低价返回该周期最低价.zjx中亿财经网财经门户

3)CLOSE(C)收盘价返回该周期收盘价.zjx中亿财经网财经门户

4)VOL(V)成交量(手)返回该周期成交量.zjx中亿财经网财经门户

5)OPEN(O)开盘价返回该周期开盘价.zjx中亿财经网财经门户

6)ADVANCE上涨家数返回该周期上涨家数.(本函数仅对大盘有效)zjx中亿财经网财经门户

7)DECLINE下跌家数返回该周期下跌家数.(本函数仅对大盘有效)zjx中亿财经网财经门户

8)AMOUNT成交额(元)返回该周期成交额.zjx中亿财经网财经门户

9)VOLINSTK持仓量返回期货该周期持仓量.zjx中亿财经网财经门户

10) QHJSJ 期货结算价 返回期货该周期结算价.zjx中亿财经网财经门户

11)BUYVOL外盘(手)返回外盘,即时行情数据zjx中亿财经网财经门户

12)SELVOL外盘(手)返回外盘zjx中亿财经网财经门户

13)ISBUYORDER主动性买单返回当前成交是否为主动性买单.用法:ISBUYORDER,当本笔成交为主动性买盘时,返回1,否则为0zjx中亿财经网财经门户

14)DHIGH不定周期最高价返回该不定周期最高价.zjx中亿财经网财经门户

15)DOPEN不定周期开盘价返回该不定周期开盘价.zjx中亿财经网财经门户

16)DLOW不定周期最低价返回该不定周期最低价.zjx中亿财经网财经门户

17)DCLOSE不定周期收盘价返回该不定周期收盘价.zjx中亿财经网财经门户

18)DVOL不定周期成交量价返回该不定周期成交量价.zjx中亿财经网财经门户

19)NAMELIKE模糊股票名称返回股票名称是否以参数开头.zjx中亿财经网财经门户

用法: if(NAMELIKE('ST'),x,y);zjx中亿财经网财经门户

20)CODELIKE 模糊股票代码 返回股票代码是否以参数开头.zjx中亿财经网财经门户

用法: if(CODELIKE('600'),x,y);zjx中亿财经网财经门户

21)INBLOCK 属于某板块 返回股票是否属于某板块.zjx中亿财经网财经门户

用法: if(INBLOCK('沪深300'),x,y);zjx中亿财经网财经门户

7. 通达信交易函数怎么用?

(一)行情函数zjx中亿财经网财经门户

1)HIGH(H)最高价返回该周期最高价.zjx中亿财经网财经门户

2)LOW(L)最低价返回该周期最低价.zjx中亿财经网财经门户

3)CLOSE(C)收盘价返回该周期收盘价.zjx中亿财经网财经门户

4)VOL(V)成交量(手)返回该周期成交量.zjx中亿财经网财经门户

5)OPEN(O)开盘价返回该周期开盘价.zjx中亿财经网财经门户

6)ADVANCE上涨家数返回该周期上涨家数.(本函数仅对大盘有效)zjx中亿财经网财经门户

7)DECLINE下跌家数返回该周期下跌家数.(本函数仅对大盘有效)zjx中亿财经网财经门户

8)AMOUNT成交额(元)返回该周期成交额.zjx中亿财经网财经门户

9)VOLINSTK持仓量返回期货该周期持仓量.zjx中亿财经网财经门户

10) QHJSJ 期货结算价 返回期货该周期结算价.zjx中亿财经网财经门户

11)BUYVOL外盘(手)返回外盘,即时行情数据zjx中亿财经网财经门户

12)SELVOL外盘(手)返回外盘zjx中亿财经网财经门户

13)ISBUYORDER主动性买单返回当前成交是否为主动性买单.用法:ISBUYORDER,当本笔成交为主动性买盘时,返回1,否则为0zjx中亿财经网财经门户

14)DHIGH不定周期最高价返回该不定周期最高价.zjx中亿财经网财经门户

15)DOPEN不定周期开盘价返回该不定周期开盘价.zjx中亿财经网财经门户

16)DLOW不定周期最低价返回该不定周期最低价.zjx中亿财经网财经门户

17)DCLOSE不定周期收盘价返回该不定周期收盘价.zjx中亿财经网财经门户

18)DVOL不定周期成交量价返回该不定周期成交量价.zjx中亿财经网财经门户

19)NAMELIKE模糊股票名称返回股票名称是否以参数开头.zjx中亿财经网财经门户

用法: if(NAMELIKE('ST'),x,y);zjx中亿财经网财经门户

20)CODELIKE 模糊股票代码 返回股票代码是否以参数开头.zjx中亿财经网财经门户

用法: if(CODELIKE('600'),x,y);zjx中亿财经网财经门户

21)INBLOCK 属于某板块 返回股票是否属于某板块.zjx中亿财经网财经门户

用法: if(INBLOCK('沪深300'),x,y);zjx中亿财经网财经门户

8. 通达信交易函数怎么用?

(一)行情函数zjx中亿财经网财经门户

1)HIGH(H)最高价返回该周期最高价.zjx中亿财经网财经门户

2)LOW(L)最低价返回该周期最低价.zjx中亿财经网财经门户

3)CLOSE(C)收盘价返回该周期收盘价.zjx中亿财经网财经门户

4)VOL(V)成交量(手)返回该周期成交量.zjx中亿财经网财经门户

5)OPEN(O)开盘价返回该周期开盘价.zjx中亿财经网财经门户

6)ADVANCE上涨家数返回该周期上涨家数.(本函数仅对大盘有效)zjx中亿财经网财经门户

7)DECLINE下跌家数返回该周期下跌家数.(本函数仅对大盘有效)zjx中亿财经网财经门户

8)AMOUNT成交额(元)返回该周期成交额.zjx中亿财经网财经门户

9)VOLINSTK持仓量返回期货该周期持仓量.zjx中亿财经网财经门户

10) QHJSJ 期货结算价 返回期货该周期结算价.zjx中亿财经网财经门户

11)BUYVOL外盘(手)返回外盘,即时行情数据zjx中亿财经网财经门户

12)SELVOL外盘(手)返回外盘zjx中亿财经网财经门户

13)ISBUYORDER主动性买单返回当前成交是否为主动性买单.用法:ISBUYORDER,当本笔成交为主动性买盘时,返回1,否则为0zjx中亿财经网财经门户

14)DHIGH不定周期最高价返回该不定周期最高价.zjx中亿财经网财经门户

15)DOPEN不定周期开盘价返回该不定周期开盘价.zjx中亿财经网财经门户

16)DLOW不定周期最低价返回该不定周期最低价.zjx中亿财经网财经门户

17)DCLOSE不定周期收盘价返回该不定周期收盘价.zjx中亿财经网财经门户

18)DVOL不定周期成交量价返回该不定周期成交量价.zjx中亿财经网财经门户

19)NAMELIKE模糊股票名称返回股票名称是否以参数开头.zjx中亿财经网财经门户

用法: if(NAMELIKE('ST'),x,y);zjx中亿财经网财经门户

20)CODELIKE 模糊股票代码 返回股票代码是否以参数开头.zjx中亿财经网财经门户

用法: if(CODELIKE('600'),x,y);zjx中亿财经网财经门户

21)INBLOCK 属于某板块 返回股票是否属于某板块.zjx中亿财经网财经门户

用法: if(INBLOCK('沪深300'),x,y);zjx中亿财经网财经门户

9. 通达信专业财务数据有免费的吗?

zjx中亿财经网财经门户

首先检查你使用的软件类型,如果使用的是通达信期货通软件,此软件不能使用该功能。另外,通达信股票软件低版本也没有该功能。zjx中亿财经网财经门户

通达信软件是各大券商覆盖最为广泛的PC端看盘软件,该软件最大的优势是其数据开源,可便于数据的输入输出及指标编程,关键还是免费的。zjx中亿财经网财经门户

10. cyc指标公式源码?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}zjx中亿财经网财经门户

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

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

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

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

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

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

}zjx中亿财经网财经门户

}zjx中亿财经网财经门户

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

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

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

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

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

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

}zjx中亿财经网财经门户

}zjx中亿财经网财经门户

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

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

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

}zjx中亿财经网财经门户

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

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

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

}zjx中亿财经网财经门户

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

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

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

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

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

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

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

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

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

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

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

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

}zjx中亿财经网财经门户

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

}zjx中亿财经网财经门户

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

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

11. 怎样编写期货指标?

编写期货指标需要具备专业知识和技能,不是一个简单的任务期货指标编写需要了解期货市场的相关知识和交易策略,也需要掌握数据处理和编程工具的使用技巧如果能够系统学习和运用相关知识和技能,结合实践经验和市场观察,就可以编写出有效的期货指标来,提高交易效率和盈利能力zjx中亿财经网财经门户

12. 通达信专业财务数据有免费的吗?

zjx中亿财经网财经门户

首先检查你使用的软件类型,如果使用的是通达信期货通软件,此软件不能使用该功能。另外,通达信股票软件低版本也没有该功能。zjx中亿财经网财经门户

通达信软件是各大券商覆盖最为广泛的PC端看盘软件,该软件最大的优势是其数据开源,可便于数据的输入输出及指标编程,关键还是免费的。zjx中亿财经网财经门户

13. 怎样编写期货指标?

编写期货指标需要具备专业知识和技能,不是一个简单的任务期货指标编写需要了解期货市场的相关知识和交易策略,也需要掌握数据处理和编程工具的使用技巧如果能够系统学习和运用相关知识和技能,结合实践经验和市场观察,就可以编写出有效的期货指标来,提高交易效率和盈利能力zjx中亿财经网财经门户

14. 通达信专业财务数据有免费的吗?

zjx中亿财经网财经门户

首先检查你使用的软件类型,如果使用的是通达信期货通软件,此软件不能使用该功能。另外,通达信股票软件低版本也没有该功能。zjx中亿财经网财经门户

通达信软件是各大券商覆盖最为广泛的PC端看盘软件,该软件最大的优势是其数据开源,可便于数据的输入输出及指标编程,关键还是免费的。zjx中亿财经网财经门户

15. 通达信专业财务数据有免费的吗?

zjx中亿财经网财经门户

首先检查你使用的软件类型,如果使用的是通达信期货通软件,此软件不能使用该功能。另外,通达信股票软件低版本也没有该功能。zjx中亿财经网财经门户

通达信软件是各大券商覆盖最为广泛的PC端看盘软件,该软件最大的优势是其数据开源,可便于数据的输入输出及指标编程,关键还是免费的。zjx中亿财经网财经门户

16. 怎样编写期货指标?

编写期货指标需要具备专业知识和技能,不是一个简单的任务期货指标编写需要了解期货市场的相关知识和交易策略,也需要掌握数据处理和编程工具的使用技巧如果能够系统学习和运用相关知识和技能,结合实践经验和市场观察,就可以编写出有效的期货指标来,提高交易效率和盈利能力zjx中亿财经网财经门户