等级: 新手上路
- 注册:
- 2021-7-17
- 曾用名:
|
老师好,请修改下面分时公式(也只能在1分钟、5分钟、15分钟等,以上K线上使用),改成能在秒级(5秒、15秒)别K线上使用,谢谢
if DATAPERIOD=0 then minbi:="fbase.var2#min1";
if DATAPERIOD=1 then minbi:="fbase.var2#min5";
if DATAPERIOD=2 then minbi:="fbase.var2#min30";
if DATAPERIOD=3 then minbi:="fbase.var2#min60";
if DATAPERIOD=4 then minbi:="fbase.var2#day";
if DATAPERIOD=5 then minbi:="fbase.var2#day";
if DATAPERIOD=6 then minbi:="fbase.var2#week";
if DATAPERIOD=7 then minbi:="fbase.var2#month";
if DATAPERIOD=8 then minbi:="fbase.var2#year";
pre:=1; //设置小数点位数
var1:="chzhshch@kxian";
var2:="chzhshch@bi";{处理笔关系}
drawnumber(var2=1,h,h,pre),pxup12,colorred,align0;
drawnumber(var2=-1,l,l,pre),pxdn2,colorwhite,align0;
var3:="chzhshch@tongji"(minbi);{同级别分解}
zg:="chzhshch@zg"(var3);//一定要先调用ZG
zd:="chzhshch@zd"(var3);
//以背景块的形式画中枢
//stickline(zg>zd,zg,zd,10,0),colorblue;
drawline(var2=1,h,var2=-1,l,0),linedot,color555555;
drawline(var2=-1,l,var2=1,h,0),linedot,color555555;
//
drawline(var3=1,h,var3=-1,l,0),color0000FF;
drawline(var3=-1,l,var3=1,h,0),color0000FF;
//以框的形式画中枢
//
stickline(zg>zd and zg<>ref(zg,1),zg,zd,2,0),COLORMAGENTA;
stickline(zg>zd and zg<>refx(zg,1),zg,zd,2,0),COLORMAGENTA;
drawline(zg>zd and zg<>ref(zg,1),zg,zg>zd and zg<>refx(zg,1),zg,0),COLORMAGENTA;
drawline(zg>zd and zd<>ref(zd,1),zd,zg>zd and zd<>refx(zd,1),zd,0),COLORMAGENTA;
var1:="chzhshch@kxian";
var2:="chzhshch@bi";{处理笔关系}
if DATAPERIOD<=1 then
begin var2:=var3;{处理段1分钟的关系}
end;
|
|