通达信日周月k线源码、主图指标人公式
日周月同图
{www.9m8.cn}月}
MC:=C#MONTH,NODRAW;
MH:=H#MONTH,NODRAW;
ML:=L#MONTH,NODRAW;
MO1:=IF(DAY REF(DAY,1),O,DRAWNULL);
MO:=HHV(MO1,DAY),NODRAW;
STICKLINE(MC =MO,MH,ML,4,-1)COLOR00009C;
STICKLINE(MC =MO,MH,ML,4,-1),COLOR4F2F4F;
K1:XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,LINETHICK2,COLORRED;
K2:EMA(K1,25),LINETHICK2;
DRAWBAND(K1,RGB(80,0,0),K2,RGB(0,91,0));
{www.9m8.cn}周}
周O1:=IF(WEEKDAY REF(WEEKDAY,1),O,DRAWNULL);
周开:HHV(周O1,WEEKDAY)COLORRED,NODRAW;
周高:HHV(H,WEEKDAY)COLORYELLOW,NODRAW;
周低:LLV(L,WEEKDAY)COLOR32CD32,NODRAW;
周收:C#WEEK, COLORFF6EC7,NODRAW;
STICKLINE(周收 =周开,周收,周高,4,0)COLOR600060;
STICKLINE(周收 =周开,周低,周收,4,0)COLOR000066;
STICKLINE(周收 周开,周收,周高,4,0),COLOR9F3333;
STICKLINE(周收 周开,周开,周低,4,0),COLOR9F3333;
{www.9m8.cn}日}
AQ:=O#WEEK;
B:=C#WEEK;
AAQ:=H#WEEK;
BB:=L#WEEK;
IF(AAQ AAQ+1,AAQ,DRAWNULL),LINETHICK1,COLORLIGRAY,DOTLINE;
IF(BB BB+1,BB,DRAWNULL),LINETHICK1,COLORLIGRAY,DOTLINE;
STICKLINE(WEEKDAY=1,AAQ,BB,0,0),COLORGRAY;
STICKLINE(WEEKDAY=6-1,AAQ,BB,0,0),COLORGRAY;
中位线1:(AAQ+BB)/2,LINETHICK1,COLORGRAY;
(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),DOTLINE,COLORGREEN;
DRAWKLINE(H,O,L,C);
STICKLINE(C O,H,L,0,0),COLORFF9900;
STICKLINE(C O,O,C,3,1),COLORFF9900;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA40:=MA(C,40);
MA60:=MA(C,60);
MA120:=MA(C,120);
STICKLINE(MA5 =MA60 AND MA60 =MA10,MA10,MA60,1,-1),COLORBLUE;
STICKLINE(MA5 =MA10 AND MA5 =MA60,MA10,MA5,1,-1),COLORBLUE;
STICKLINE(MA20 =MA60 AND MA60 =MA40,MA40,MA60,1,-1),COLORFF00FF;
STICKLINE(MA20 =MA40 AND MA20 MA60,MA40,MA20,1,-1),COLORFF00FF;
STICKLINE(MA5 =MA20 AND MA20 =MA10,MA10,MA20,1,-1),COLORYELLOW;
STICKLINE(MA5 =MA10 AND MA5 MA20,MA10,MA5,1,-1),COLORYELLOW;