以下是通达信日K线AND小时K线同图指标
通达信日K线AND小时K线同图指标
表现形式是在60分钟的K线图上显示日K区间,主图同图
体现形式需建立引用指标
第一步: 建立文件名 ZKYY (指标属性保存副图指标);
{保存文件名:ZKYY}
{保存为副图指标}
JH:H;
JL:L;
JC:C;
JO:O;
QH:REF(H,1);
QL:REF(L,1);
QC:REF(C,1);
JV:VOL;
第二步: 建立主图显示指标
{保存文件名:日K小时K指标名称随意取。。。}
{保存为主图指标}
A1:=DAY!=REF(DAY,1),LINETHICK0;
A2:=BARSLAST(A1)+1,LINETHICK0;
WO1:=IF(A1,O,DRAWNULL),LINETHICK0;
WO2:=IF(WO1=DRAWNULL,REF(WO1,1), WO1),LINETHICK0;
WO3:=IF(WO2=DRAWNULL,REF(WO2,1), WO2),LINETHICK0;
R60:=IF(WO3=DRAWNULL,REF(WO3,1),WO3);
日开:IF(PERIOD=4,R60,DRAWNULL),LINETHICK0;
日收:"ZKYY.JC#DAY",LINETHICK0;
日高:HHV(H,A2),LINETHICK0;
日低:LLV(L,A2),LINETHICK0;
STICKLINE(日收>=日开,日收,日开,4,0),COLOR993300;
STICKLINE(日收<日开,日收,日开,4,0),COLOR00AA00;
DRAWKLINE(H,O,L,C);
炒概念:=STRCAT('看看',STRCAT(STRCAT('题材:',GNBLOCK),FGBLOCK));
DRAWTEXT_FIX(ISLASTBAR,0.002,0.96,0,炒概念),COLOR999999;
DRAWTEXT_FIX(ISLASTBAR,0.001,0.002,0,CODE),COLORBLACK;
流通市值:=STRCAT(STRCAT('◆市值:',CON2STR((CAPITAL/1000000)*C,2)),' 亿');
DRAWTEXT_FIX(ISLASTBAR,0.08,0.002,0,流通市值),COLORBLACK;
今日成交:=STRCAT(STRCAT('今日成交 ◆ ',CON2STR(DYNAINFO(10)/100000000,2)),' 亿');
DRAWTEXT_FIX(ISLASTBAR,0.18,0.002,0,今日成交),COLORBLACK;