您好,欢迎访问三七文档
当前位置:首页 > 金融/证券 > 股票报告 > 文华财经海龟交易系统
文华财经海龟交易系统模型源码[文华财经公式]===============================================================A:=REF(HHV(H,20),1);B:=REF(LLV(L,20),1);AA:=REF(HHV(H,10),1);BB:=REF(LLV(L,10),1);CROSS(H,A),BK;//突破20高点开多仓CROSS(AA,H),SP;//跌破10低点平仓CROSS(B,L),SK;//突破20低点开空仓CROSS(BB,L),BP;//上传10高点平仓C:=CLOSE;O:=OPEN;H:=HIGH;L:=LOW;STICKLINE(O=C,C,O,COLORCYAN,0);DRAWLINE(O=C,H,O=C,L,COLORCYAN);STICKLINE(C=O,C,O,COLORRED,1);DRAWLINE(C=O,C,C=O,H,COLORRED);DRAWLINE(C=O,L,C=O,O,COLORRED);LC:=REF(CLOSE,1);TR:=MAX((HIGH-LOW),MAX((HIGH-LC),(LC-LOW)));ATR:=SMA(TR,20,1);AA:=(HHV(HIGH,N1)-(2*ATR));BB:=CROSS(CLOSE,REF(HHV(HIGH,55),1));SSS:=CROSS(MIN(MA(CLOSE,13),AA),CLOSE);BBB:=BARSLAST(BB)-1;SSSB:=BARSLAST(SSS)-1;B1:=((BBB=0)&&(REF(SSSB,1)REF(BBB,1)));B1B:=BARSLAST(B1);B2:=((((BB=1)&&(B1BSSSB))&&(B1B0))&&(COUNT(BB,SSSB)3));B2B:=BARSLAST(B2);B3:=((((BB=1)&&(B2BB1B))&&(COUNT(BB,SSSB)4))&&(COUNT(BB,SSSB)2));B3B:=BARSLAST(B3);SS:=CROSS(MAX(AA,MA(CLOSE,13)),CLOSE);SS1:=(((SS&&((B3BB2B)||(B2BB1B)))&&(SSSBB1B))&&(COUNT(SS,B2B)2));SS1B:=BARSLAST(SS1);SS2:=((((SS&&(SS1BSSSB))&&(B3BB2B))&&(SS1B0))&&(COUNT(SS,B2B)3));SSSS:=(SSS&&(REF(SSSB,1)REF(B1B,1)));DRAWTEXT((B1=1),(LOW-0.25),'买1/2');DRAWTEXT((B2=1),(LOW-0.25),'买2/3');DRAWTEXT((B3=1),(LOW-0.25),'买1/3');DRAWTEXT((SS1=1),(HIGH+0.25),'卖100%');DRAWTEXT((SS2=1),(HIGH+0.25),'卖100%');DRAWTEXT((SSSS=1),(HIGH+0.25),'卖100%');STICKLINE(OPEN=CLOSE,CLOSE,OPEN,COLORCYAN,0);DRAWLINE(OPEN=CLOSE,HIGH,OPEN=CLOSE,LOW,COLORCYAN);STICKLINE(CLOSE=OPEN,CLOSE,OPEN,COLORRED,1);DRAWLINE(CLOSE=OPEN,CLOSE,CLOSE=OPEN,HIGH,COLORRED);DRAWLINE(CLOSE=OPEN,LOW,CLOSE=OPEN,OPEN,COLORRED);LC:=REF(CLOSE,1);TR:=MAX((HIGH-LOW),MAX((HIGH-LC),(LC-LOW)));ATR:=SMA(TR,20,1);AA:=(HHV(HIGH,N1)-(2*ATR));BB:=CROSS(CLOSE,REF(HHV(HIGH,55),1));SSS:=CROSS(MIN(MA(CLOSE,13),AA),CLOSE);BBB:=BARSLAST(BB)-1;SSSB:=BARSLAST(SSS)-1;B1:=((BBB=0)&&(REF(SSSB,1)REF(BBB,1)));B1B:=BARSLAST(B1);B2:=((((BB=1)&&(B1BSSSB))&&(B1B0))&&(COUNT(BB,SSSB)3));B2B:=BARSLAST(B2);B3:=((((BB=1)&&(B2BB1B))&&(COUNT(BB,SSSB)4))&&(COUNT(BB,SSSB)2));B3B:=BARSLAST(B3);SS:=CROSS(MAX(AA,MA(CLOSE,13)),CLOSE);SS1:=(((SS&&((B3BB2B)||(B2BB1B)))&&(SSSBB1B))&&(COUNT(SS,B2B)2));SS1B:=BARSLAST(SS1);SS2:=((((SS&&(SS1BSSSB))&&(B3BB2B))&&(SS1B0))&&(COUNT(SS,B2B)3));SSSS:=(SSS&&(REF(SSSB,1)REF(B1B,1)));DRAWTEXT((B1=1),(LOW-0.25),'买1/2');DRAWTEXT((B2=1),(LOW-0.25),'买2/3');DRAWTEXT((B3=1),(LOW-0.25),'买1/3');DRAWTEXT((SS1=1),(HIGH+0.25),'卖100%');DRAWTEXT((SS2=1),(HIGH+0.25),'卖100%');DRAWTEXT((SSSS=1),(HIGH+0.25),'卖100%');捕捉强势C:=CLOSE;L:=LOW;H:=HIGH;O:=OPEN;JJJ:1.0;ZJ:=(C+C+L+H)/4;ZJ5:=MA(ZJ,5);VAR1:=ZJ5/MA(C,20);VARAAA:ZJ5/MA(C,20);VAR2:=ZJ5/MA(C,50);A:=MA(C,5)REF(MA(C,5),1);B:=MA(C,10)=REF(MA(C,10),1);XIANFENG:IF(VAR11.02,1.03,VAR1),COLORYELLOW;STICKLINE(XIANFENG1.019&&A,XIANFENG,XIANFENG-0.004,COLORGREEN,0);HOUYUAN:IF(VAR21,1,VAR2),COLORCYAN;STICKLINE(HOUYUAN=1&&B,1,0.995,COLORRED,0);VAR3:=REF(MA(ZJ,5),1);A1:=SMA(MAX(C-VAR3,0),9,1)/SMA(ABS(C-VAR3),9,1)*100;B1:=100*(HHV(H,14)-C)/(HHV(H,14)-LLV(L,14));STICKLINE(B15,0.925,0.935,COLORRED,0);STICKLINE(B195,0.910,0.92,COLORGREEN,0);STICKLINE(A1B1&&A1REF(A1,1),0.925,0.92,COLORMAGENTA,0);STICKLINE(A1B1&&A1REF(A1,1),0.925,0.92,COLORLIGHTGREEN,0);DRAWTEXT(VAR1=REF(VAR1,1)&&VAR2=REF(VAR2,1)&&BARSLAST(A1B1&&A1REF(A1,1)&&CREF(C,1))=2,0.96,'-等回踩');RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;{==========}K:=SMA(RSV,3,1);XX:=VAR1REF(VAR1,1)&&KREF(K,1)&&VAR2REF(VAR2,1)&&A1B1&&A1REF(A1,1)&&BARSLAST(A1B1&&A1REF(A1,1))2&&(C+O)/(REF(C,1)+REF(O,1))1.024;IF(XX,0.95,0.92),COLORRED;DRAWLINE(XX,1.02,XX,0.90,COLORRED);DRAWTEXT(A1-B10,1.05,'');KS13:=(C-SMA(C,13,1))/SMA(C,13,1)*(-100);AAA:=REF(KS13,1)-13&&REF(KS13,1)/KS131.12&&(C-O)+(REF(C,1)-REF(O,1))/REF(C,1)1.03&&(C-O)/ABS(REF(C,1)-REF(O,1))1.0&&(H-C)/(O-L)1;CHAODI:=IF(AAA&&REF(C,1)MA(CLOSE,5),0.95,1),COLORWHITE;DRAWTEXT(CHAODI=0.95,0.935,'←抄底');DUO:=EMA(MA(CLOSE,1)*70,2);KONG:=EMA((MA(C*1.1,1)-MA(C*0.9,1))*70,2);DRAWTEXT(DUOKONG&&HOUYUAN=1&&B,1.05,'=');BUZHUO:IF(DUOKONG&&CO&&HOUYUAN=1&&B&&COUNT(DUOKONG&&HOUYUAN=1&&B,5)=1,1.03,1),COLORRED;DRAWTEXT(BUZHUO=1.03,1.001,'←突破或追涨');VAR6:=MA(ZJ,27);VAR7:=(ZJ-VAR6)/VAR6;E:=MA(VAR7,2);F:=BARSLAST(CROSS(-0.1,E)=1);G:=E-0.1&&F3;FILLRGN(G,0.99,1,COLORYELLOW);DRAWTEXT(G&&BARSLAST(G)2,0.98,'底');FILLRGN(VAR20.82,0.98,1,COLORGREEN);FILLRGN(VAR20.8,0.97,1,COLORWHITE);BIAS1:=(C-MA(C,6))/MA(C,6)*100;BIAS2:=(C-MA(C,12))/MA(C,12)*100;BIAS3:=(C-MA(C,24))/MA(C,24)*100;BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;GUAILI:=MA(BIAS,3);FILLRGN(GUAILI-6&&GUAILI=-12,0.9985,1,COLORYELLOW);FILLRGN(GUAILI-12&&GUAILI=-18,0.995,1,COLORGREEN);FILLRGN(GUAILI-18,0.975,1,COLORWHITE);C:=CLOSE;O:=OPEN;H:=HIGH;L:=LOW;STICKLINE(O=C,C,O,COLORCYAN,0);DRAWLINE(O=C,H,O=C,L,COLORCYAN);STICKLINE(C=O,C,O,COLORRED,1);DRAWLINE(C=O,C,C=O,H,COLORRED);DRAWLINE(C=O,L,C=O,O,COLORRED);LC:=REF(CLOSE,1);TR:=MAX((HIGH-LOW),MAX((HIGH-LC),(LC-LOW)));ATR:=SMA(TR,20,1);AA:=(HHV(HIGH,N1)-(2*ATR));BB:=CROSS(CLOSE,REF(HHV(HIGH,55),1));SSS:=CROSS(MIN(MA(CLOSE
本文标题:文华财经海龟交易系统
链接地址:https://www.777doc.com/doc-5241205 .html