通达信买卖主图公式源码、无未来
DRAWGBK(O>C,RGB(360,0,10),RGB(10,0,1),0,'01',0);
DRAWNUMBER(ISLASTBAR ,C,C),COLORMAGENTA;
N8:=STRCAT(CON2STR(YEAR,0),' 年 ');
Y8:=STRCAT(CON2STR(MONTH,0),' 月 ');
R8:=STRCAT(CON2STR(DAY,0),' 日 ');
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
BU:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);
STICKLINE(买线>=卖线,LOW,HIGH,0.0,1),COLORLIRED;
STICKLINE(买线>=卖线,CLOSE,OPEN,3,1),COLORLIRED;
MA5:MA(CLOSE,5),COLORFFFFFF;
MA10:MA(CLOSE,10),COLORYELLOW;
MA20:MA(CLOSE,20),COLORMAGENTA;
MA30:MA(CLOSE,30),COLORGREEN;
MA(C,20),COLORWHITE,LINETHICK2;
IF(MA20>REF(MA20,1),MA20,DRAWNULL),COLORRED,LINETHICK2;
IF(MA20<REF(MA20,1),MA20,DRAWNULL),COLORGREEN,LINETHICK2;
JC:=(REF(C,3)+REF(C,5)+REF(C,7)+REF(C,8)+REF(C,13)+REF(C,21))/6;
参考价:=SMA(JC,5,1),COLORCYAN;
价:=IF(C>=参考价,参考价,参考价*0.98 ), CIRCLEDOT,COLOR0000FF;
STICKLINE(买线<卖线,LOW,HIGH,0.0,1),COLORCYAN;
STICKLINE(买线<卖线,CLOSE,OPEN,3,1),COLORCYAN;
SJ8:=STRCAT(STRCAT(N8,Y8), R8);
DRAWBMP((ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2))
AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)),LOW*0.99,'B');
DRAWBMP((ZIG(3,5)<REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2))
AND (REF(ZIG(3,5),2)>=REF(ZIG(3,5),3)),HIGH*1.03,'S');
DRAWTEXT(CROSS(83,RSI),H*1.04,' 逃顶')COLORYELLOW;
今日保护价:(REF(C,2)+REF(C,1)+O)/3 ,COLORCC3299,NODRAW;
顶点:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,HHV(H, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORRED,DOTLINE;
低点:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORMAGENTA,DOTLINE;
STICKLINE(CCI>=200 AND H>=顶点,O,C,3,0),COLORBLUE;
STICKLINE(CCI<=100 AND L<=低点,O,C,3,0),COLORYELLOW;
DRAWTEXT_FIX(C>0,0.88,0,0,SJ8),COLOR00FFFF;
DRAWTEXT(ISLASTBAR,顶点,'顶点'),COLORRED;
DRAWTEXT(ISLASTBAR,低点,'低点'),COLORMAGENTA;{COLORBLUE;};
超B:=L2_AMO(0,2)/10000.0;
大B:=L2_AMO(1,2)/10000.0;
中B:=L2_AMO(2,2)/10000.0;
小B:=L2_AMO(3,2)/10000.0;
超S:=L2_AMO(0,3)/10000.0;
大S:=L2_AMO(1,3)/10000.0;
中S:=L2_AMO(2,3)/10000.0;
小S:=L2_AMO(3,3)/10000.0;
TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0);
大宗进:=(超B)+(大B),NODRAW;
大宗出:=(超S)+(大S),NODRAW;
非大宗进:=(中B)+(小B),NODRAW;
非大宗出:=(中S)+(小S),NODRAW;
DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出))))),NODRAW;
DRAWRECTREL(0,CONST(950-(ABS(大宗进)*250/DAZHIV))-20,30,950,IF(CONST(大宗进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(32,CONST(950-(ABS(大宗出)*250/DAZHIV))-20,62,950,IF(CONST(大宗出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWRECTREL(92,CONST(950-(ABS(非大宗进)*250/DAZHIV))-20,122,950,IF(CONST(非大宗进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(124,CONST(950-(ABS(非大宗出)*250/DAZHIV))-20,154,950,IF(CONST(非大宗出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.015,1,0,'主力进出'),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.107,1,0,'散户进出'),COLORCYAN;