当前位置:→ 公式网 > 通达信公式 > 正文 ℃ 公式解密、改选股等业务 联系点击查看详情...
以下是简单画线主图(无源码的请下载附件导入)
C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
- 快线:EMA(EMA(EMA(EMA(CLOSE,2),2),2),2),LINETHICK2,COLOR0000FF;
- 慢线:EMA(REF(快线,1),2),LINETHICK2,COLOR00FFFF;
- 总趋势:EMA(EMA(EMA(EMA(EMA(CLOSE,55),2),2),2),2),LINETHICK2,COLORFF00FF;
- HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY:=0;
- AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);
- QY:=BACKSET(AA,HIGHN+1);
- CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);
- DRAWICON(CC,H*1.02,2);
- 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) COLORGREEN,LINETHICK2;
- DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055FF,POINTDOT;
- DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,POINTDOT;
- AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);
- QY1:=BACKSET(AA1,LOWN+1);
- CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);
- DRAWICON(CC1,L*0.98,1);
- DD1:=BARSLAST(CC1);
- DDTS:=IF(CC1,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) COLORRED,LINETHICK2;
- ZGSTAR:=(高点压力+低点支撑)/2;
- ZGEND:=CONST((高点压力+低点支撑)/2);
- STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
- 中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORFF55BB,LINETHICK2;
- DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORMAGENTA,POINTDOT,;
- DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLORCYAN,POINTDOT;
- TYX3:=MA(REF(HHV((C+L+O+H)/4,30),1),3);
- TYX4:=MA((C+L+O+H)/4,13);
- TYX5:=EMA((C+L+O+H)/4,21);
- {空心红}
- STICKLINE(C<TYX5 AND C>O,H,L,0,0),COLORRED;
- STICKLINE(C<TYX5 AND C>O,C,O,3,1),COLORRED;
- {深绿}
- STICKLINE(C<TYX5 AND C<O,H,L,0,0),COLOR007700;
- STICKLINE(C<TYX5 AND C<O,C,O,3,0),COLOR005500;
- STICKLINE(C<TYX5 AND C<O,C,O,2,0),COLOR006600;
- STICKLINE(C<TYX5 AND C<O,C,O,1,0),COLOR007700;
- {蓝}
- STICKLINE(C>TYX5 AND C<O,H,L,0,0),COLORFFDD44;
- STICKLINE(C>TYX5 AND C<O,C,O,3,0 ),COLORFF7700;
- STICKLINE(C>TYX5 AND C<O,C,O,2,0 ),COLORFFAA22;
- STICKLINE(C>TYX5 AND C<O,C,O,1 ,0 ),COLORFFDD44;
- {黄}
- STICKLINE(C>TYX5 AND C>O,H,L,0,0 ),COLOR00EEFF;
- STICKLINE(C>TYX5 AND C>O,C,O,3,0 ),COLOR00AAFF;
- STICKLINE(C>TYX5 AND C>O,C,O,2,0 ),COLOR00CCFF;
- STICKLINE(C>TYX5 AND C>O,C,O,1,0 ),COLOR00EEFF;
- {粉红}
- STICKLINE(C>TYX4 AND C>O,H,L,0,0),COLORFF66AA;
- STICKLINE(C>TYX4 AND C>O,C,O,3,0 ),COLORFF11FF;
- STICKLINE(C>TYX4 AND C>O,C,O,2,0 ),COLORFF44FF;
- STICKLINE(C>TYX4 AND C>O,C,O,1,0 ),COLORFF66FF;
- {亮灰}
- STICKLINE(C>TYX4 AND C<O,H,L,0,0),COLOR999999;
- STICKLINE(C>TYX4 AND C<O,C,O,3,0),COLOR555555;
- STICKLINE(C>TYX4 AND C<O,C,O,2,0),COLOR777777;
- STICKLINE(C>TYX4 AND C<O,C,O,1,0),COLOR999999;
- {深红}
- STICKLINE(C>TYX3 AND C>O,H,L,0,0),COLOR0000DD;
- STICKLINE(C>TYX3 AND C>O,C,O,3,0),COLOR000099;
- STICKLINE(C>TYX3 AND C>O,C,O,2,0),COLOR0000BB;
- STICKLINE(C>TYX3 AND C>O,C,O,1,0),COLOR0000DD;
- MA(CLOSE,3);MA(CLOSE,13);