以下是通达信两仪四象源码副图
两仪四象源码
VAR1:=(3*CLOSE+LOW+OPEN+HIGH)/6;
太阳线:(20*VAR1+19*REF(VAR1,1)+18*REF(VAR1,2)+17*REF(VAR1,3)+16*REF(VAR1,4)+15*REF(VAR1,5)+14*REF(VAR1,6)+13*REF(VAR1,7)+12*REF(VAR1,8)+11*REF(VAR1,9)+10*REF(VAR1,10)+9*REF(VAR1,11)+8*REF(VAR1,12)+7*REF(VAR1,13)+6*REF(VAR1,14)+5*REF(VAR1,15)+4*REF(VAR1,16)+3*REF(VAR1,17)+2*REF(VAR1,18)+REF(VAR1,20))/210,LINETHICK2;
太阴线:MA(太阳线,10),LINETHICK2;
乾坤线:MA(太阳线,50),COLORCYAN,LINETHICK2;
IF(CLOSE>乾坤线,乾坤线,DRAWNULL),COLORMAGENTA,LINETHICK2;
DRAWBAND(太阳线,RGB(200,0,0),太阴线,RGB(0,0,200));
VAR2:=MAX(HHV(CLOSE,N)-LLV(CLOSE,N),ABS(CLOSE-REF(CLOSE,N)))/SUM(ABS(CLOSE-REF(CLOSE,1)),N);
VAR3:=EMA(VAR2,N);
VAR4:=INTPART(N-(VAR3-0.5)*N);
VAR5:=SUM((CLOSE-REF(CLOSE,1))*VOL,VAR4);
VAR6:=EMA(VAR5,N);
STICKLINE(VAR6>0 AND CLOSE<=OPEN,CLOSE,OPEN,3,0),COLORRED;
STICKLINE(VAR6>0 AND CLOSE<=OPEN,OPEN,HIGH,0,1),COLORRED;
STICKLINE(VAR6>0 AND CLOSE<=OPEN,CLOSE,LOW,0,1),COLORRED;
STICKLINE(VAR6>0 AND CLOSE>=OPEN,CLOSE,OPEN,3,1),COLORRED;
STICKLINE(VAR6>0 AND CLOSE>=OPEN,CLOSE,HIGH,0,1),COLORRED;
STICKLINE(VAR6>0 AND CLOSE>=OPEN,OPEN,LOW,0,1),COLORRED;
STICKLINE(VAR6<0 AND CLOSE<=OPEN,CLOSE,OPEN,3,0),COLORGREEN;
STICKLINE(VAR6<0 AND CLOSE<=OPEN,OPEN,HIGH,0,1),COLORGREEN;
STICKLINE(VAR6<0 AND CLOSE<=OPEN,CLOSE,LOW,0,1),COLORGREEN;
STICKLINE(VAR6<0 AND CLOSE>=OPEN,CLOSE,OPEN,3,1),COLORGREEN;
STICKLINE(VAR6<0 AND CLOSE>=OPEN,CLOSE,HIGH,0,1),COLORGREEN;
STICKLINE(VAR6<0 AND CLOSE>=OPEN,OPEN,LOW,0,1),COLORGREEN;
DRAWICON(CROSS(VAR6,0),LOW,7);
DRAWICON(CROSS(0,VAR6),HIGH,8);
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.3,0.03,0,9),COLORYELLOW;
评论(0)