通达信主图支撑压力源码(需10档数据)
涨家数:INDEXADV,NODRAW, ;
跌家数:INDEXDEC,NODRAW,COLORGREEN;
均价:=(C+H+L+O)/4;
R:(2*L+均价)/3;
MA9:WMA(SUM(R*V,2)/SUM(V,2),9),,LINETHICK1,COLORWHITE;
MA26:WMA(SUM(R*V,2)/SUM(V,2),26),,LINETHICK1,COLOR666666;
指导线:EMA((EMA(CLOSE,4)+EMA(CLOSE,6)+EMA(CLOSE,12)+EMA(CLOSE,24))/4,2),,LINETHICK1,COLORBLUE;
DRAWTEXT_FIX(1,0,0.22,0,'总股本(亿股):'),COLORMAGENTA;
DRAWNUMBER_FIX(1,0.15,0.22,0,CONST(FINANCE(1)/100000000)),COLORMAGENTA;
DRAWTEXT_FIX(1,0,0.33,0,'流通盘(亿股):'),COLOR0080FF;
DRAWNUMBER_FIX(1,0.15,0.33,0,CONST(CAPITAL/1000000)),COLOR0080FF;
DRAWTEXT_FIX(1,0,0.275,0,'上市日期:'),COLOR00FF00;
DRAWNUMBER_FIX(ISLASTBAR,0.1,0.275,0,FINANCE(42)),COLOR00FF00;
DRAWTEXT_FIX(1,0.03,0.13,0,EXTERNSTR(0,1)),COLORRED;
DRAWTEXT_FIX(1,0.26,0.01,0,EXTERNSTR(0,2)),COLORDD00DD;
DRAWTEXT_FIX(1,0.02,0.066,0,EXTERNSTR(0,3)),COLOR00DD00;
DRAWTEXT_FIX(1,0,0.01,0,DYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(1,0,0.07,0,HYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(1,0.10,0.07,0,'未分配利润:')LINETHICK5,COLOR0080FF;
DRAWNUMBER_FIX(1,0.23,0.07,0,CONST(FINANCE(31)/FINANCE(1)))LINETHICK5,COLOR0080FF;
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;
E:=(HIGH+LOW+OPEN+2*CLOSE)/5;
明日阻力:=2*E-LOW,NODRAW;
明日支撑:=2*E-HIGH;
明日突破:=E+(HIGH-LOW);
明日反转:=E-(HIGH-LOW);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);
DRAWTEXT_FIX(ISLASTBAR,0.6,0.1,0,'明日阻力'),COLORLIRED;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.1,0,明日阻力),COLOR0080FF;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.15,0,'明日支撑'),COLORLIRED;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.15,0,明日支撑),COLOR0080FF;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.2,0,'明日突破'),COLORRED;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.2,0,明日突破),COLOR0080FF;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.25,0,'明日反转'),COLORRED;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.25,0,明日反转),COLOR0080FF;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.3,0,'今日阻力'),COLORLIRED;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.3,0,今日阻力),COLOR0080FF;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.35,0,'今日支撑'),COLORLIRED;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.35,0,今日支撑),COLOR0080FF;