通达信回归线主图公式源码分享

【更新时间:2020-08-27 11:02:00】

u=1618505531,300096836&fm=26&gp=0.jpg

  VAR1:=EMA(CLOSE,2);

  VAR2:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);

  DRAWKLINE(HIGH,OPEN,LOW,CLOSE);

  K:=1;

  YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;

  AAAX:=(3*C+H+L+O)/6;

  AA:=IF(K=0,(8*AAAX+7*REF(AAAX,1)+6*REF(AAAX,2)+5*REF(AAAX,3)

  +4*REF(AAAX,4)+3*REF(AAAX,5)+2*REF(AAAX,6)+REF(AAAX,8))/36,DRAWNULL),COLOR0000FF;

  DD:=(20*YTSL+19*REF(YTSL,1)+18*REF(YTSL,2)+17*REF(YTSL,3)

  +16*REF(YTSL,4)+15*REF(YTSL,5)+14*REF(YTSL,6)+13*REF(YTSL,7)

  +12*REF(YTSL,8)+11*REF(YTSL,9)+10*REF(YTSL,10)+9*REF(YTSL,11)

  +8*REF(YTSL,12)+7*REF(YTSL,13)+6*REF(YTSL,14)+5*REF(YTSL,15)

  +4*REF(YTSL,16)+3*REF(YTSL,17)+2*REF(YTSL,18)+REF(YTSL,20))/211;

  A:=MA(MA(CLOSE,3),1);

  轨道:MA(MA(CLOSE,3),3),colorwhite,LINETHICK2;

  NOTEXT_升:IF(A>=轨道,轨道,DRAWNULL),colormagenta,LINETHICK2;

  牛线:EMA(CLOSE,26),colorlired,LINETHICK2;

  D1:=CLOSE/REF(CLOSE,1)>1.045 AND HIGH/CLOSE<1.01 AND CLOSE>REF(CLOSE,1);

  D2:=CLOSE>MA(CLOSE,10) AND REF(CLOSE,1)1.03 AND VOL/CAPITAL>0.03 AND CLOSE/REF

  (CLOSE,1)>1.035 AND HIGH/CLOSE<1.01;

  D3:=CLOSE/REF(CLOSE,1)>1.038 AND CLOSE=HIGH AND BETWEEN(FORCAST(VOL,4),0.2*FORCAST(VOL,12),2.1*FORCAST(VOL,12));

  D4:=FILTER(D3,28)*100 AND LOW>REF(CLOSE,1)*0.93;

  D5:=CROSS(0.9,1/VOL*1000>0 AND KDJ.J<0) OR CROSS(0.9,1/VOL*1000>0.01 AND KDJ.J<0);

  D6:=REF(CLOSE,1);

  D7:=SMA(MAX(CLOSE-D6,0),7,1)/SMA(ABS(CLOSE-D6),7,1)*100;

  D8:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),7);

  D9:=HIGH-REF(HIGH,1);

  D10:=REF(LOW,1)-LOW;

  D11:=SUM(IF(D9>0 AND D9>D10,D9,0),7);

  D12:=SUM(IF(D10>0 AND D10>D9,D10,0),7);

  D13:=D11*100/D8;

  D14:=D12*100/D8;

  D15:=MA(ABS(D14-D13)/(D14+D13)*100,5);

  D16:=100*(HHV(HIGH,7)-CLOSE)/(HHV(HIGH,7)-LLV(LOW,7));

  D17:=0.1*(D16*2+D15-D7);

  D18:=MA(D17,5);

  D19:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;

  D20:=COUNT(D5,40)>=1 AND (COUNT(D17>10 AND D19<(-10),30)>=1 AND D19>0 AND D19<10);

  XG:=D1 AND (D20 OR REF(D20,1) OR REF(D20,2)) AND (D1 OR D4 OR D2) AND COUNT(REF(CLOSE/REF(CLOSE,1)>=1.095,1),5)<1;

  DRAWICON(XG,L,29);

  STICKLINE(XG,L,L+(H-L)/2,2.7,0),coloryellow;

  STICKLINE(XG,L+(H-L)/2,H,2.7,0),colormagenta;