把这个通达信的趋势线源码改为飞狐_解版

MACD绿柱转红柱时的选股公式

MACD绿柱转红柱时的选股公式

【股票资源馆】策略投资破解,图片免费下载,理想股票技术论坛,财经股票论坛,炒股论坛社区,股票软件,股票公式,源码交流,指标公式,炒股书籍,分析家公式网,股旁网,股票配资。

编写条件:

n1:=20; AA1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,1)+1); AA2:=AA1>REF(AA1,1); BB1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,2)+1); BB2:=BB1>REF(BB1,1); CC1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,3)+1); CC2:=CC1>REF(CC1,1); AA11:=BACKSET(ISLASTBAR,TROUGHBARS(2,N,1)+1); AA21:=AA11>REF(AA11,1); BB11:=BACKSET(ISLASTBAR,TROUGHBARS(2,N,2)+1); BB21:=BB11>REF(BB11,1); CC11:=BACKSET(ISLASTBAR,TROUGHBARS(2,N,3)+1); CC21:=CC11>REF(CC11,1); ①:DRAWLINE(BB2,H,AA2,H,1),COLORBLUE; ②:DRAWLINE(CC2,H,BB2,H,1),COLORCC6633; ③:IF(AA1,PEAK(1,N,1),DRAWNULL),COLORFFAA00; ④:DRAWLINE(CC2,H,AA2,H,1),COLORLIBLUE; ⑤:DRAWLINE(BB21,L,AA21,L,1),COLORYELLOW; ⑥:DRAWLINE(CC21,L,BB21,L,1),COLORFF00FF; ⑦:DRAWLINE(CC21,L,AA21,L,1),COLORBROWN; ⑧:IF(AA11,TROUGH(2,N,1),DRAWNULL),COLORRED; {N1:20;N2:10;N3:5} AA:=REF(H,N1)=HHV(H,2*N1+1); QY:=BACKSET(AA,N1+1); CC:=FILTER(QY,N1) AND H=HHV(H,N1+1); DDD:=BARSLAST(CC); GDTS:=IF(CC,CURRBARSCOUNT,0); DINGBU:=IF(DDD,REF(H,DDD),H);{顶部} DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS); DINGBU1:=REF(DINGBU,DDD+1); GDCS1:=CONST(DINGBUTS); DINGBUTS1:=REF(DINGBUTS,DDD+1); GDCS2:=CONST(DINGBUTS1); DINGBU2:=REF(DINGBU1,DDD+1); MM:=IF(CURRBARSCOUNT>GDCS2,0,1); 高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORLIBLUE; DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055FF,POINTDOT,LINETHICK2; DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,POINTDOT,LINETHICK2; AAA1:=REF(L,N1)=LLV(L,2*N1+1); QY1:=BACKSET(AAA1,N1+1); CCC1:=FILTER(QY1,N1) AND L=LLV(L,N1+1); DD1:=BARSLAST(CCC1); DDTS:=IF(CCC1,CURRBARSCOUNT,0); YDB:=IF(DD1,REF(L,DD1),L); DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS); DDCS1:=CONST(DDTS1); ZDB:=REF(YDB,DD1+1); DDTS2:=REF(DDTS1,DD1+1); DDCS2:=CONST(DDTS2); 低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORMAGENTA; DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLOR0055FF,POINTDOT,LINETHICK2; DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORYELLOW,POINTDOT,LINETHICK2;

编写方法:

 n:=5;

n1:=20;
AA1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,1)+1);
AA2:=AA1>REF(AA1,1);
BB1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,2)+1);
BB2:=BB1>REF(BB1,1);
CC1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,3)+1);
CC2:=CC1>REF(CC1,1);
 
AA11:=BACKSET(ISLASTBAR,TROUGHBARS(2,N,1)+1);
AA21:=AA11>REF(AA11,1);
BB11:=BACKSET(ISLASTBAR,TROUGHBARS(2,N,2)+1);
BB21:=BB11>REF(BB11,1);
CC11:=BACKSET(ISLASTBAR,TROUGHBARS(2,N,3)+1);
CC21:=CC11>REF(CC11,1);
①:DRAWLINE(BB2,H,AA2,H,1),COLORBLUE;
②:DRAWLINE(CC2,H,BB2,H,1),COLORCC6633;
③:PARTLINE(ref(AA1,1),PEAK(1,N,1)),COLORFFAA00;
④:DRAWLINE(CC2,H,AA2,H,1),COLORC0C000;
⑤:DRAWLINE(BB21,L,AA21,L,1),COLORYELLOW;
⑥:DRAWLINE(CC21,L,BB21,L,1),COLORFF00FF;
⑦:DRAWLINE(CC21,L,AA21,L,1),COLORBROWN;
⑧:PARTLINE(REF(AA11,1),TROUGH(2,N,1)),COLORRED;
 
AA:=REF(H,N1)=HHV(H,2*N1+1);
QY:=BACKSET(AA,N1+1);
CC:=FILTER(QY,N1) AND H=HHV(H,N1+1);
 
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DINGBU1:=REF(DINGBU,DDD+1);
GDCS1:=DINGBUTS[DATACOUNT];
DINGBUTS1:=REF(DINGBUTS,DDD+1);
GDCS2:=DINGBUTS1[DATACOUNT];
DINGBU2:=REF(DINGBU1,DDD+1);
MM:=IF(CURRBARSCOUNT>GDCS2,0,1);
高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1),COLORC0C000;
DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055FF,POINTDOT;
DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,POINTDOT;
AAA1:=REF(L,N1)=LLV(L,2*N1+1);
QY1:=BACKSET(AAA1,N1+1);
CCC1:=FILTER(QY1,N1) AND L=LLV(L,N1+1);
 
DD1:=BARSLAST(CCC1);
DDTS:=IF(CCC1,CURRBARSCOUNT,0);
YDB:=IF(DD1,REF(L,DD1),L);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=DDTS1[DATACOUNT];
ZDB:=REF(YDB,DD1+1);
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=DDTS2[DATACOUNT];
低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORMAGENTA;
DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLOR0055FF,POINTDOT;
DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORYELLOW,POINTDOT;

{股票资源馆:www.lixiangluntan.com专业和谐高端炒股软件--公式编写交流--加QQ751161480--}炒股软件

把当天出现钱袋子的 -做出预警

把当天出现钱袋子的 -做出预警

大智慧策略终端/职业股民首选分析软件:支持ACE数据,支持L2行情全推数据,支持股票池,超赢数据,价格低廉,支持月季费年费。:

下载地址:https://share.weiyun.com/LPoU0GHu