以下是通达信海龟交易主图指标公式源码和使用说明

通达信海龟交易主图指标公式源码:

   EMA(EMA(C,38),13),COLORFF00FF,LINETHICK2;

   成本线:EMA(EMA(C,37),13),COLORFF00FF,LINETHICK2;

   底部线:成本线/1.268,LINETHICK2,COLORYELLOW;

   黑码线:成本线*1.112,LINETHICK2,COLORBLUE;

   AA1:=AMOUNT/V;

   BB1:=L1.2;

   DD1:=L<MA(C,5)*0.921;

   EE1:=V<MA(V,5)*1.5;

   FF1:=BB1ANDCC1ANDDD1ANDEE1;

   DRAWTEXT(FF1,(LOW*0.97),’老鼠仓’),COLOR4080FF;

   UPQK:=LOW-REF(HIGH,1);

   STICKLINE(CLOSE>REF(CLOSE,1)ANDUPQK>0,REF(HIGH,1),LOW,15,1),COLORYELLOW;

   DOWNQK:=REF(LOW,1)-HIGH;

   STICKLINE(CLOSE<REF(CLOSE,1)ANDDOWNQK>0,REF(LOW,1),HIGH,15,1),COLORGREEN;

   MA10:MA(CLOSE,170),COLOR0000FF;

   MA20:MA(CLOSE,350),COLORFF0080;

   DRAWKLINE(H,O,L,C);

   N:=20;T:=20;

   M1:=MA(C,N);

   HPB:=REF(HHV(H,N),1);

   LPB:=REF(LLV(L,T),1);

   {多头交易}

   BUYIN:=H>HPB;

   BUYEXIT:=L<LPB;

   SINGAL:=IF(BUYIN,1,IF(BUYEXIT,-1,0));

   CURrsiGN:=REF(SINGAL,BArslAST(SINGAL));

   UPTREND:=CURRSIGN=1;

   DWTREND:=CURRSIGN=-1;

   {跟踪止损}

   空平:=IF(DWTREND,HPB,M1),LINETHICK2;

   多止:=IF(UPTREND,LPB,M1),LINETHICK2;

   信号持续:=IF(DWTREND,BARSLAST(UPTREND),BARSLAST(DWTREND)),LINETHICK0;

   DRAWICON(BARSLAST(DWTREND)=1,多止,4);

   DRAWICON(BARSLAST(UPTREND)=1,空平,5);

   {DRAWGBKLAST(CLOSE>0,STRIP(RGB(95,95,95),RGB(0,0,0),0))}

   VAR1:=AMOUNT/vol/100;

   指导:EMA((EMA(CLOSE,4)+EMA(CLOSE,6)+EMA(CLOSE,12)+EMA

   (CLOSE,24))/4,2),COLORWHITE;

   界:MA(CLOSE,27),COLORYELLOW;

   红轨道:MA(MA(CLOSE,3),1),LINETHICK1,COLOR0000FF;

   绿轨道:MA(MA(CLOSE,3),3),LINETHICK1,COLOR00FF00;

   {波动}

   TRTR:=MAX(MAX((HIGH-LOW),Abs(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));

   ATR:=MA(TR,10);

   STICKLINE((TR>ATR*1.5)AND(C<O),O,C,4,0),COLOR00FF00;

   STICKLINE((TR>ATR*1.5)AND(C>O),O,C,4,0),COLORMAGENTA;

   N:=1131204;

   TJ0:=DATE=N;

   TJ0T:=BARSLAST(TJ0);

   SJ:=MOD(TJ0T,4);

   SJT:=BARSLAST(SJ);

   TJ0A:=IF(SJT=1,DATE,0);

   TJ01:=DATETODAY(N);

   TJ02:=DATETODAY(TJ0A)-TJ01;

   A1:=BARSCOUNT(C);

   A2:=CONST(REF(N,A1));

   A3:=DATETODAY(A2);

   A4:=DATETODAY(DATE);

   TJT:=BARSLAST(DATE=N);

   A2T:=BACKSET(DATE=N,BARSCOUNT(C));

   ZL:=A3-A4;

   ZT:=A2T*BARSCOUNT(C)-1;

   ZTT:=CONST(REF(A1,TJT))-A1-CONST(ZT)-1;

   TJA:=MOD(ZTT,4);

   TJAT:=BARSLAST(TJA);

   DRAWNUMBER(SJT=1,L,TJ02)COLORYELLOW;

   DRAWNUMBER(SJT=1,H*1.02,TJ0T);

   DRAWNUMBER(ZTT>0ANDTJAT=1,H*1.02,ZTT);

   DRAWNUMBER(ZTT>0ANDTJAT=1,L,ZL)COLORYELLOW;

通达信海龟交易主图指标公式截图

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。