设为首页加入收藏

微信关注
官方微信号:71712643
加关注获取每日精选资讯
股票入门欢迎您加入
广告服务联系我们网站地图

飞狐股票公式 神偷主图(付通达信)源码

2014-10-16 9:55:57 股票入门 http://rumen.southmoney.com

  南方财富网为您带来飞狐股票公式:神偷主图(付通达信)源码。

神偷主图(付通达信)源码

  C/C++ Code复制内容到剪贴板

  input:N(88,1,1111),N1(888,1,1111);

  a1:=IF((CLOSE 《 800),((AMOUNT / VOL) / 100),((((CLOSE * 2) + HIGH) + LOW) / 4));

  a2:=((HHV(HIGH,15)) + (LLV(LOW,30))) / 2;

  a3:=EMA((MA(a1,5)),10);

  a4:=EMA((MA(a1,15)),10);

  a5:=EMA((MA(a1,13)),21);

  a6:=((a3 + a4) + a5) / 3;

  决策线:EMA((MA(CLOSE,5)),3),colorGreen;

  多空带:((((REF(a6,1)) + a6) + (REF(a6,2))) / 3),linethick0;

  a7:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 1.191;

  a8:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 1.236;

  a9:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 0.809;

  a10:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 0.764;

  a11:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 0.618;

  地线:(a9),linethick1,Coloryellow;

  天线:(a7),linethick1,ColorFF0000;

  支撑线:(a10),linethick2,Color73740F;

  阻力线:(a8),linethick2,Color509046;

  a12:=((EMA((MA(a1,3)),3)) + (WMA(a1,5))) / 2;

  a13:=REF(a12,1);

  a14:=BARSCOUNT(CLOSE);

  a15:=IF((a14 = 1),0,(((a12 - a13) / a13) * 100));

  a16:=REF(CLOSE,1);

  a17:=IF((a14 = 1),0,(((CLOSE - a16) / a16) * 100));

  a18:=IF((a14 = 1),((CLOSE + OPEN) / 2),a13);

  a19:=REF(a12,2);

  a20:=((a12 + a13) + a19) / 3;

  a21:=((ABS((a12 - a20)) + ABS((a13 - a20))) + ABS((a19 - a20))) / 3;

  a22:=IF((a14 《 3),0,((a21 / a12) * 100));

  a23:=IF((((a15 》 0.5) AND ((a22 》 0.215) OR (LOW 》 a18))) AND (CLOSE 》= OPEN)),1,0);

  a24:=IF((((a15 《 (0 - 0.3)) AND ((a22 》 0.2) OR (HIGH 《 a18))) AND ((OPEN 》= CLOSE) OR (a17 《 -1))),1,0);

  B:((COUNT(a23,BARSLAST(a24))) = 1) AND a23,linethick0;

  D:((COUNT(a24,BARSLAST(a23))) = 1) AND a24,linethick0;

  DRAWTEXT(B,(LOW * 0.98),‘㊣’),linethick3,ALIGN1,colorWhite;

  DRAWTEXT(D,(HIGH * 1.035),‘S’),linethick3,ALIGN1,colorGreen;

  STICKLINE(((B 》 0) OR (D 》 0)),a1,(a1 * 0.998),8,0),ColorFF0000;

  a25:=(EMA(CLOSE,12)) - (EMA(CLOSE,26));

  a26:=EMA(a25,9);

  a27:=2 * (a25 - a26);

  a28:=IF((((((((REF(a27,1)) 《 (REF(a27,2))) AND ((REF(a27,2)) 《 (REF(a27,3)))) AND (a27 》 (REF(a27,1)))) AND (a27 》= 0)) AND ((LLV(a27,4)) 》 0)) AND (COUNT((a27 《 0.18),5))),(a27 * 2),0);

  a29:=IF(((COUNT((CROSS(a26,a25)),8)) AND (CROSS(a25,a26))),(a27 * 4),0);

  a30:=(a28 》 0) AND (CLOSE 》= (((REF(a6,1)) + a6) + (REF(a6,2))) / 3);

  DRAWICON(a30,LOW,12),ALIGN1;

  a31:=(((CLOSE / a16) - 1) * 100) 》= 7;

  a32:=HIGH - ((HIGH - LOW) / 3);

  a33:=LOW + ((HIGH - LOW) / 3);

  a34:=(CLOSE 》 0) AND a31;

  a35:=((HIGH - LOW) * 0.618) + LOW;

  a36:=((HIGH - LOW) * 0.382) + LOW;

  STICKLINE(a34,a32,a33,8,0),colorYellow;

  STICKLINE(a34,((HIGH + LOW) / 2),((HIGH + LOW) / 2),8,0);

  STICKLINE(a34,CLOSE,a35,8,0),colorRed;

  STICKLINE(a34,CLOSE,a35,7,0),Color1414FF;

  STICKLINE(a34,CLOSE,a35,6,0),Color2828FF;

  STICKLINE(a34,CLOSE,a35,5,0),Color3D3DFF;

  STICKLINE(a34,CLOSE,a35,4,0),Color5151FF;

  STICKLINE(a34,CLOSE,a35,3,0),Color6565FF;

  STICKLINE(a34,CLOSE,a35,2,0),Color7A7AFF;

  STICKLINE(a34,CLOSE,a35,1,0),Color8E8EFF;

  STICKLINE(a34,a36,OPEN,8,0),colorGreen;

  STICKLINE(a34,a36,OPEN,7,0),Color28FF28;

  STICKLINE(a34,a36,OPEN,6,0),Color3DFF3D;

  STICKLINE(a34,a36,OPEN,5,0),Color51FF51;

  STICKLINE(a34,a36,OPEN,4,0),Color65FF65;

  STICKLINE(a34,a36,OPEN,3,0),Color7AFF7A;

  STICKLINE(a34,a36,OPEN,2,0),Color8EFF8E;

  STICKLINE(a34,a36,OPEN,1,0),ColorA2FFA2;

  a37:=((CLOSE - (EMA(a1,25))) / (EMA(a1,25))) * 100;

  DRAWTEXT(((a37 》 12) AND (CROSS(决策线,CLOSE))),HIGH,‘卖出’);

  a41:=LOW 《 a11;

  DRAWICON(a41,LOW,1);

  DRAWICON((((CROSS(CLOSE,(REF(a9,1)))) AND (a15 《 -3)) OR (((LOW 《 支撑线) AND (CLOSE 》 支撑线)) AND (a15 《 -3.5))),LOW,7),ALIGN1;

  DRAWTEXT((CROSS(CLOSE,(REF(a10,1)))),(LOW * 0.96),‘仓1/2’),colorYellow;

  DRAWTEXT((CROSS(CLOSE,(REF(((((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 0.681),1)))),(LOW * 0.98),‘1/2仓’),Color005EFF;

  DRAWTEXT(a41,HIGH,‘满仓出击’);

  a43:=((SMA((MAX((CLOSE - a16),0)),5,1)) / (SMA(ABS((CLOSE - a16)),5,1))) * 100;

  DRAWTEXT(((CROSS(a43,10)) AND (a15 《 -4)),(LOW * 0.92),‘◢◣’),ALIGN1,colorRed;

  DRAWTEXT((((a15 《 -5) AND (a37 《 -24)) AND (a43 《 12)),(LOW * 0.95),‘▲’),ALIGN1,colorMagenta;

  a44:=LOW 》 (REF(HIGH,1));

  a45:=HIGH 《 (REF(LOW,1));

  DRAWTEXT(a44,((REF(HIGH,1)) * 1.003),‘─’),ALIGN1,colorWhite;

  DRAWTEXT(a44,(LOW * 1.003),‘─’),ALIGN1,colorWhite;

  DRAWTEXT(a45,((REF(LOW,1)) * 1.003),‘─’),ALIGN1,colorGreen;

  DRAWTEXT(a45,(HIGH * 1.003),‘─’),ALIGN1,colorGreen;

  突破:REF(EMA(C,5),1)COLORMAGENTA,LINETHICK2;

  /////////////////////////////////////////////////

  A1X:=(EMA(C,5)-突破)/突破*100;

  出击:PARTLINE(A1X》=0,REF(EMA(C,5),BARSLAST(CROSS(A1X,0))+1)),COLORYELLOW,LINETHICK2;

  休假:PARTLINE(A1X《0,REF(EMA(C,5),BARSLAST(CROSS(0,A1X))+1)),COLORBLUE,LINETHICK3;

  STICKLINE(A1X》=0,REF(EMA(C,5),BARSLAST(CROSS(A1X,0))+1),突破,0.5,-1),COLORRED;

  STICKLINE(A1X《0,REF(EMA(C,5),BARSLAST(CROSS(0,A1X))+1),突破,0,-1),COLORGREEN;

  PARTLINE(A1X《0,突破),COLORGREEN,LINETHICK2;

  //////////////////////////////////////////////////

  VAR0:=EMA(EMA(EMA(CLOSE,2),2),2);

  海岸线:=(HHV(VAR0,13)*0.98),LINETHICK3,colorFF00;

  K1:=EMA(CLOSE,3),colorFF0000;

  K2:=EMA(CLOSE,5),colorFF0000;

  K3:=EMA(CLOSE,8),colorFF0000;

  K4:=EMA(CLOSE,13),colorFF0000;

  K5:=EMA(CLOSE,15),colorFF0000;

  QQ:=(((((MA(K1,1)+MA(K2,3))+MA(K3,5))+MA(K4,7))+MA(K5,9))/5),LINETHICK2,colorFF00FF;

  K6:=EMA(CLOSE,30),colorFFFF;

  暗器24:=IF(CROSS(K6,QQ),海岸线,0);

  DRAWTEXT((暗器24》0),LOW,‘■神偷’),colorFFFF;

  //////////////////////////////////////////////////

  C/C++ Code复制内容到剪贴板

  改为通达信版本

  公式非常好,谢谢。为便于广大通达信使用者,改为通达信。

  INPUT:N(88,1,1111),N1(888,1,1111);

  A1:=IF((CLOSE 《 800),((AMOUNT / VOL) / 100),((((CLOSE * 2) + HIGH) + LOW) / 4));

  A2:=((HHV(HIGH,15)) + (LLV(LOW,30))) / 2;

  A3:=EMA((MA(A1,5)),10);

  A4:=EMA((MA(A1,15)),10);

  A5:=EMA((MA(A1,13)),21);

  A6:=((A3 + A4) + A5) / 3;

  决策线:EMA((MA(CLOSE,5)),3),COLORGREEN;

  多空带:((((REF(A6,1)) + A6) + (REF(A6,2))) / 3),LINETHICK0;

  A7:=(((REF(A6,1)) + A6) + (REF(A6,2))) / 3 * 1.191;

  A8:=(((REF(A6,1)) + A6) + (REF(A6,2))) / 3 * 1.236;

  A9:=(((REF(A6,1)) + A6) + (REF(A6,2))) / 3 * 0.809;

  A10:=(((REF(A6,1)) + A6) + (REF(A6,2))) / 3 * 0.764;

  A11:=(((REF(A6,1)) + A6) + (REF(A6,2))) / 3 * 0.618;

  地线:(A9),LINETHICK1,COLORYELLOW;

  天线:(A7),LINETHICK1,COLORFF0000;

  支撑线:(A10),LINETHICK2,COLOR73740F;

  阻力线:(A8),LINETHICK2,COLOR509046;

  A12:=((EMA((MA(A1,3)),3)) + (EMA(A1,5))) / 2;

  A13:=REF(A12,1);

  A14:=BARSCOUNT(CLOSE);

  A15:=IF((A14 = 1),0,(((A12 - A13) / A13) * 100));

  A16:=REF(CLOSE,1);

  A17:=IF((A14 = 1),0,(((CLOSE - A16) / A16) * 100));

  A18:=IF((A14 = 1),((CLOSE + OPEN) / 2),A13);

  A19:=REF(A12,2);

  A20:=((A12 + A13) + A19) / 3;

  A21:=((ABS((A12 - A20)) + ABS((A13 - A20))) + ABS((A19 - A20))) / 3;

  A22:=IF((A14 《 3),0,((A21 / A12) * 100));

  A23:=IF((((A15 》 0.5) AND ((A22 》 0.215) OR (LOW 》 A18))) AND (CLOSE 》= OPEN)),1,0);

  A24:=IF((((A15 《 (0 - 0.3)) AND ((A22 》 0.2) OR (HIGH 《 A18))) AND ((OPEN 》= CLOSE) OR (A17 《 -1))),1,0);

  B:((COUNT(A23,BARSLAST(A24))) = 1) AND A23,LINETHICK0;

  D:((COUNT(A24,BARSLAST(A23))) = 1) AND A24,LINETHICK0;

  DRAWTEXT(B,(LOW * 0.98),‘㊣’),LINETHICK3,,COLORWHITE;

  DRAWTEXT(D,(HIGH * 1.035),‘S’),LINETHICK3,,COLORGREEN;

  STICKLINE(((B 》 0) OR (D 》 0)),A1,(A1 * 0.998),8,0),COLORFF0000;

  A25:=(EMA(CLOSE,12)) - (EMA(CLOSE,26));

  A26:=EMA(A25,9);

  A27:=2 * (A25 - A26);

  A28:=IF((((((((REF(A27,1)) 《 (REF(A27,2))) AND ((REF(A27,2)) 《 (REF(A27,3)))) AND (A27 》 (REF(A27,1)))) AND (A27 》= 0)) AND ((LLV(A27,4)) 》 0)) AND (COUNT((A27 《 0.18),5))),(A27 * 2),0);

  A29:=IF(((COUNT((CROSS(A26,A25)),8)) AND (CROSS(A25,A26))),(A27 * 4),0);

  A30:=(A28 》 0) AND (CLOSE 》= (((REF(A6,1)) + A6) + (REF(A6,2))) / 3);

  DRAWICON(A30,LOW,12),;

  A31:=(((CLOSE / A16) - 1) * 100) 》= 7;

  A32:=HIGH - ((HIGH - LOW) / 3);

  A33:=LOW + ((HIGH - LOW) / 3);

  A34:=(CLOSE 》 0) AND A31;

  A35:=((HIGH - LOW) * 0.618) + LOW;

  A36:=((HIGH - LOW) * 0.382) + LOW;

  STICKLINE(A34,A32,A33,8,0),COLORYELLOW;

  STICKLINE(A34,((HIGH + LOW) / 2),((HIGH + LOW) / 2),8,0);

  STICKLINE(A34,CLOSE,A35,8,0),COLORRED;

  STICKLINE(A34,CLOSE,A35,7,0),COLOR1414FF;

  STICKLINE(A34,CLOSE,A35,6,0),COLOR2828FF;

  STICKLINE(A34,CLOSE,A35,5,0),COLOR3D3DFF;

  STICKLINE(A34,CLOSE,A35,4,0),COLOR5151FF;

  STICKLINE(A34,CLOSE,A35,3,0),COLOR6565FF;

  STICKLINE(A34,CLOSE,A35,2,0),COLOR7A7AFF;

  STICKLINE(A34,CLOSE,A35,1,0),COLOR8E8EFF;

  STICKLINE(A34,A36,OPEN,8,0),COLORGREEN;

  STICKLINE(A34,A36,OPEN,7,0),COLOR28FF28;

  STICKLINE(A34,A36,OPEN,6,0),COLOR3DFF3D;

  STICKLINE(A34,A36,OPEN,5,0),COLOR51FF51;

  STICKLINE(A34,A36,OPEN,4,0),COLOR65FF65;

  STICKLINE(A34,A36,OPEN,3,0),COLOR7AFF7A;

  STICKLINE(A34,A36,OPEN,2,0),COLOR8EFF8E;

  STICKLINE(A34,A36,OPEN,1,0),COLORA2FFA2;

  A37:=((CLOSE - (EMA(A1,25))) / (EMA(A1,25))) * 100;

  DRAWTEXT(((A37 》 12) AND (CROSS(决策线,CLOSE))),HIGH,‘卖出’);

  A41:=LOW 《 A11;

  DRAWICON(A41,LOW,1);

  DRAWICON((((CROSS(CLOSE,(REF(A9,1)))) AND (A15 《 -3)) OR (((LOW 《 支撑线) AND (CLOSE 》 支撑线)) AND (A15 《 -3.5))),LOW,7),;

  DRAWTEXT((CROSS(CLOSE,(REF(A10,1)))),(LOW * 0.96),‘仓1/2’),COLORYELLOW;

  DRAWTEXT((CROSS(CLOSE,(REF(((((REF(A6,1)) + A6) + (REF(A6,2))) / 3 * 0.681),1)))),(LOW * 0.98),‘1/2仓’),COLOR005EFF;

  DRAWTEXT(A41,HIGH,‘满仓出击’);

  A43:=((SMA((MAX((CLOSE - A16),0)),5,1)) / (SMA(ABS((CLOSE - A16)),5,1))) * 100;

  DRAWTEXT(((CROSS(A43,10)) AND (A15 《 -4)),(LOW * 0.92),‘◢◣’),,COLORRED;

  DRAWTEXT((((A15 《 -5) AND (A37 《 -24)) AND (A43 《 12)),(LOW * 0.95),‘▲’),,COLORMAGENTA;

  A44:=LOW 》 (REF(HIGH,1));

  A45:=HIGH 《 (REF(LOW,1));

  DRAWTEXT(A44,((REF(HIGH,1)) * 1.003),‘─’),,COLORWHITE;

  DRAWTEXT(A44,(LOW * 1.003),‘─’),,COLORWHITE;

  DRAWTEXT(A45,((REF(LOW,1)) * 1.003),‘─’),,COLORGREEN;

  DRAWTEXT(A45,(HIGH * 1.003),‘─’),,COLORGREEN;

  突破:REF(EMA(C,5),1)COLORMAGENTA,LINETHICK2;

  A1X:=(EMA(C,5)-突破)/突破*100;

  出击:IF(A1X》=0,REF(EMA(C,5),BARSLAST(CROSS(A1X,0))+1),DRAWNULL),COLORYELLOW,LINETHICK2;

  休假:IF(A1X《0,REF(EMA(C,5),BARSLAST(CROSS(0,A1X))+1),DRAWNULL),COLORBLUE,LINETHICK3;

  STICKLINE(A1X》=0,REF(EMA(C,5),BARSLAST(CROSS(A1X,0))+1),突破,0.5,-1),COLORRED;

  STICKLINE(A1X《0,REF(EMA(C,5),BARSLAST(CROSS(0,A1X))+1),突破,0,-1),COLORGREEN;

  IF(A1X《0,突破,DRAWNULL),COLORGREEN,LINETHICK2;

  VAR0:=EMA(EMA(EMA(CLOSE,2),2),2);

  海岸线:=(HHV(VAR0,13)*0.98),LINETHICK3,COLORRED;

  K1:=EMA(CLOSE,3),COLORFF0000;

  K2:=EMA(CLOSE,5),COLORFF0000;

  K3:=EMA(CLOSE,8),COLORFF0000;

  K4:=EMA(CLOSE,13),COLORFF0000;

  K5:=EMA(CLOSE,15),COLORFF0000;

  QQ:=(((((MA(K1,1)+MA(K2,3))+MA(K3,5))+MA(K4,7))+MA(K5,9))/5),LINETHICK2,COLORFF00FF;

  K6:=EMA(CLOSE,30),COLORYELLOW;

  暗器24:=IF(CROSS(K6,QQ),海岸线,0);

  DRAWTEXT((暗器24》0),LOW,‘■神偷’),COLORYELLOW

  更多飞狐股票公式,请关注南方财富网。

股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。