东方财富DDX公式源码指标(求助老师仿写一个牛市波段王指标,万分?)
1. 求助老师仿写一个牛市波段王指标,万分?
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1)
; D:=SMA(K,3,1)
; J:=3*K-2*D; XG:REF(J,1)
2. dmi指标源码?
DMI指标又叫动向指标或趋向指标,其全称叫“Directional Movement Index,简称DMI”,也是由美国技术分析大师威尔斯·威尔德(Wells Wilder)所创造的,是一种中长期股市技术分析(Technical Analysis)方法。
DMI指标是通过分析股票价格在涨跌过程中买卖双方力量均衡点的变化情况,即多空双方的力量的变化受价格波动的影响而发生由均衡到失衡的循环过程,从而提供对趋势判断依据的一种技术指标。
dmi指标分类:DMI指标共有+DI(即PDI,下同)、-DI(即MDI,下同)、ADX、ADXR四条线,也是它的四个参数值,它分为多空指标(+DI、-DI)和趋向指标(ADX、ADXR)两组指标。
dmi指标公式源码
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-ref(CLOSE,1))),ABS(ref(CLOSE,1)-LOW)),N);
HD:=HIGH-ref(HIGH,1);
LD:=ref(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD0&&HDLD,HD,0),N);
DMM:=EXPMEMA(IF(LD0&&LDHD,LD,0),N);
PDI:=DMP*100/TR,COLORFFFFFF;
DRAWTEXT_FIX(CO,0.01,0.9,0''),COLORRED;
DRAWTEXT_FIX(CO,1,1,0,''),COLORRED;
MDI:=DMM*100/TR,COLOR00FFFF;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M),COLOR0000FF,LINETHICK2;
ADXR:=EXPMEMA(ADX,M),COLOR00FF00,LINETHICK2;
DYNAINFO(9)0 AND CROSS(ADX,MDI) AND CROSS(ADXR,MDI) AND PDIMDI;
3. 求助老师仿写一个牛市波段王指标,万分?
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1)
; D:=SMA(K,3,1)
; J:=3*K-2*D; XG:REF(J,1)
4. kd指标源码公式?
以下是通达信彩色KD指标KD共振公式源码(无源码的请下载附件导入)
通达信彩色KD指标KD共振公式源码
VAR13:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K13:SMA(VAR13,3,1);
D13:SMA(K13,3,1);
DRAWBAND(K13,RGB(255,255,0),D13,RGB(0,255,0));
{STICKLINE(K13>D13,K13,D13,8,0),COLOR0055AA;
STICKLINE(K13>D13,K13,D13,5,0),COLOR0077CC;
STICKLINE(K13>D13,K13,D13,3,0),COLOR0099DD;
STICKLINE(K13>D13,K13,D13,1,0),COLOR01BEE7;
STICKLINE(K13<=D13,K13,D13,8,0),COLOR006600;
STICKLINE(K13<=D13,K13,D13,5,0),COLOR009900;
STICKLINE(K13<=D13,K13,D13,3,0),COLOR00BB00;
STICKLINE(K13<=D13,K13,D13,1,0),COLOR00CC00;}
VAR55:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
K55:SMA(VAR55,3,1);
D55:SMA(K55,3,1);
DRAWBAND(K55,RGB(255,0,0),D55,RGB(0,0,255));
{STICKLINE(K55>D55,K55,D55,7,0),COLOR000045;
STICKLINE(K55>D55,K55,D55,5,0),COLOR000085;
STICKLINE(K55>D55,K55,D55,3,0),COLOR0000C5;
STICKLINE(K55>D55,K55,D55,1,0),COLOR0000E5;
STICKLINE(K55<=D55,K55,D55,7,0),COLOR353500;
STICKLINE(K55<=D55,K55,D55,5,0),COLOR555500;
STICKLINE(K55<=D55,K55,D55,3,0),COLOR757500;
STICKLINE(K55<=D55,K55,D55,1,0),COLOR858500;}
20,COLORWHITE;
80,COLORWHITE;
DIBU:= K13<20 AND D13<20 AND K55<20 AND D55<20;
STICKLINE(DIBU=1,80,60,5.8,1),COLORRED;
TOBU:= K13>80 AND D13>80 AND K55>80 AND D55>80;
STICKLINE(TOBU=1,40,20,5.8,1),COLORGREEN;
5. dmi指标源码?
DMI指标又叫动向指标或趋向指标,其全称叫“Directional Movement Index,简称DMI”,也是由美国技术分析大师威尔斯·威尔德(Wells Wilder)所创造的,是一种中长期股市技术分析(Technical Analysis)方法。
DMI指标是通过分析股票价格在涨跌过程中买卖双方力量均衡点的变化情况,即多空双方的力量的变化受价格波动的影响而发生由均衡到失衡的循环过程,从而提供对趋势判断依据的一种技术指标。
dmi指标分类:DMI指标共有+DI(即PDI,下同)、-DI(即MDI,下同)、ADX、ADXR四条线,也是它的四个参数值,它分为多空指标(+DI、-DI)和趋向指标(ADX、ADXR)两组指标。
dmi指标公式源码
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-ref(CLOSE,1))),ABS(ref(CLOSE,1)-LOW)),N);
HD:=HIGH-ref(HIGH,1);
LD:=ref(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD0&&HDLD,HD,0),N);
DMM:=EXPMEMA(IF(LD0&&LDHD,LD,0),N);
PDI:=DMP*100/TR,COLORFFFFFF;
DRAWTEXT_FIX(CO,0.01,0.9,0''),COLORRED;
DRAWTEXT_FIX(CO,1,1,0,''),COLORRED;
MDI:=DMM*100/TR,COLOR00FFFF;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M),COLOR0000FF,LINETHICK2;
ADXR:=EXPMEMA(ADX,M),COLOR00FF00,LINETHICK2;
DYNAINFO(9)0 AND CROSS(ADX,MDI) AND CROSS(ADXR,MDI) AND PDIMDI;
6. obv公式源码?
MOBV:=OBV-MA(OBV,30);
W1:STICKLINE(MOBV>0,MOBV,0,3,1),COLORRED;
W2:STICKLINE(MOBV<0,MOBV,0,3,1),COLORCYAN;
VA1:=HHVBARS(MOBV,BARSLAST(MOBV<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MOBV),REF(VA1,1)+2),0.5);
QG:=CROSS(BACKSET(CROSS(0,MOBV) OR (ISLASTBAR AND MOBV>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MOBV,REF(VA2,1),REF(MOBV,1),1),COLORMAGENTA;
VA3:=LLVBARS(MOBV,BARSLAST(MOBV>0)+1);
VA4:=CROSS(BACKSET(CROSS(MOBV,0),REF(VA3,1)+2),0.5);
BD:=BARSLAST(FILTERX(CROSS(0,MOBV),BARSCOUNT(C)));
前低:DRAWLINE(VA4,MOBV,REF(VA4,1),REF(MOBV,1),1);
BDTJ:=IF(MOBV<0,FILTERX(MOBV=LLV(MOBV,BARSLAST(MOBV>0)),
BARSCOUNT(C)),DRAWNULL);
TSBDTJ:=BARSLAST(BDTJ);
BDZH:=FILTERX(MOBV<CONST(LLV(MOBV,BD+1)),BARSCOUNT(C));
BDTS:=BARSLAST(BDZH);
本低:IF(BD+1>=1,CONST(LLV(MOBV,BD+1)),DRAWNULL);
BDCL:=CROSS(COUNT(CROSS(MOBV>本低/2 AND MOBV<0,0.5),TSBDTJ)=1,0.5) AND TSBDTJ>=0;
终点:=IF(ISLASTBAR AND MOBV>0 AND MOBV=HHV(MOBV,BARSLAST(MOBV<0)),1,IF(FILTERX(QG,BARSCOUNT(C)),2,DRAWNULL));
UU:=(终点=1 OR 终点=2) AND MOBV>0;
ZZ:=FILTERX(UU,BARSCOUNT(C));
本高:DRAWLINE(ZZ,MOBV,REF(ZZ,1),REF(MOBV,1),1),COLORWHITE;
横线:=CONST(REF(MOBV,BARSLAST(ZZ)));
WW:=MOBV>横线;
起始点:=FILTERX(REFX(BARSLAST(WW),1)=1,BARSCOUNT(C));
天数:=BARSLAST(起始点),COLORYELLOW,NODRAW;
上横线:=DRAWLINE(起始点,横线,ZZ,横线,0),COLORGREEN,DOTLINE;
下横线:=DRAWLINE(BDZH,CONST(LLV(MOBV,BD+1)),BDTJ=1,MOBV,0),COLOR8080FF,DOTLINE;
DRAWNUMBER(BDTJ,CONST(LLV(MOBV,BD+1))*0.9,BDTS);
DRAWNUMBER(ZZ,上横线*1.1,天数);
TJ:=IF(起始点,BARSNEXT(ZZ),DRAWNULL);
红柱数量:=IF(天数>0 AND 天数<=REF(TJ,天数),SUM(MOBV>0,天数),DRAWNULL),COLORWHITE,NODRAW;
横线起始价:=REF(C,天数),NODRAW;
空间评估:=(横线起始价-C)/C*100,NODRAW;
TT:=BARSLAST(ZZ);
WQG:=CROSS(COUNT(CROSS(MOBV<本高/2 AND MOBV>0,0.5),ZZ)=1,0.5) AND ZZ>=0;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(CROSS(MOBV<本高/2,0.5))>0 AND MOBV>(前高+本高)/2,MOBV,前高,1,0),COLORYELLOW;
前高本高二分位:IF(MOBV>0 AND 本高!=前高,DRAWLINE(WQG,(前高+本高)/2,REF(WQG,1),REF((前高+本高)/2,1),1),DRAWNULL),COLORC0C000,DOTLINE;
AA:=STRCAT(STRCAT(STRCAT('〖','上升空间'),'〗'),CON2STR(IF(空间评估,空间评估,DRAWNULL),2));
STICKLINE(MOBV>前高,MOBV,前高,1,0),COLORYELLOW;
STICKLINE(WQG,MOBV,0,1,0),COLORGREEN;
STICKLINE(MOBV<0 AND MOBV<前低 AND 前低<0,MOBV,前低,1,0),COLORBLUE;
B1:=IF(CROSS(MOBV<0,0.5),BARSNEXT(BDTJ),DRAWNULL);
TSB1:=BARSLAST(MOBV>0)-1;
STICKLINE(BARSLAST(BDCL)>=0 AND MOBV<前低 AND MOBV<0,MOBV,前低,1,0),COLORGREEN;
STICKLINE(BDCL,MOBV,0,1,0),COLORWHITE;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(WQG)>0,MOBV,前高,1,0),COLORRED;
DRAWTEXT(VA2 AND VA2!=UU,(MOBV/10)*9,'前');
DRAWTEXT(VA2 AND VA2!=UU,MOBV/10,'高');
DRAWTEXT(ZZ,(MOBV/10)*7,'本'),COLORBLUE;
DRAWTEXT(ZZ,MOBV/10,'高'),COLORBLUE;
DRAWTEXT(BDTJ,(MOBV/10)*9,'低'),COLORRED;
DRAWTEXT(BDTJ,MOBV/10,'本'),COLORRED;
IF(BARSLAST(BDCL)>=0,本低/2,DRAWNULL),COLORRED,DOTLINE;
7. kd指标源码公式?
以下是通达信彩色KD指标KD共振公式源码(无源码的请下载附件导入)
通达信彩色KD指标KD共振公式源码
VAR13:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K13:SMA(VAR13,3,1);
D13:SMA(K13,3,1);
DRAWBAND(K13,RGB(255,255,0),D13,RGB(0,255,0));
{STICKLINE(K13>D13,K13,D13,8,0),COLOR0055AA;
STICKLINE(K13>D13,K13,D13,5,0),COLOR0077CC;
STICKLINE(K13>D13,K13,D13,3,0),COLOR0099DD;
STICKLINE(K13>D13,K13,D13,1,0),COLOR01BEE7;
STICKLINE(K13<=D13,K13,D13,8,0),COLOR006600;
STICKLINE(K13<=D13,K13,D13,5,0),COLOR009900;
STICKLINE(K13<=D13,K13,D13,3,0),COLOR00BB00;
STICKLINE(K13<=D13,K13,D13,1,0),COLOR00CC00;}
VAR55:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
K55:SMA(VAR55,3,1);
D55:SMA(K55,3,1);
DRAWBAND(K55,RGB(255,0,0),D55,RGB(0,0,255));
{STICKLINE(K55>D55,K55,D55,7,0),COLOR000045;
STICKLINE(K55>D55,K55,D55,5,0),COLOR000085;
STICKLINE(K55>D55,K55,D55,3,0),COLOR0000C5;
STICKLINE(K55>D55,K55,D55,1,0),COLOR0000E5;
STICKLINE(K55<=D55,K55,D55,7,0),COLOR353500;
STICKLINE(K55<=D55,K55,D55,5,0),COLOR555500;
STICKLINE(K55<=D55,K55,D55,3,0),COLOR757500;
STICKLINE(K55<=D55,K55,D55,1,0),COLOR858500;}
20,COLORWHITE;
80,COLORWHITE;
DIBU:= K13<20 AND D13<20 AND K55<20 AND D55<20;
STICKLINE(DIBU=1,80,60,5.8,1),COLORRED;
TOBU:= K13>80 AND D13>80 AND K55>80 AND D55>80;
STICKLINE(TOBU=1,40,20,5.8,1),COLORGREEN;
8. cyc指标公式源码?
Cyc指标(Cycle Indicator)是一种用于研究股票、期货、外汇等市场的技术指标。它的计算方法比较复杂,涉及到多个参数和数学公式。以下是Cyc指标的计算公式源码,供参考:
```
// 计算Cyc指标
double[] Cyc(double[] close, int n, double w) {
// 初始化变量
double[] cycle = new double[close.Length];
double[] trend = new double[close.Length];
double[] deviation = new double[close.Length];
double[] period = new double[close.Length];
double[] smooth = new double[close.Length];
double[] dc = new double[close.Length];
double[] cyc = new double[close.Length];
double[] sum1 = new double[close.Length];
double[] sum2 = new double[close.Length];
double[] sum3 = new double[close.Length];
double[] sum4 = new double[close.Length];
double[] sum5 = new double[close.Length];
double[] sum6 = new double[close.Length];
double[] sum7 = new double[close.Length];
double[] sum8 = new double[close.Length];
double[] sum9 = new double[close.Length];
// 计算周期
for (int i = n + 1; i < close.Length; i++) {
// 计算价格波动率
double sum = 0;
for (int j = i - n; j <= i; j++) {
sum += Math.Abs(close[j] - close[j - 1]);
}
deviation[i] = sum / n;
// 计算周期
if (deviation[i] != 0) {
period[i] = 0.5 / (deviation[i] / close[i - 1]);
} else {
period[i] = period[i - 1];
}
}
// 计算趋势
for (int i = n + 1; i < close.Length; i++) {
if (i == n + 1) {
trend[i] = 0.5 * (close[i] - close[i - n]);
} else {
trend[i] = (1 - w) * trend[i - 1] + w * 0.5 * (close[i] - close[i - n]);
}
}
// 计算平滑系数
for (int i = n + 1; i < close.Length; i++) {
smooth[i] = 0.15 * period[i] + 0.85 * smooth[i - 1];
}
// 计算DC
for (int i = n + 1; i < close.Length; i++) {
dc[i] = 0.5 * (1 + Math.Cos(2 * Math.PI / smooth[i]));
}
// 计算Cyc
for (int i = n + 1; i < close.Length; i++) {
sum1[i] = 0.0962 * close[i] + 0.5769 * close[i - 2] - 0.5769 * close[i - 4] - 0.0962 * close[i - 6];
sum2[i] = 0.075 * sum1[i] + 0.54 * sum1[i - 1] + 0.54 * sum1[i - 2] + 0.075 * sum1[i - 3];
sum3[i] = sum2[i] - dc[i] * sum2[i];
sum4[i] = 0.0962 * sum3[i] + 0.5769 * sum3[i - 2] - 0.5769 * sum3[i - 4] - 0.0962 * sum3[i - 6];
sum5[i] = 0.075 * sum4[i] + 0.54 * sum4[i - 1] + 0.54 * sum4[i - 2] + 0.075 * sum4[i - 3];
sum6[i] = sum5[i] - dc[i] * sum5[i];
sum7[i] = 0.0962 * sum6[i] + 0.5769 * sum6[i - 2] - 0.5769 * sum6[i - 4] - 0.0962 * sum6[i - 6];
sum8[i] = 0.075 * sum7[i] + 0.54 * sum7[i - 1] + 0.54 * sum7[i - 2] + 0.075 * sum7[i - 3];
sum9[i] = sum8[i] - dc[i] * sum8[i];
cyc[i] = 0.2 * sum9[i] + 0.8 * cyc[i - 1];
}
return cyc;
}
```
其中,参数`close`表示收盘价序列,`n`表示周期长度,`w`表示趋势平滑系数。该源码中包含了Cyc指标的完整计算过程,可以直接调用该方法进行计算。
9. kd指标源码公式?
以下是通达信彩色KD指标KD共振公式源码(无源码的请下载附件导入)
通达信彩色KD指标KD共振公式源码
VAR13:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K13:SMA(VAR13,3,1);
D13:SMA(K13,3,1);
DRAWBAND(K13,RGB(255,255,0),D13,RGB(0,255,0));
{STICKLINE(K13>D13,K13,D13,8,0),COLOR0055AA;
STICKLINE(K13>D13,K13,D13,5,0),COLOR0077CC;
STICKLINE(K13>D13,K13,D13,3,0),COLOR0099DD;
STICKLINE(K13>D13,K13,D13,1,0),COLOR01BEE7;
STICKLINE(K13<=D13,K13,D13,8,0),COLOR006600;
STICKLINE(K13<=D13,K13,D13,5,0),COLOR009900;
STICKLINE(K13<=D13,K13,D13,3,0),COLOR00BB00;
STICKLINE(K13<=D13,K13,D13,1,0),COLOR00CC00;}
VAR55:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
K55:SMA(VAR55,3,1);
D55:SMA(K55,3,1);
DRAWBAND(K55,RGB(255,0,0),D55,RGB(0,0,255));
{STICKLINE(K55>D55,K55,D55,7,0),COLOR000045;
STICKLINE(K55>D55,K55,D55,5,0),COLOR000085;
STICKLINE(K55>D55,K55,D55,3,0),COLOR0000C5;
STICKLINE(K55>D55,K55,D55,1,0),COLOR0000E5;
STICKLINE(K55<=D55,K55,D55,7,0),COLOR353500;
STICKLINE(K55<=D55,K55,D55,5,0),COLOR555500;
STICKLINE(K55<=D55,K55,D55,3,0),COLOR757500;
STICKLINE(K55<=D55,K55,D55,1,0),COLOR858500;}
20,COLORWHITE;
80,COLORWHITE;
DIBU:= K13<20 AND D13<20 AND K55<20 AND D55<20;
STICKLINE(DIBU=1,80,60,5.8,1),COLORRED;
TOBU:= K13>80 AND D13>80 AND K55>80 AND D55>80;
STICKLINE(TOBU=1,40,20,5.8,1),COLORGREEN;
10. dmi指标源码?
DMI指标又叫动向指标或趋向指标,其全称叫“Directional Movement Index,简称DMI”,也是由美国技术分析大师威尔斯·威尔德(Wells Wilder)所创造的,是一种中长期股市技术分析(Technical Analysis)方法。
DMI指标是通过分析股票价格在涨跌过程中买卖双方力量均衡点的变化情况,即多空双方的力量的变化受价格波动的影响而发生由均衡到失衡的循环过程,从而提供对趋势判断依据的一种技术指标。
dmi指标分类:DMI指标共有+DI(即PDI,下同)、-DI(即MDI,下同)、ADX、ADXR四条线,也是它的四个参数值,它分为多空指标(+DI、-DI)和趋向指标(ADX、ADXR)两组指标。
dmi指标公式源码
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-ref(CLOSE,1))),ABS(ref(CLOSE,1)-LOW)),N);
HD:=HIGH-ref(HIGH,1);
LD:=ref(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD0&&HDLD,HD,0),N);
DMM:=EXPMEMA(IF(LD0&&LDHD,LD,0),N);
PDI:=DMP*100/TR,COLORFFFFFF;
DRAWTEXT_FIX(CO,0.01,0.9,0''),COLORRED;
DRAWTEXT_FIX(CO,1,1,0,''),COLORRED;
MDI:=DMM*100/TR,COLOR00FFFF;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M),COLOR0000FF,LINETHICK2;
ADXR:=EXPMEMA(ADX,M),COLOR00FF00,LINETHICK2;
DYNAINFO(9)0 AND CROSS(ADX,MDI) AND CROSS(ADXR,MDI) AND PDIMDI;
11. 求助老师仿写一个牛市波段王指标,万分?
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1)
; D:=SMA(K,3,1)
; J:=3*K-2*D; XG:REF(J,1)
12. kdj指标源码?
首先与基本的kdj指标类似,有K/d/j三条指标线的走势变化,还有一种尖角指示的指标线在个股的走势过程中,标注出指标线提示的买卖点位置,具体的源码如下:
D:= EMA((CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,20);
J:= EMA((CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,5);
BIAS1W :=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS2W :=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
BIAS3W :=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
八字KDJ4:EMA(D,3),COLOR00FF00,LINETHICK2;
M:EMA(J,7),COLORWHITE,LINETHICK2;
八字KDJ: ((3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)
-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)
-50)*1.032+50),COLORRED,LINETHICK2;
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
STICKLINE(买线>=卖线,REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0),
COLORWHITE;
STICKLINE(买线<卖线,REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0),
八字kdj操盘图走势
COLORYELLOW;
VAR1:=1;
VAR2:=(2*CLOSE+HIGH+LOW+OPEN)/5;
VAR3:=LLV(LOW,34);
VAR4:=HHV(HIGH,34);
RR:=EMA(EMA(CLOSE,9),9);
控盘:=(RR-REF(RR,1))/REF(RR,1)*1000;
A10:=CROSS(控盘,0);
买两股:IF(A10,50,0),LINETHICK1,COLORYELLOW;
AR1:=PEAKBARS(3,15,1)<10;
AR2:=IF(AR1=1,2,0);
顶:= IF(AR2=2,2,0);
卖出好:IF(顶>REF(顶,1),50,0),COLORWHITE;
DRAWTEXT(卖出好=45,50,'快走'),COLORRED;
买: (ZIG(3,35)>REF(ZIG(3,35),1) AND REF(ZIG(3,35),1)
*50,STICK,COLORMAGENTA,LINETHICK3;
卖: (ZIG(3,35)REF(ZIG(3,35),2))
*50,STICK,COLORLIBLUE,LINETHICK3;
VAR21:=MA(CLOSE,80)-(MA(CLOSE,13))/(3);
VAR22:=MA((CLOSE-VAR21)/(VAR21),1);
VAR23:=(EMA(VAR22,12))*(0.69999998);
VAR24:=EMA(VAR22,3);
VAR25:=IF((LLV(VAR24-VAR23,12)>0),0,(-30));
VAR26:=FILTER((COUNT((VAR25<(-20)),3)=3),34);
快全买:IF(VAR26,50,0),COLORLICYAN;
顶线:100,COLORRED;
底线:0,COLORGREEN;
13. dmi指标源码?
DMI指标又叫动向指标或趋向指标,其全称叫“Directional Movement Index,简称DMI”,也是由美国技术分析大师威尔斯·威尔德(Wells Wilder)所创造的,是一种中长期股市技术分析(Technical Analysis)方法。
DMI指标是通过分析股票价格在涨跌过程中买卖双方力量均衡点的变化情况,即多空双方的力量的变化受价格波动的影响而发生由均衡到失衡的循环过程,从而提供对趋势判断依据的一种技术指标。
dmi指标分类:DMI指标共有+DI(即PDI,下同)、-DI(即MDI,下同)、ADX、ADXR四条线,也是它的四个参数值,它分为多空指标(+DI、-DI)和趋向指标(ADX、ADXR)两组指标。
dmi指标公式源码
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-ref(CLOSE,1))),ABS(ref(CLOSE,1)-LOW)),N);
HD:=HIGH-ref(HIGH,1);
LD:=ref(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD0&&HDLD,HD,0),N);
DMM:=EXPMEMA(IF(LD0&&LDHD,LD,0),N);
PDI:=DMP*100/TR,COLORFFFFFF;
DRAWTEXT_FIX(CO,0.01,0.9,0''),COLORRED;
DRAWTEXT_FIX(CO,1,1,0,''),COLORRED;
MDI:=DMM*100/TR,COLOR00FFFF;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M),COLOR0000FF,LINETHICK2;
ADXR:=EXPMEMA(ADX,M),COLOR00FF00,LINETHICK2;
DYNAINFO(9)0 AND CROSS(ADX,MDI) AND CROSS(ADXR,MDI) AND PDIMDI;
14. cyc指标公式源码?
Cyc指标(Cycle Indicator)是一种用于研究股票、期货、外汇等市场的技术指标。它的计算方法比较复杂,涉及到多个参数和数学公式。以下是Cyc指标的计算公式源码,供参考:
```
// 计算Cyc指标
double[] Cyc(double[] close, int n, double w) {
// 初始化变量
double[] cycle = new double[close.Length];
double[] trend = new double[close.Length];
double[] deviation = new double[close.Length];
double[] period = new double[close.Length];
double[] smooth = new double[close.Length];
double[] dc = new double[close.Length];
double[] cyc = new double[close.Length];
double[] sum1 = new double[close.Length];
double[] sum2 = new double[close.Length];
double[] sum3 = new double[close.Length];
double[] sum4 = new double[close.Length];
double[] sum5 = new double[close.Length];
double[] sum6 = new double[close.Length];
double[] sum7 = new double[close.Length];
double[] sum8 = new double[close.Length];
double[] sum9 = new double[close.Length];
// 计算周期
for (int i = n + 1; i < close.Length; i++) {
// 计算价格波动率
double sum = 0;
for (int j = i - n; j <= i; j++) {
sum += Math.Abs(close[j] - close[j - 1]);
}
deviation[i] = sum / n;
// 计算周期
if (deviation[i] != 0) {
period[i] = 0.5 / (deviation[i] / close[i - 1]);
} else {
period[i] = period[i - 1];
}
}
// 计算趋势
for (int i = n + 1; i < close.Length; i++) {
if (i == n + 1) {
trend[i] = 0.5 * (close[i] - close[i - n]);
} else {
trend[i] = (1 - w) * trend[i - 1] + w * 0.5 * (close[i] - close[i - n]);
}
}
// 计算平滑系数
for (int i = n + 1; i < close.Length; i++) {
smooth[i] = 0.15 * period[i] + 0.85 * smooth[i - 1];
}
// 计算DC
for (int i = n + 1; i < close.Length; i++) {
dc[i] = 0.5 * (1 + Math.Cos(2 * Math.PI / smooth[i]));
}
// 计算Cyc
for (int i = n + 1; i < close.Length; i++) {
sum1[i] = 0.0962 * close[i] + 0.5769 * close[i - 2] - 0.5769 * close[i - 4] - 0.0962 * close[i - 6];
sum2[i] = 0.075 * sum1[i] + 0.54 * sum1[i - 1] + 0.54 * sum1[i - 2] + 0.075 * sum1[i - 3];
sum3[i] = sum2[i] - dc[i] * sum2[i];
sum4[i] = 0.0962 * sum3[i] + 0.5769 * sum3[i - 2] - 0.5769 * sum3[i - 4] - 0.0962 * sum3[i - 6];
sum5[i] = 0.075 * sum4[i] + 0.54 * sum4[i - 1] + 0.54 * sum4[i - 2] + 0.075 * sum4[i - 3];
sum6[i] = sum5[i] - dc[i] * sum5[i];
sum7[i] = 0.0962 * sum6[i] + 0.5769 * sum6[i - 2] - 0.5769 * sum6[i - 4] - 0.0962 * sum6[i - 6];
sum8[i] = 0.075 * sum7[i] + 0.54 * sum7[i - 1] + 0.54 * sum7[i - 2] + 0.075 * sum7[i - 3];
sum9[i] = sum8[i] - dc[i] * sum8[i];
cyc[i] = 0.2 * sum9[i] + 0.8 * cyc[i - 1];
}
return cyc;
}
```
其中,参数`close`表示收盘价序列,`n`表示周期长度,`w`表示趋势平滑系数。该源码中包含了Cyc指标的完整计算过程,可以直接调用该方法进行计算。
15. obv公式源码?
MOBV:=OBV-MA(OBV,30);
W1:STICKLINE(MOBV>0,MOBV,0,3,1),COLORRED;
W2:STICKLINE(MOBV<0,MOBV,0,3,1),COLORCYAN;
VA1:=HHVBARS(MOBV,BARSLAST(MOBV<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MOBV),REF(VA1,1)+2),0.5);
QG:=CROSS(BACKSET(CROSS(0,MOBV) OR (ISLASTBAR AND MOBV>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MOBV,REF(VA2,1),REF(MOBV,1),1),COLORMAGENTA;
VA3:=LLVBARS(MOBV,BARSLAST(MOBV>0)+1);
VA4:=CROSS(BACKSET(CROSS(MOBV,0),REF(VA3,1)+2),0.5);
BD:=BARSLAST(FILTERX(CROSS(0,MOBV),BARSCOUNT(C)));
前低:DRAWLINE(VA4,MOBV,REF(VA4,1),REF(MOBV,1),1);
BDTJ:=IF(MOBV<0,FILTERX(MOBV=LLV(MOBV,BARSLAST(MOBV>0)),
BARSCOUNT(C)),DRAWNULL);
TSBDTJ:=BARSLAST(BDTJ);
BDZH:=FILTERX(MOBV<CONST(LLV(MOBV,BD+1)),BARSCOUNT(C));
BDTS:=BARSLAST(BDZH);
本低:IF(BD+1>=1,CONST(LLV(MOBV,BD+1)),DRAWNULL);
BDCL:=CROSS(COUNT(CROSS(MOBV>本低/2 AND MOBV<0,0.5),TSBDTJ)=1,0.5) AND TSBDTJ>=0;
终点:=IF(ISLASTBAR AND MOBV>0 AND MOBV=HHV(MOBV,BARSLAST(MOBV<0)),1,IF(FILTERX(QG,BARSCOUNT(C)),2,DRAWNULL));
UU:=(终点=1 OR 终点=2) AND MOBV>0;
ZZ:=FILTERX(UU,BARSCOUNT(C));
本高:DRAWLINE(ZZ,MOBV,REF(ZZ,1),REF(MOBV,1),1),COLORWHITE;
横线:=CONST(REF(MOBV,BARSLAST(ZZ)));
WW:=MOBV>横线;
起始点:=FILTERX(REFX(BARSLAST(WW),1)=1,BARSCOUNT(C));
天数:=BARSLAST(起始点),COLORYELLOW,NODRAW;
上横线:=DRAWLINE(起始点,横线,ZZ,横线,0),COLORGREEN,DOTLINE;
下横线:=DRAWLINE(BDZH,CONST(LLV(MOBV,BD+1)),BDTJ=1,MOBV,0),COLOR8080FF,DOTLINE;
DRAWNUMBER(BDTJ,CONST(LLV(MOBV,BD+1))*0.9,BDTS);
DRAWNUMBER(ZZ,上横线*1.1,天数);
TJ:=IF(起始点,BARSNEXT(ZZ),DRAWNULL);
红柱数量:=IF(天数>0 AND 天数<=REF(TJ,天数),SUM(MOBV>0,天数),DRAWNULL),COLORWHITE,NODRAW;
横线起始价:=REF(C,天数),NODRAW;
空间评估:=(横线起始价-C)/C*100,NODRAW;
TT:=BARSLAST(ZZ);
WQG:=CROSS(COUNT(CROSS(MOBV<本高/2 AND MOBV>0,0.5),ZZ)=1,0.5) AND ZZ>=0;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(CROSS(MOBV<本高/2,0.5))>0 AND MOBV>(前高+本高)/2,MOBV,前高,1,0),COLORYELLOW;
前高本高二分位:IF(MOBV>0 AND 本高!=前高,DRAWLINE(WQG,(前高+本高)/2,REF(WQG,1),REF((前高+本高)/2,1),1),DRAWNULL),COLORC0C000,DOTLINE;
AA:=STRCAT(STRCAT(STRCAT('〖','上升空间'),'〗'),CON2STR(IF(空间评估,空间评估,DRAWNULL),2));
STICKLINE(MOBV>前高,MOBV,前高,1,0),COLORYELLOW;
STICKLINE(WQG,MOBV,0,1,0),COLORGREEN;
STICKLINE(MOBV<0 AND MOBV<前低 AND 前低<0,MOBV,前低,1,0),COLORBLUE;
B1:=IF(CROSS(MOBV<0,0.5),BARSNEXT(BDTJ),DRAWNULL);
TSB1:=BARSLAST(MOBV>0)-1;
STICKLINE(BARSLAST(BDCL)>=0 AND MOBV<前低 AND MOBV<0,MOBV,前低,1,0),COLORGREEN;
STICKLINE(BDCL,MOBV,0,1,0),COLORWHITE;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(WQG)>0,MOBV,前高,1,0),COLORRED;
DRAWTEXT(VA2 AND VA2!=UU,(MOBV/10)*9,'前');
DRAWTEXT(VA2 AND VA2!=UU,MOBV/10,'高');
DRAWTEXT(ZZ,(MOBV/10)*7,'本'),COLORBLUE;
DRAWTEXT(ZZ,MOBV/10,'高'),COLORBLUE;
DRAWTEXT(BDTJ,(MOBV/10)*9,'低'),COLORRED;
DRAWTEXT(BDTJ,MOBV/10,'本'),COLORRED;
IF(BARSLAST(BDCL)>=0,本低/2,DRAWNULL),COLORRED,DOTLINE;
16. obv公式源码?
MOBV:=OBV-MA(OBV,30);
W1:STICKLINE(MOBV>0,MOBV,0,3,1),COLORRED;
W2:STICKLINE(MOBV<0,MOBV,0,3,1),COLORCYAN;
VA1:=HHVBARS(MOBV,BARSLAST(MOBV<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MOBV),REF(VA1,1)+2),0.5);
QG:=CROSS(BACKSET(CROSS(0,MOBV) OR (ISLASTBAR AND MOBV>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MOBV,REF(VA2,1),REF(MOBV,1),1),COLORMAGENTA;
VA3:=LLVBARS(MOBV,BARSLAST(MOBV>0)+1);
VA4:=CROSS(BACKSET(CROSS(MOBV,0),REF(VA3,1)+2),0.5);
BD:=BARSLAST(FILTERX(CROSS(0,MOBV),BARSCOUNT(C)));
前低:DRAWLINE(VA4,MOBV,REF(VA4,1),REF(MOBV,1),1);
BDTJ:=IF(MOBV<0,FILTERX(MOBV=LLV(MOBV,BARSLAST(MOBV>0)),
BARSCOUNT(C)),DRAWNULL);
TSBDTJ:=BARSLAST(BDTJ);
BDZH:=FILTERX(MOBV<CONST(LLV(MOBV,BD+1)),BARSCOUNT(C));
BDTS:=BARSLAST(BDZH);
本低:IF(BD+1>=1,CONST(LLV(MOBV,BD+1)),DRAWNULL);
BDCL:=CROSS(COUNT(CROSS(MOBV>本低/2 AND MOBV<0,0.5),TSBDTJ)=1,0.5) AND TSBDTJ>=0;
终点:=IF(ISLASTBAR AND MOBV>0 AND MOBV=HHV(MOBV,BARSLAST(MOBV<0)),1,IF(FILTERX(QG,BARSCOUNT(C)),2,DRAWNULL));
UU:=(终点=1 OR 终点=2) AND MOBV>0;
ZZ:=FILTERX(UU,BARSCOUNT(C));
本高:DRAWLINE(ZZ,MOBV,REF(ZZ,1),REF(MOBV,1),1),COLORWHITE;
横线:=CONST(REF(MOBV,BARSLAST(ZZ)));
WW:=MOBV>横线;
起始点:=FILTERX(REFX(BARSLAST(WW),1)=1,BARSCOUNT(C));
天数:=BARSLAST(起始点),COLORYELLOW,NODRAW;
上横线:=DRAWLINE(起始点,横线,ZZ,横线,0),COLORGREEN,DOTLINE;
下横线:=DRAWLINE(BDZH,CONST(LLV(MOBV,BD+1)),BDTJ=1,MOBV,0),COLOR8080FF,DOTLINE;
DRAWNUMBER(BDTJ,CONST(LLV(MOBV,BD+1))*0.9,BDTS);
DRAWNUMBER(ZZ,上横线*1.1,天数);
TJ:=IF(起始点,BARSNEXT(ZZ),DRAWNULL);
红柱数量:=IF(天数>0 AND 天数<=REF(TJ,天数),SUM(MOBV>0,天数),DRAWNULL),COLORWHITE,NODRAW;
横线起始价:=REF(C,天数),NODRAW;
空间评估:=(横线起始价-C)/C*100,NODRAW;
TT:=BARSLAST(ZZ);
WQG:=CROSS(COUNT(CROSS(MOBV<本高/2 AND MOBV>0,0.5),ZZ)=1,0.5) AND ZZ>=0;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(CROSS(MOBV<本高/2,0.5))>0 AND MOBV>(前高+本高)/2,MOBV,前高,1,0),COLORYELLOW;
前高本高二分位:IF(MOBV>0 AND 本高!=前高,DRAWLINE(WQG,(前高+本高)/2,REF(WQG,1),REF((前高+本高)/2,1),1),DRAWNULL),COLORC0C000,DOTLINE;
AA:=STRCAT(STRCAT(STRCAT('〖','上升空间'),'〗'),CON2STR(IF(空间评估,空间评估,DRAWNULL),2));
STICKLINE(MOBV>前高,MOBV,前高,1,0),COLORYELLOW;
STICKLINE(WQG,MOBV,0,1,0),COLORGREEN;
STICKLINE(MOBV<0 AND MOBV<前低 AND 前低<0,MOBV,前低,1,0),COLORBLUE;
B1:=IF(CROSS(MOBV<0,0.5),BARSNEXT(BDTJ),DRAWNULL);
TSB1:=BARSLAST(MOBV>0)-1;
STICKLINE(BARSLAST(BDCL)>=0 AND MOBV<前低 AND MOBV<0,MOBV,前低,1,0),COLORGREEN;
STICKLINE(BDCL,MOBV,0,1,0),COLORWHITE;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(WQG)>0,MOBV,前高,1,0),COLORRED;
DRAWTEXT(VA2 AND VA2!=UU,(MOBV/10)*9,'前');
DRAWTEXT(VA2 AND VA2!=UU,MOBV/10,'高');
DRAWTEXT(ZZ,(MOBV/10)*7,'本'),COLORBLUE;
DRAWTEXT(ZZ,MOBV/10,'高'),COLORBLUE;
DRAWTEXT(BDTJ,(MOBV/10)*9,'低'),COLORRED;
DRAWTEXT(BDTJ,MOBV/10,'本'),COLORRED;
IF(BARSLAST(BDCL)>=0,本低/2,DRAWNULL),COLORRED,DOTLINE;
17. 委比指标公式源码?
集合竞价量比
量比:=V/REF(MA(V,5),1);
D1:=ISBUYORDER AND DYNAINFO(9)*C/100>=50;{分笔买入单>50万}
D2:=(DYNAINFO(23)-DYNAINFO(22))/CAPITAL*100>=0.4;{内外盘净};
ST:=NOT(NAMELIKE('S') OR NAMELIKE('*S'));
T1:=DYNAINFO(11)/DYNAINFO(4)>=1.03 AND DYNAINFO(11)/DYNAINFO(4)<=1.05 AND ST;
T2:=H/DYNAINFO(3)<=1.075 AND C/DYNAINFO(3)<=1.06 AND C>=DYNAINFO(11) AND C<H;
T3:=FROMOPEN>=10 AND FROMOPEN<=220;{时间控制}
预警:=T1 AND T2 AND T3 AND D1 AND D2;
流通股本:=FINANCE(1)/10000000<=30;
换手率:=COUNT(VOL/CAPITAL*100<3,N)=0;
现价:=DYNAINFO(7);
均价:=DYNAINFO(11)+(DYNAINFO(11)*0.021);
条件:=IF(现价>均价,1,0);
集合竞价选股:量比 AND 预警 AND 流通股本 AND 条件;
18. kd指标源码公式?
以下是通达信彩色KD指标KD共振公式源码(无源码的请下载附件导入)
通达信彩色KD指标KD共振公式源码
VAR13:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K13:SMA(VAR13,3,1);
D13:SMA(K13,3,1);
DRAWBAND(K13,RGB(255,255,0),D13,RGB(0,255,0));
{STICKLINE(K13>D13,K13,D13,8,0),COLOR0055AA;
STICKLINE(K13>D13,K13,D13,5,0),COLOR0077CC;
STICKLINE(K13>D13,K13,D13,3,0),COLOR0099DD;
STICKLINE(K13>D13,K13,D13,1,0),COLOR01BEE7;
STICKLINE(K13<=D13,K13,D13,8,0),COLOR006600;
STICKLINE(K13<=D13,K13,D13,5,0),COLOR009900;
STICKLINE(K13<=D13,K13,D13,3,0),COLOR00BB00;
STICKLINE(K13<=D13,K13,D13,1,0),COLOR00CC00;}
VAR55:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
K55:SMA(VAR55,3,1);
D55:SMA(K55,3,1);
DRAWBAND(K55,RGB(255,0,0),D55,RGB(0,0,255));
{STICKLINE(K55>D55,K55,D55,7,0),COLOR000045;
STICKLINE(K55>D55,K55,D55,5,0),COLOR000085;
STICKLINE(K55>D55,K55,D55,3,0),COLOR0000C5;
STICKLINE(K55>D55,K55,D55,1,0),COLOR0000E5;
STICKLINE(K55<=D55,K55,D55,7,0),COLOR353500;
STICKLINE(K55<=D55,K55,D55,5,0),COLOR555500;
STICKLINE(K55<=D55,K55,D55,3,0),COLOR757500;
STICKLINE(K55<=D55,K55,D55,1,0),COLOR858500;}
20,COLORWHITE;
80,COLORWHITE;
DIBU:= K13<20 AND D13<20 AND K55<20 AND D55<20;
STICKLINE(DIBU=1,80,60,5.8,1),COLORRED;
TOBU:= K13>80 AND D13>80 AND K55>80 AND D55>80;
STICKLINE(TOBU=1,40,20,5.8,1),COLORGREEN;
19. kd公式源码?
N:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1);
D:SMA(K,M2,1);
1.K线由右边向下交叉D值做卖,K线由右边向上交叉D值做买;
⒉.高档连续二次向下交叉确认跌势,低挡连续二次向上交叉确认涨势;3.D值<20%超卖,D值>80%超买;
4.KD值于50%左右徘徊或交叉时,无意义;5.投机性太强的个股不适用;
6.可观察KD值同股价的背离,以确认高低点。
20. 求助老师仿写一个牛市波段王指标,万分?
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1)
; D:=SMA(K,3,1)
; J:=3*K-2*D; XG:REF(J,1)
21. kdj指标源码?
首先与基本的kdj指标类似,有K/d/j三条指标线的走势变化,还有一种尖角指示的指标线在个股的走势过程中,标注出指标线提示的买卖点位置,具体的源码如下:
D:= EMA((CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,20);
J:= EMA((CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,5);
BIAS1W :=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS2W :=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
BIAS3W :=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
八字KDJ4:EMA(D,3),COLOR00FF00,LINETHICK2;
M:EMA(J,7),COLORWHITE,LINETHICK2;
八字KDJ: ((3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)
-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)
-50)*1.032+50),COLORRED,LINETHICK2;
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
STICKLINE(买线>=卖线,REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0),
COLORWHITE;
STICKLINE(买线<卖线,REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0),
八字kdj操盘图走势
COLORYELLOW;
VAR1:=1;
VAR2:=(2*CLOSE+HIGH+LOW+OPEN)/5;
VAR3:=LLV(LOW,34);
VAR4:=HHV(HIGH,34);
RR:=EMA(EMA(CLOSE,9),9);
控盘:=(RR-REF(RR,1))/REF(RR,1)*1000;
A10:=CROSS(控盘,0);
买两股:IF(A10,50,0),LINETHICK1,COLORYELLOW;
AR1:=PEAKBARS(3,15,1)<10;
AR2:=IF(AR1=1,2,0);
顶:= IF(AR2=2,2,0);
卖出好:IF(顶>REF(顶,1),50,0),COLORWHITE;
DRAWTEXT(卖出好=45,50,'快走'),COLORRED;
买: (ZIG(3,35)>REF(ZIG(3,35),1) AND REF(ZIG(3,35),1)
*50,STICK,COLORMAGENTA,LINETHICK3;
卖: (ZIG(3,35)REF(ZIG(3,35),2))
*50,STICK,COLORLIBLUE,LINETHICK3;
VAR21:=MA(CLOSE,80)-(MA(CLOSE,13))/(3);
VAR22:=MA((CLOSE-VAR21)/(VAR21),1);
VAR23:=(EMA(VAR22,12))*(0.69999998);
VAR24:=EMA(VAR22,3);
VAR25:=IF((LLV(VAR24-VAR23,12)>0),0,(-30));
VAR26:=FILTER((COUNT((VAR25<(-20)),3)=3),34);
快全买:IF(VAR26,50,0),COLORLICYAN;
顶线:100,COLORRED;
底线:0,COLORGREEN;
22. kd公式源码?
N:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1);
D:SMA(K,M2,1);
1.K线由右边向下交叉D值做卖,K线由右边向上交叉D值做买;
⒉.高档连续二次向下交叉确认跌势,低挡连续二次向上交叉确认涨势;3.D值<20%超卖,D值>80%超买;
4.KD值于50%左右徘徊或交叉时,无意义;5.投机性太强的个股不适用;
6.可观察KD值同股价的背离,以确认高低点。
23. kdj指标源码?
首先与基本的kdj指标类似,有K/d/j三条指标线的走势变化,还有一种尖角指示的指标线在个股的走势过程中,标注出指标线提示的买卖点位置,具体的源码如下:
D:= EMA((CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,20);
J:= EMA((CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,5);
BIAS1W :=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS2W :=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
BIAS3W :=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
八字KDJ4:EMA(D,3),COLOR00FF00,LINETHICK2;
M:EMA(J,7),COLORWHITE,LINETHICK2;
八字KDJ: ((3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)
-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)
-50)*1.032+50),COLORRED,LINETHICK2;
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
STICKLINE(买线>=卖线,REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0),
COLORWHITE;
STICKLINE(买线<卖线,REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0),
八字kdj操盘图走势
COLORYELLOW;
VAR1:=1;
VAR2:=(2*CLOSE+HIGH+LOW+OPEN)/5;
VAR3:=LLV(LOW,34);
VAR4:=HHV(HIGH,34);
RR:=EMA(EMA(CLOSE,9),9);
控盘:=(RR-REF(RR,1))/REF(RR,1)*1000;
A10:=CROSS(控盘,0);
买两股:IF(A10,50,0),LINETHICK1,COLORYELLOW;
AR1:=PEAKBARS(3,15,1)<10;
AR2:=IF(AR1=1,2,0);
顶:= IF(AR2=2,2,0);
卖出好:IF(顶>REF(顶,1),50,0),COLORWHITE;
DRAWTEXT(卖出好=45,50,'快走'),COLORRED;
买: (ZIG(3,35)>REF(ZIG(3,35),1) AND REF(ZIG(3,35),1)
*50,STICK,COLORMAGENTA,LINETHICK3;
卖: (ZIG(3,35)REF(ZIG(3,35),2))
*50,STICK,COLORLIBLUE,LINETHICK3;
VAR21:=MA(CLOSE,80)-(MA(CLOSE,13))/(3);
VAR22:=MA((CLOSE-VAR21)/(VAR21),1);
VAR23:=(EMA(VAR22,12))*(0.69999998);
VAR24:=EMA(VAR22,3);
VAR25:=IF((LLV(VAR24-VAR23,12)>0),0,(-30));
VAR26:=FILTER((COUNT((VAR25<(-20)),3)=3),34);
快全买:IF(VAR26,50,0),COLORLICYAN;
顶线:100,COLORRED;
底线:0,COLORGREEN;
24. obv公式源码?
MOBV:=OBV-MA(OBV,30);
W1:STICKLINE(MOBV>0,MOBV,0,3,1),COLORRED;
W2:STICKLINE(MOBV<0,MOBV,0,3,1),COLORCYAN;
VA1:=HHVBARS(MOBV,BARSLAST(MOBV<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MOBV),REF(VA1,1)+2),0.5);
QG:=CROSS(BACKSET(CROSS(0,MOBV) OR (ISLASTBAR AND MOBV>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MOBV,REF(VA2,1),REF(MOBV,1),1),COLORMAGENTA;
VA3:=LLVBARS(MOBV,BARSLAST(MOBV>0)+1);
VA4:=CROSS(BACKSET(CROSS(MOBV,0),REF(VA3,1)+2),0.5);
BD:=BARSLAST(FILTERX(CROSS(0,MOBV),BARSCOUNT(C)));
前低:DRAWLINE(VA4,MOBV,REF(VA4,1),REF(MOBV,1),1);
BDTJ:=IF(MOBV<0,FILTERX(MOBV=LLV(MOBV,BARSLAST(MOBV>0)),
BARSCOUNT(C)),DRAWNULL);
TSBDTJ:=BARSLAST(BDTJ);
BDZH:=FILTERX(MOBV<CONST(LLV(MOBV,BD+1)),BARSCOUNT(C));
BDTS:=BARSLAST(BDZH);
本低:IF(BD+1>=1,CONST(LLV(MOBV,BD+1)),DRAWNULL);
BDCL:=CROSS(COUNT(CROSS(MOBV>本低/2 AND MOBV<0,0.5),TSBDTJ)=1,0.5) AND TSBDTJ>=0;
终点:=IF(ISLASTBAR AND MOBV>0 AND MOBV=HHV(MOBV,BARSLAST(MOBV<0)),1,IF(FILTERX(QG,BARSCOUNT(C)),2,DRAWNULL));
UU:=(终点=1 OR 终点=2) AND MOBV>0;
ZZ:=FILTERX(UU,BARSCOUNT(C));
本高:DRAWLINE(ZZ,MOBV,REF(ZZ,1),REF(MOBV,1),1),COLORWHITE;
横线:=CONST(REF(MOBV,BARSLAST(ZZ)));
WW:=MOBV>横线;
起始点:=FILTERX(REFX(BARSLAST(WW),1)=1,BARSCOUNT(C));
天数:=BARSLAST(起始点),COLORYELLOW,NODRAW;
上横线:=DRAWLINE(起始点,横线,ZZ,横线,0),COLORGREEN,DOTLINE;
下横线:=DRAWLINE(BDZH,CONST(LLV(MOBV,BD+1)),BDTJ=1,MOBV,0),COLOR8080FF,DOTLINE;
DRAWNUMBER(BDTJ,CONST(LLV(MOBV,BD+1))*0.9,BDTS);
DRAWNUMBER(ZZ,上横线*1.1,天数);
TJ:=IF(起始点,BARSNEXT(ZZ),DRAWNULL);
红柱数量:=IF(天数>0 AND 天数<=REF(TJ,天数),SUM(MOBV>0,天数),DRAWNULL),COLORWHITE,NODRAW;
横线起始价:=REF(C,天数),NODRAW;
空间评估:=(横线起始价-C)/C*100,NODRAW;
TT:=BARSLAST(ZZ);
WQG:=CROSS(COUNT(CROSS(MOBV<本高/2 AND MOBV>0,0.5),ZZ)=1,0.5) AND ZZ>=0;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(CROSS(MOBV<本高/2,0.5))>0 AND MOBV>(前高+本高)/2,MOBV,前高,1,0),COLORYELLOW;
前高本高二分位:IF(MOBV>0 AND 本高!=前高,DRAWLINE(WQG,(前高+本高)/2,REF(WQG,1),REF((前高+本高)/2,1),1),DRAWNULL),COLORC0C000,DOTLINE;
AA:=STRCAT(STRCAT(STRCAT('〖','上升空间'),'〗'),CON2STR(IF(空间评估,空间评估,DRAWNULL),2));
STICKLINE(MOBV>前高,MOBV,前高,1,0),COLORYELLOW;
STICKLINE(WQG,MOBV,0,1,0),COLORGREEN;
STICKLINE(MOBV<0 AND MOBV<前低 AND 前低<0,MOBV,前低,1,0),COLORBLUE;
B1:=IF(CROSS(MOBV<0,0.5),BARSNEXT(BDTJ),DRAWNULL);
TSB1:=BARSLAST(MOBV>0)-1;
STICKLINE(BARSLAST(BDCL)>=0 AND MOBV<前低 AND MOBV<0,MOBV,前低,1,0),COLORGREEN;
STICKLINE(BDCL,MOBV,0,1,0),COLORWHITE;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(WQG)>0,MOBV,前高,1,0),COLORRED;
DRAWTEXT(VA2 AND VA2!=UU,(MOBV/10)*9,'前');
DRAWTEXT(VA2 AND VA2!=UU,MOBV/10,'高');
DRAWTEXT(ZZ,(MOBV/10)*7,'本'),COLORBLUE;
DRAWTEXT(ZZ,MOBV/10,'高'),COLORBLUE;
DRAWTEXT(BDTJ,(MOBV/10)*9,'低'),COLORRED;
DRAWTEXT(BDTJ,MOBV/10,'本'),COLORRED;
IF(BARSLAST(BDCL)>=0,本低/2,DRAWNULL),COLORRED,DOTLINE;
25. kd公式源码?
N:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1);
D:SMA(K,M2,1);
1.K线由右边向下交叉D值做卖,K线由右边向上交叉D值做买;
⒉.高档连续二次向下交叉确认跌势,低挡连续二次向上交叉确认涨势;3.D值<20%超卖,D值>80%超买;
4.KD值于50%左右徘徊或交叉时,无意义;5.投机性太强的个股不适用;
6.可观察KD值同股价的背离,以确认高低点。
26. kdj指标源码?
首先与基本的kdj指标类似,有K/d/j三条指标线的走势变化,还有一种尖角指示的指标线在个股的走势过程中,标注出指标线提示的买卖点位置,具体的源码如下:
D:= EMA((CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,20);
J:= EMA((CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,5);
BIAS1W :=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS2W :=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
BIAS3W :=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
八字KDJ4:EMA(D,3),COLOR00FF00,LINETHICK2;
M:EMA(J,7),COLORWHITE,LINETHICK2;
八字KDJ: ((3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)
-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)
-50)*1.032+50),COLORRED,LINETHICK2;
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
STICKLINE(买线>=卖线,REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0),
COLORWHITE;
STICKLINE(买线<卖线,REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0),
八字kdj操盘图走势
COLORYELLOW;
VAR1:=1;
VAR2:=(2*CLOSE+HIGH+LOW+OPEN)/5;
VAR3:=LLV(LOW,34);
VAR4:=HHV(HIGH,34);
RR:=EMA(EMA(CLOSE,9),9);
控盘:=(RR-REF(RR,1))/REF(RR,1)*1000;
A10:=CROSS(控盘,0);
买两股:IF(A10,50,0),LINETHICK1,COLORYELLOW;
AR1:=PEAKBARS(3,15,1)<10;
AR2:=IF(AR1=1,2,0);
顶:= IF(AR2=2,2,0);
卖出好:IF(顶>REF(顶,1),50,0),COLORWHITE;
DRAWTEXT(卖出好=45,50,'快走'),COLORRED;
买: (ZIG(3,35)>REF(ZIG(3,35),1) AND REF(ZIG(3,35),1)
*50,STICK,COLORMAGENTA,LINETHICK3;
卖: (ZIG(3,35)REF(ZIG(3,35),2))
*50,STICK,COLORLIBLUE,LINETHICK3;
VAR21:=MA(CLOSE,80)-(MA(CLOSE,13))/(3);
VAR22:=MA((CLOSE-VAR21)/(VAR21),1);
VAR23:=(EMA(VAR22,12))*(0.69999998);
VAR24:=EMA(VAR22,3);
VAR25:=IF((LLV(VAR24-VAR23,12)>0),0,(-30));
VAR26:=FILTER((COUNT((VAR25<(-20)),3)=3),34);
快全买:IF(VAR26,50,0),COLORLICYAN;
顶线:100,COLORRED;
底线:0,COLORGREEN;
27. kd公式源码?
N:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1);
D:SMA(K,M2,1);
1.K线由右边向下交叉D值做卖,K线由右边向上交叉D值做买;
⒉.高档连续二次向下交叉确认跌势,低挡连续二次向上交叉确认涨势;3.D值<20%超卖,D值>80%超买;
4.KD值于50%左右徘徊或交叉时,无意义;5.投机性太强的个股不适用;
6.可观察KD值同股价的背离,以确认高低点。
28. macd指标源代码是什么?
macd指标源代码如下:
D:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW;
DRAWTEXT(低位金叉,0.16,' 低位金叉'),COLORWHITE;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
29. macd指标源代码是什么?
macd指标源代码如下:
D:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW;
DRAWTEXT(低位金叉,0.16,' 低位金叉'),COLORWHITE;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
30. macd指标源代码是什么?
macd指标源代码如下:
D:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW;
DRAWTEXT(低位金叉,0.16,' 低位金叉'),COLORWHITE;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
31. 委比指标公式源码?
集合竞价量比
量比:=V/REF(MA(V,5),1);
D1:=ISBUYORDER AND DYNAINFO(9)*C/100>=50;{分笔买入单>50万}
D2:=(DYNAINFO(23)-DYNAINFO(22))/CAPITAL*100>=0.4;{内外盘净};
ST:=NOT(NAMELIKE('S') OR NAMELIKE('*S'));
T1:=DYNAINFO(11)/DYNAINFO(4)>=1.03 AND DYNAINFO(11)/DYNAINFO(4)<=1.05 AND ST;
T2:=H/DYNAINFO(3)<=1.075 AND C/DYNAINFO(3)<=1.06 AND C>=DYNAINFO(11) AND C<H;
T3:=FROMOPEN>=10 AND FROMOPEN<=220;{时间控制}
预警:=T1 AND T2 AND T3 AND D1 AND D2;
流通股本:=FINANCE(1)/10000000<=30;
换手率:=COUNT(VOL/CAPITAL*100<3,N)=0;
现价:=DYNAINFO(7);
均价:=DYNAINFO(11)+(DYNAINFO(11)*0.021);
条件:=IF(现价>均价,1,0);
集合竞价选股:量比 AND 预警 AND 流通股本 AND 条件;
32. cyc指标公式源码?
Cyc指标(Cycle Indicator)是一种用于研究股票、期货、外汇等市场的技术指标。它的计算方法比较复杂,涉及到多个参数和数学公式。以下是Cyc指标的计算公式源码,供参考:
```
// 计算Cyc指标
double[] Cyc(double[] close, int n, double w) {
// 初始化变量
double[] cycle = new double[close.Length];
double[] trend = new double[close.Length];
double[] deviation = new double[close.Length];
double[] period = new double[close.Length];
double[] smooth = new double[close.Length];
double[] dc = new double[close.Length];
double[] cyc = new double[close.Length];
double[] sum1 = new double[close.Length];
double[] sum2 = new double[close.Length];
double[] sum3 = new double[close.Length];
double[] sum4 = new double[close.Length];
double[] sum5 = new double[close.Length];
double[] sum6 = new double[close.Length];
double[] sum7 = new double[close.Length];
double[] sum8 = new double[close.Length];
double[] sum9 = new double[close.Length];
// 计算周期
for (int i = n + 1; i < close.Length; i++) {
// 计算价格波动率
double sum = 0;
for (int j = i - n; j <= i; j++) {
sum += Math.Abs(close[j] - close[j - 1]);
}
deviation[i] = sum / n;
// 计算周期
if (deviation[i] != 0) {
period[i] = 0.5 / (deviation[i] / close[i - 1]);
} else {
period[i] = period[i - 1];
}
}
// 计算趋势
for (int i = n + 1; i < close.Length; i++) {
if (i == n + 1) {
trend[i] = 0.5 * (close[i] - close[i - n]);
} else {
trend[i] = (1 - w) * trend[i - 1] + w * 0.5 * (close[i] - close[i - n]);
}
}
// 计算平滑系数
for (int i = n + 1; i < close.Length; i++) {
smooth[i] = 0.15 * period[i] + 0.85 * smooth[i - 1];
}
// 计算DC
for (int i = n + 1; i < close.Length; i++) {
dc[i] = 0.5 * (1 + Math.Cos(2 * Math.PI / smooth[i]));
}
// 计算Cyc
for (int i = n + 1; i < close.Length; i++) {
sum1[i] = 0.0962 * close[i] + 0.5769 * close[i - 2] - 0.5769 * close[i - 4] - 0.0962 * close[i - 6];
sum2[i] = 0.075 * sum1[i] + 0.54 * sum1[i - 1] + 0.54 * sum1[i - 2] + 0.075 * sum1[i - 3];
sum3[i] = sum2[i] - dc[i] * sum2[i];
sum4[i] = 0.0962 * sum3[i] + 0.5769 * sum3[i - 2] - 0.5769 * sum3[i - 4] - 0.0962 * sum3[i - 6];
sum5[i] = 0.075 * sum4[i] + 0.54 * sum4[i - 1] + 0.54 * sum4[i - 2] + 0.075 * sum4[i - 3];
sum6[i] = sum5[i] - dc[i] * sum5[i];
sum7[i] = 0.0962 * sum6[i] + 0.5769 * sum6[i - 2] - 0.5769 * sum6[i - 4] - 0.0962 * sum6[i - 6];
sum8[i] = 0.075 * sum7[i] + 0.54 * sum7[i - 1] + 0.54 * sum7[i - 2] + 0.075 * sum7[i - 3];
sum9[i] = sum8[i] - dc[i] * sum8[i];
cyc[i] = 0.2 * sum9[i] + 0.8 * cyc[i - 1];
}
return cyc;
}
```
其中,参数`close`表示收盘价序列,`n`表示周期长度,`w`表示趋势平滑系数。该源码中包含了Cyc指标的完整计算过程,可以直接调用该方法进行计算。
33. macd指标源代码是什么?
macd指标源代码如下:
D:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW;
DRAWTEXT(低位金叉,0.16,' 低位金叉'),COLORWHITE;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
34. 委比指标公式源码?
集合竞价量比
量比:=V/REF(MA(V,5),1);
D1:=ISBUYORDER AND DYNAINFO(9)*C/100>=50;{分笔买入单>50万}
D2:=(DYNAINFO(23)-DYNAINFO(22))/CAPITAL*100>=0.4;{内外盘净};
ST:=NOT(NAMELIKE('S') OR NAMELIKE('*S'));
T1:=DYNAINFO(11)/DYNAINFO(4)>=1.03 AND DYNAINFO(11)/DYNAINFO(4)<=1.05 AND ST;
T2:=H/DYNAINFO(3)<=1.075 AND C/DYNAINFO(3)<=1.06 AND C>=DYNAINFO(11) AND C<H;
T3:=FROMOPEN>=10 AND FROMOPEN<=220;{时间控制}
预警:=T1 AND T2 AND T3 AND D1 AND D2;
流通股本:=FINANCE(1)/10000000<=30;
换手率:=COUNT(VOL/CAPITAL*100<3,N)=0;
现价:=DYNAINFO(7);
均价:=DYNAINFO(11)+(DYNAINFO(11)*0.021);
条件:=IF(现价>均价,1,0);
集合竞价选股:量比 AND 预警 AND 流通股本 AND 条件;
35. 委比指标公式源码?
集合竞价量比
量比:=V/REF(MA(V,5),1);
D1:=ISBUYORDER AND DYNAINFO(9)*C/100>=50;{分笔买入单>50万}
D2:=(DYNAINFO(23)-DYNAINFO(22))/CAPITAL*100>=0.4;{内外盘净};
ST:=NOT(NAMELIKE('S') OR NAMELIKE('*S'));
T1:=DYNAINFO(11)/DYNAINFO(4)>=1.03 AND DYNAINFO(11)/DYNAINFO(4)<=1.05 AND ST;
T2:=H/DYNAINFO(3)<=1.075 AND C/DYNAINFO(3)<=1.06 AND C>=DYNAINFO(11) AND C<H;
T3:=FROMOPEN>=10 AND FROMOPEN<=220;{时间控制}
预警:=T1 AND T2 AND T3 AND D1 AND D2;
流通股本:=FINANCE(1)/10000000<=30;
换手率:=COUNT(VOL/CAPITAL*100<3,N)=0;
现价:=DYNAINFO(7);
均价:=DYNAINFO(11)+(DYNAINFO(11)*0.021);
条件:=IF(现价>均价,1,0);
集合竞价选股:量比 AND 预警 AND 流通股本 AND 条件;
36. cyc指标公式源码?
Cyc指标(Cycle Indicator)是一种用于研究股票、期货、外汇等市场的技术指标。它的计算方法比较复杂,涉及到多个参数和数学公式。以下是Cyc指标的计算公式源码,供参考:
```
// 计算Cyc指标
double[] Cyc(double[] close, int n, double w) {
// 初始化变量
double[] cycle = new double[close.Length];
double[] trend = new double[close.Length];
double[] deviation = new double[close.Length];
double[] period = new double[close.Length];
double[] smooth = new double[close.Length];
double[] dc = new double[close.Length];
double[] cyc = new double[close.Length];
double[] sum1 = new double[close.Length];
double[] sum2 = new double[close.Length];
double[] sum3 = new double[close.Length];
double[] sum4 = new double[close.Length];
double[] sum5 = new double[close.Length];
double[] sum6 = new double[close.Length];
double[] sum7 = new double[close.Length];
double[] sum8 = new double[close.Length];
double[] sum9 = new double[close.Length];
// 计算周期
for (int i = n + 1; i < close.Length; i++) {
// 计算价格波动率
double sum = 0;
for (int j = i - n; j <= i; j++) {
sum += Math.Abs(close[j] - close[j - 1]);
}
deviation[i] = sum / n;
// 计算周期
if (deviation[i] != 0) {
period[i] = 0.5 / (deviation[i] / close[i - 1]);
} else {
period[i] = period[i - 1];
}
}
// 计算趋势
for (int i = n + 1; i < close.Length; i++) {
if (i == n + 1) {
trend[i] = 0.5 * (close[i] - close[i - n]);
} else {
trend[i] = (1 - w) * trend[i - 1] + w * 0.5 * (close[i] - close[i - n]);
}
}
// 计算平滑系数
for (int i = n + 1; i < close.Length; i++) {
smooth[i] = 0.15 * period[i] + 0.85 * smooth[i - 1];
}
// 计算DC
for (int i = n + 1; i < close.Length; i++) {
dc[i] = 0.5 * (1 + Math.Cos(2 * Math.PI / smooth[i]));
}
// 计算Cyc
for (int i = n + 1; i < close.Length; i++) {
sum1[i] = 0.0962 * close[i] + 0.5769 * close[i - 2] - 0.5769 * close[i - 4] - 0.0962 * close[i - 6];
sum2[i] = 0.075 * sum1[i] + 0.54 * sum1[i - 1] + 0.54 * sum1[i - 2] + 0.075 * sum1[i - 3];
sum3[i] = sum2[i] - dc[i] * sum2[i];
sum4[i] = 0.0962 * sum3[i] + 0.5769 * sum3[i - 2] - 0.5769 * sum3[i - 4] - 0.0962 * sum3[i - 6];
sum5[i] = 0.075 * sum4[i] + 0.54 * sum4[i - 1] + 0.54 * sum4[i - 2] + 0.075 * sum4[i - 3];
sum6[i] = sum5[i] - dc[i] * sum5[i];
sum7[i] = 0.0962 * sum6[i] + 0.5769 * sum6[i - 2] - 0.5769 * sum6[i - 4] - 0.0962 * sum6[i - 6];
sum8[i] = 0.075 * sum7[i] + 0.54 * sum7[i - 1] + 0.54 * sum7[i - 2] + 0.075 * sum7[i - 3];
sum9[i] = sum8[i] - dc[i] * sum8[i];
cyc[i] = 0.2 * sum9[i] + 0.8 * cyc[i - 1];
}
return cyc;
}
```
其中,参数`close`表示收盘价序列,`n`表示周期长度,`w`表示趋势平滑系数。该源码中包含了Cyc指标的完整计算过程,可以直接调用该方法进行计算。