自编指标不兼容,三分钟不显示指标,还有三分钟五分钟十五分钟没有昨结,指标抬头显示很多0000,是否可以去掉这些0000 [博易POBO]
咨询内容:
LL1:=REF(LLV(LOW,15),1);
开盘点:=CLOSE>OPEN AND OPEN<LL1 AND CROSS(CLOSE,LL1);
DRAWTEXT(CLOSE>OPEN AND OPEN<LL1,LOW,'多'),COLOR00FFFF;
DRAWTEXT(CLOSE<OPEN AND OPEN>HH1,HIGH,'空'),COLOR00FFFF;}
{开盘划线}
{1分=32460,3分=32580,5分=32700,10分=33000,15分=33300,30分=34200,10.31分=37860,13.31分=48660}
T9:=TIME0;
{1K}
{累加计算当日总成交量}
TV:=IF(DATE<>REF(DATE,1),0,REF(TV,1))+V;
{累加计算当日总成交金额(价×量)}
TT:=IF(DATE<>REF(DATE,1),0,REF(TT,1))+(C+O+H+L)*0.25*V;
{当日均价}
分时均线AP:TT/TV,COLOR000000;
HH1:=REF(HHV(HIGH,225),1);{求上周期内最高值}
LL1:=REF(LLV(LOW,225),1);{求上周期内最低值}
DRAWSL(T9=32460 AND DATAPERIOD=1,HH1,0,225,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=32460 AND DATAPERIOD=1,LL1,0,225,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=32460 AND DATAPERIOD=1,OPEN,0,225,0),COLORFF8000;{1分钟开盘显黄水平线}
DRAWSL(T9=32460 AND DATAPERIOD=1,REF(分时均线AP,1),0,225,0),COLORFFFFFF;{上日结算价1分钟显白水平线}
DRAWTEXT(T9=32460 AND DATAPERIOD=1,HH1,'高 '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,LL1,'低 '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,OPEN,'开 '),COLORFF8000,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,REF(分时均线AP,1),'昨结 '),COLORFFFFFF,ALIGN2;
VERTLINE(T9=32460 AND DATAPERIOD=1),COLOR00FFFF;
STICKLINE(TIME0=32460 AND CLOSE>=OPEN AND DATAPERIOD=1,OPEN,CLOSE,4,0),COLORFF00FF; {开盘第1分阳线,则显粉红K线}
STICKLINE(TIME0=32460 AND CLOSE<=OPEN AND DATAPERIOD=1,OPEN,CLOSE,4,0),COLORGREEN; {开盘第1分,则显绿K线}
STICKLINE(TIME0=32460 AND DATAPERIOD=1,CLOSE,HIGH,1,0),COLOR00FFFF; {上影线}
STICKLINE(TIME0=32460 AND DATAPERIOD=1,LOW,CLOSE,1,0),COLOR00FFFF; {下影线}
DRAWTEXT(CLOSE>OPEN AND OPEN<LL1 AND T9=32460 AND DATAPERIOD=1,LOW-4,'多'),COLOR00FFFF;{1分如阳线,则显字"多"}
DRAWTEXT(CLOSE<OPEN AND OPEN>HH1 AND T9=32460 AND DATAPERIOD=1,HIGH+3,'空'),COLOR00FFFF;{阴线,则显字"空"}
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND C>=HH1,HH1,'高'),COLOR00FFFF;
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND C<=LL1,LL1,'低'),COLOR00FFFF;
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND BETWEEN(C,HH1,LL1),C*1.0001,'高'),COLOR00FFFF;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,REF(C,1),'昨收 '),COLORFF00FF,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND C>=HH1,REF(C,1),'昨收'),COLORFF00FF;
DRAWSL(T9=32460 AND DATAPERIOD=1,REF(C,1),0,225,0),COLORFF00FF;
{
P1:=BARSLAST(T9=32460 AND DATAPERIOD=1);
高:REF(HH1,P1),LINETHICK0,COLOR0000FF;
低:REF(LL1,P1),LINETHICK0,COLOR40FF00;
开:REF(OPEN,P1),LINETHICK0,COLORFF8000;
昨收:REF(REF(C,1),P1),COLORFF00FF,LINETHICK0;}
{5}
HH5:=REF(HHV(HIGH,45),1);{求上周期内最高值}
LL5:=REF(LLV(LOW,45),1);{求上周期内最低值}
DRAWSL(T9=32700 AND DATAPERIOD=2,HH5,0,45,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=32700 AND DATAPERIOD=2,LL5,0,45,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=32700 AND DATAPERIOD=2,OPEN,0,45,0),COLORFF8000;{5分钟开盘显黄水平线}
DRAWSL(T9=32700 AND DATAPERIOD=2,REF(C,1),0,45,0),COLORFF00FF;{昨收盘价显粉红水平线}
DRAWTEXT(T9=32700 AND DATAPERIOD=2,HH5,' '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=32700 AND DATAPERIOD=2,LL5,' '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=32700 AND DATAPERIOD=2,OPEN,' '),COLORFF8000,ALIGN2;
VERTLINE(T9=32700 AND DATAPERIOD=2),COLOR00FFFF;
DRAWTEXT(T9=32700 AND DATAPERIOD=2,REF(C,1),' '),COLORFF00FF,ALIGN2;
{15}
HH15:=REF(HHV(HIGH,15),1);{求上周期内最高值}
LL15:=REF(LLV(LOW,15),1);{求上周期内最低值}
DRAWSL(T9=33300 AND DATAPERIOD=3,HH15,0,15,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=33300 AND DATAPERIOD=3,LL15,0,15,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=33300 AND DATAPERIOD=3,OPEN,0,15,0),COLORFF8000;{15分钟开盘显黄水平线}
DRAWSL(T9=33300 AND DATAPERIOD=3,REF(C,1),0,15,0),COLORFF00FF;{昨收盘价显粉红水平线}
DRAWTEXT(T9=33300 AND DATAPERIOD=3,HH15,' '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=33300 AND DATAPERIOD=3,LL15,' '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=33300 AND DATAPERIOD=3,OPEN,' '),COLORFF8000,ALIGN2;
VERTLINE(T9=33300 AND DATAPERIOD=3),COLOR00FFFF;
DRAWTEXT(T9=33300 AND DATAPERIOD=3,REF(C,1),' '),COLORFF00FF,ALIGN2;
{3}
HH3:=REF(HHV(HIGH,75),1);{求上周期内最高值}
LL3:=REF(LLV(LOW,75),1);{求上周期内最低值}
DRAWSL(T9=32580 AND DATAPERIOD=11,HH3,0,75,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=32580 AND DATAPERIOD=11,LL3,0,75,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=32580 AND DATAPERIOD=11,OPEN,0,75,0),COLORFF8000;{3分钟开盘显黄水平线}
DRAWSL(T9=32580 AND DATAPERIOD=11,REF(C,1),0,75,0),COLORFF00FF;{昨收盘价显粉红水平线}
DRAWTEXT(T9=32580 AND DATAPERIOD=11,HH3,' '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=32580 AND DATAPERIOD=11,LL3,' '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=32580 AND DATAPERIOD=11,OPEN,' '),COLORFF8000,ALIGN2;
VERTLINE(T9=32580 AND DATAPERIOD=11),COLOR00FFFF;
DRAWTEXT(T9=32580 AND DATAPERIOD=11,REF(C,1),' '),COLORFF00FF,ALIGN2;
P1:=BARSLAST(T9=32460 AND DATAPERIOD=1);
P5:=BARSLAST(T9=32700 AND DATAPERIOD=2);
P15:=BARSLAST(T9=33300 AND DATAPERIOD=3);
P3:=BARSLAST(T9=32580 AND DATAPERIOD=11);
昨高:IF(DATAPERIOD=1,REF(HH1,P1),IF(DATAPERIOD=2,REF(HH5,P5),IF(DATAPERIOD=3,REF(HH15,P15),IF(DATAPERIOD=11,REF(HH3,P3),0)))),LINETHICK0,COLOR0000FF;
昨低:IF(DATAPERIOD=1,REF(LL1,P1),IF(DATAPERIOD=2,REF(LL5,P5),IF(DATAPERIOD=3,REF(LL15,P15),IF(DATAPERIOD=11,REF(LL3,P3),0)))),LINETHICK0,COLOR40FF00;
开:IF(DATAPERIOD=1,REF(OPEN,P1),IF(DATAPERIOD=2,REF(OPEN,P5),IF(DATAPERIOD=3,REF(OPEN,P15),IF(DATAPERIOD=11,REF(OPEN,P3),0)))),LINETHICK0,COLORFF8000;
昨收:IF(DATAPERIOD=1,REF(REF(C,1),P1),IF(DATAPERIOD=2,REF(REF(C,1),P5),IF(DATAPERIOD=3,REF(REF(C,1),P15),IF(DATAPERIOD=11,REF(REF(C,1),P3),0)))),COLORFF00FF,LINETHICK0;
昨结:REF(REF(分时均线AP,1),P1),COLORFFFFFF,LINETHICK0;
TV:=IF(DATE<>REF(DATE,1),0,REF(TV,1))+V;
TT:=IF(DATE<>REF(DATE,1),0,REF(TT,1))+(C+O+H+L)*0.25*V;
分时均线AP:TT/TV,COLOR000000;
HH1:=REF(HHV(HIGH,225),1);{求上周期内最高值}
LL1:=REF(LLV(LOW,225),1);{求上周期内最低值}
DRAWSL(T9=32460 AND DATAPERIOD=1,HH1,0,225,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=32460 AND DATAPERIOD=1,LL1,0,225,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=32460 AND DATAPERIOD=1,OPEN,0,225,0),COLORFF8000;{1分钟开盘显黄水平线}
DRAWSL(T9=32460 AND DATAPERIOD=1,REF(分时均线AP,1),0,225,0),COLORFFFFFF;{上日结算价1分钟显白水平线}
DRAWTEXT(T9=32460 AND DATAPERIOD=1,HH1,'高 '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,LL1,'低 '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,OPEN,'开 '),COLORFF8000,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,REF(分时均线AP,1),'昨结 '),COLORFFFFFF,ALIGN2;
VERTLINE(T9=32460 AND DATAPERIOD=1),COLOR00FFFF;
STICKLINE(TIME0=32460 AND CLOSE>=OPEN AND DATAPERIOD=1,OPEN,CLOSE,4,0),COLORFF00FF; {开盘第1分阳线,则显粉红K线}
STICKLINE(TIME0=32460 AND CLOSE<=OPEN AND DATAPERIOD=1,OPEN,CLOSE,4,0),COLORGREEN; {开盘第1分,则显绿K线}
STICKLINE(TIME0=32460 AND DATAPERIOD=1,CLOSE,HIGH,1,0),COLOR00FFFF; {上影线}
STICKLINE(TIME0=32460 AND DATAPERIOD=1,LOW,CLOSE,1,0),COLOR00FFFF; {下影线}
DRAWTEXT(CLOSE>OPEN AND OPEN<LL1 AND T9=32460 AND DATAPERIOD=1,LOW-4,'多'),COLOR00FFFF;{1分如阳线,则显字"多"}
DRAWTEXT(CLOSE<OPEN AND OPEN>HH1 AND T9=32460 AND DATAPERIOD=1,HIGH+3,'空'),COLOR00FFFF;{阴线,则显字"空"}
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND C>=HH1,HH1,'高'),COLOR00FFFF;
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND C<=LL1,LL1,'低'),COLOR00FFFF;
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND BETWEEN(C,HH1,LL1),C*1.0001,'高'),COLOR00FFFF;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,REF(C,1),'昨收 '),COLORFF00FF,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND C>=HH1,REF(C,1),'昨收'),COLORFF00FF;
DRAWSL(T9=32460 AND DATAPERIOD=1,REF(C,1),0,225,0),COLORFF00FF;
{
P1:=BARSLAST(T9=32460 AND DATAPERIOD=1);
高:REF(HH1,P1),LINETHICK0,COLOR0000FF;
低:REF(LL1,P1),LINETHICK0,COLOR40FF00;
开:REF(OPEN,P1),LINETHICK0,COLORFF8000;
昨收:REF(REF(C,1),P1),COLORFF00FF,LINETHICK0;}
{5}
HH5:=REF(HHV(HIGH,45),1);{求上周期内最高值}
LL5:=REF(LLV(LOW,45),1);{求上周期内最低值}
DRAWSL(T9=32700 AND DATAPERIOD=2,HH5,0,45,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=32700 AND DATAPERIOD=2,LL5,0,45,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=32700 AND DATAPERIOD=2,OPEN,0,45,0),COLORFF8000;{5分钟开盘显黄水平线}
DRAWSL(T9=32700 AND DATAPERIOD=2,REF(C,1),0,45,0),COLORFF00FF;{昨收盘价显粉红水平线}
DRAWTEXT(T9=32700 AND DATAPERIOD=2,HH5,' '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=32700 AND DATAPERIOD=2,LL5,' '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=32700 AND DATAPERIOD=2,OPEN,' '),COLORFF8000,ALIGN2;
VERTLINE(T9=32700 AND DATAPERIOD=2),COLOR00FFFF;
DRAWTEXT(T9=32700 AND DATAPERIOD=2,REF(C,1),' '),COLORFF00FF,ALIGN2;
{15}
HH15:=REF(HHV(HIGH,15),1);{求上周期内最高值}
LL15:=REF(LLV(LOW,15),1);{求上周期内最低值}
DRAWSL(T9=33300 AND DATAPERIOD=3,HH15,0,15,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=33300 AND DATAPERIOD=3,LL15,0,15,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=33300 AND DATAPERIOD=3,OPEN,0,15,0),COLORFF8000;{15分钟开盘显黄水平线}
DRAWSL(T9=33300 AND DATAPERIOD=3,REF(C,1),0,15,0),COLORFF00FF;{昨收盘价显粉红水平线}
DRAWTEXT(T9=33300 AND DATAPERIOD=3,HH15,' '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=33300 AND DATAPERIOD=3,LL15,' '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=33300 AND DATAPERIOD=3,OPEN,' '),COLORFF8000,ALIGN2;
VERTLINE(T9=33300 AND DATAPERIOD=3),COLOR00FFFF;
DRAWTEXT(T9=33300 AND DATAPERIOD=3,REF(C,1),' '),COLORFF00FF,ALIGN2;
{3}
HH3:=REF(HHV(HIGH,75),1);{求上周期内最高值}
LL3:=REF(LLV(LOW,75),1);{求上周期内最低值}
DRAWSL(T9=32580 AND DATAPERIOD=13,HH3,0,75,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=32580 AND DATAPERIOD=13,LL3,0,75,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=32580 AND DATAPERIOD=13,OPEN,0,75,0),COLORFF8000;{3分钟开盘显黄水平线}
DRAWSL(T9=32580 AND DATAPERIOD=13,REF(C,1),0,75,0),COLORFF00FF;{昨收盘价显粉红水平线}
DRAWTEXT(T9=32580 AND DATAPERIOD=13,HH3,' '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=32580 AND DATAPERIOD=13,LL3,' '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=32580 AND DATAPERIOD=13,OPEN,' '),COLORFF8000,ALIGN2;
VERTLINE(T9=32580 AND DATAPERIOD=13),COLOR00FFFF;
DRAWTEXT(T9=32580 AND DATAPERIOD=13,REF(C,1),' '),COLORFF00FF,ALIGN2;
P1:=BARSLAST(T9=32460 AND DATAPERIOD=1);
P5:=BARSLAST(T9=32700 AND DATAPERIOD=2);
P15:=BARSLAST(T9=33300 AND DATAPERIOD=3);
P3:=BARSLAST(T9=32580 AND DATAPERIOD=11);
昨高:IF(DATAPERIOD=1,REF(HH1,P1),IF(DATAPERIOD=2,REF(HH5,P5),IF(DATAPERIOD=3,REF(HH15,P15),IF(DATAPERIOD=11,REF(HH3,P3),0)))),LINETHICK0,COLOR0000FF;
昨低:IF(DATAPERIOD=1,REF(LL1,P1),IF(DATAPERIOD=2,REF(LL5,P5),IF(DATAPERIOD=3,REF(LL15,P15),IF(DATAPERIOD=11,REF(LL3,P3),0)))),LINETHICK0,COLOR40FF00;
开:IF(DATAPERIOD=1,REF(OPEN,P1),IF(DATAPERIOD=2,REF(OPEN,P5),IF(DATAPERIOD=3,REF(OPEN,P15),IF(DATAPERIOD=11,REF(OPEN,P3),0)))),LINETHICK0,COLORFF8000;
昨收:IF(DATAPERIOD=1,REF(REF(C,1),P1),IF(DATAPERIOD=2,REF(REF(C,1),P5),IF(DATAPERIOD=3,REF(REF(C,1),P15),IF(DATAPERIOD=11,REF(REF(C,1),P3),0)))),COLORFF00FF,LINETHICK0;
昨结:REF(REF(分时均线AP,1),P1),COLORFFFFFF,LINETHICK0;
参数位显示零是不满足条件的画线位。 谢谢老师,三分钟五分钟十五分钟还是不显示昨结,一分钟显示,另外指标抬头上面有很多0000,这个0000没意义是否可以去掉 来源 程序化久久网
自编指标不兼容,三分钟不显示指标,还有三分钟五分钟十五分钟没有昨结,指标抬头显示很多0000,是否可以去掉这些0000
{HH1:=REF(HHV(HIGH,15),1);LL1:=REF(LLV(LOW,15),1);
开盘点:=CLOSE>OPEN AND OPEN<LL1 AND CROSS(CLOSE,LL1);
DRAWTEXT(CLOSE>OPEN AND OPEN<LL1,LOW,'多'),COLOR00FFFF;
DRAWTEXT(CLOSE<OPEN AND OPEN>HH1,HIGH,'空'),COLOR00FFFF;}
{开盘划线}
{1分=32460,3分=32580,5分=32700,10分=33000,15分=33300,30分=34200,10.31分=37860,13.31分=48660}
T9:=TIME0;
{1K}
{累加计算当日总成交量}
TV:=IF(DATE<>REF(DATE,1),0,REF(TV,1))+V;
{累加计算当日总成交金额(价×量)}
TT:=IF(DATE<>REF(DATE,1),0,REF(TT,1))+(C+O+H+L)*0.25*V;
{当日均价}
分时均线AP:TT/TV,COLOR000000;
HH1:=REF(HHV(HIGH,225),1);{求上周期内最高值}
LL1:=REF(LLV(LOW,225),1);{求上周期内最低值}
DRAWSL(T9=32460 AND DATAPERIOD=1,HH1,0,225,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=32460 AND DATAPERIOD=1,LL1,0,225,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=32460 AND DATAPERIOD=1,OPEN,0,225,0),COLORFF8000;{1分钟开盘显黄水平线}
DRAWSL(T9=32460 AND DATAPERIOD=1,REF(分时均线AP,1),0,225,0),COLORFFFFFF;{上日结算价1分钟显白水平线}
DRAWTEXT(T9=32460 AND DATAPERIOD=1,HH1,'高 '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,LL1,'低 '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,OPEN,'开 '),COLORFF8000,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,REF(分时均线AP,1),'昨结 '),COLORFFFFFF,ALIGN2;
VERTLINE(T9=32460 AND DATAPERIOD=1),COLOR00FFFF;
STICKLINE(TIME0=32460 AND CLOSE>=OPEN AND DATAPERIOD=1,OPEN,CLOSE,4,0),COLORFF00FF; {开盘第1分阳线,则显粉红K线}
STICKLINE(TIME0=32460 AND CLOSE<=OPEN AND DATAPERIOD=1,OPEN,CLOSE,4,0),COLORGREEN; {开盘第1分,则显绿K线}
STICKLINE(TIME0=32460 AND DATAPERIOD=1,CLOSE,HIGH,1,0),COLOR00FFFF; {上影线}
STICKLINE(TIME0=32460 AND DATAPERIOD=1,LOW,CLOSE,1,0),COLOR00FFFF; {下影线}
DRAWTEXT(CLOSE>OPEN AND OPEN<LL1 AND T9=32460 AND DATAPERIOD=1,LOW-4,'多'),COLOR00FFFF;{1分如阳线,则显字"多"}
DRAWTEXT(CLOSE<OPEN AND OPEN>HH1 AND T9=32460 AND DATAPERIOD=1,HIGH+3,'空'),COLOR00FFFF;{阴线,则显字"空"}
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND C>=HH1,HH1,'高'),COLOR00FFFF;
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND C<=LL1,LL1,'低'),COLOR00FFFF;
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND BETWEEN(C,HH1,LL1),C*1.0001,'高'),COLOR00FFFF;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,REF(C,1),'昨收 '),COLORFF00FF,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND C>=HH1,REF(C,1),'昨收'),COLORFF00FF;
DRAWSL(T9=32460 AND DATAPERIOD=1,REF(C,1),0,225,0),COLORFF00FF;
{
P1:=BARSLAST(T9=32460 AND DATAPERIOD=1);
高:REF(HH1,P1),LINETHICK0,COLOR0000FF;
低:REF(LL1,P1),LINETHICK0,COLOR40FF00;
开:REF(OPEN,P1),LINETHICK0,COLORFF8000;
昨收:REF(REF(C,1),P1),COLORFF00FF,LINETHICK0;}
{5}
HH5:=REF(HHV(HIGH,45),1);{求上周期内最高值}
LL5:=REF(LLV(LOW,45),1);{求上周期内最低值}
DRAWSL(T9=32700 AND DATAPERIOD=2,HH5,0,45,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=32700 AND DATAPERIOD=2,LL5,0,45,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=32700 AND DATAPERIOD=2,OPEN,0,45,0),COLORFF8000;{5分钟开盘显黄水平线}
DRAWSL(T9=32700 AND DATAPERIOD=2,REF(C,1),0,45,0),COLORFF00FF;{昨收盘价显粉红水平线}
DRAWTEXT(T9=32700 AND DATAPERIOD=2,HH5,' '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=32700 AND DATAPERIOD=2,LL5,' '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=32700 AND DATAPERIOD=2,OPEN,' '),COLORFF8000,ALIGN2;
VERTLINE(T9=32700 AND DATAPERIOD=2),COLOR00FFFF;
DRAWTEXT(T9=32700 AND DATAPERIOD=2,REF(C,1),' '),COLORFF00FF,ALIGN2;
{15}
HH15:=REF(HHV(HIGH,15),1);{求上周期内最高值}
LL15:=REF(LLV(LOW,15),1);{求上周期内最低值}
DRAWSL(T9=33300 AND DATAPERIOD=3,HH15,0,15,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=33300 AND DATAPERIOD=3,LL15,0,15,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=33300 AND DATAPERIOD=3,OPEN,0,15,0),COLORFF8000;{15分钟开盘显黄水平线}
DRAWSL(T9=33300 AND DATAPERIOD=3,REF(C,1),0,15,0),COLORFF00FF;{昨收盘价显粉红水平线}
DRAWTEXT(T9=33300 AND DATAPERIOD=3,HH15,' '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=33300 AND DATAPERIOD=3,LL15,' '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=33300 AND DATAPERIOD=3,OPEN,' '),COLORFF8000,ALIGN2;
VERTLINE(T9=33300 AND DATAPERIOD=3),COLOR00FFFF;
DRAWTEXT(T9=33300 AND DATAPERIOD=3,REF(C,1),' '),COLORFF00FF,ALIGN2;
{3}
HH3:=REF(HHV(HIGH,75),1);{求上周期内最高值}
LL3:=REF(LLV(LOW,75),1);{求上周期内最低值}
DRAWSL(T9=32580 AND DATAPERIOD=11,HH3,0,75,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=32580 AND DATAPERIOD=11,LL3,0,75,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=32580 AND DATAPERIOD=11,OPEN,0,75,0),COLORFF8000;{3分钟开盘显黄水平线}
DRAWSL(T9=32580 AND DATAPERIOD=11,REF(C,1),0,75,0),COLORFF00FF;{昨收盘价显粉红水平线}
DRAWTEXT(T9=32580 AND DATAPERIOD=11,HH3,' '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=32580 AND DATAPERIOD=11,LL3,' '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=32580 AND DATAPERIOD=11,OPEN,' '),COLORFF8000,ALIGN2;
VERTLINE(T9=32580 AND DATAPERIOD=11),COLOR00FFFF;
DRAWTEXT(T9=32580 AND DATAPERIOD=11,REF(C,1),' '),COLORFF00FF,ALIGN2;
P1:=BARSLAST(T9=32460 AND DATAPERIOD=1);
P5:=BARSLAST(T9=32700 AND DATAPERIOD=2);
P15:=BARSLAST(T9=33300 AND DATAPERIOD=3);
P3:=BARSLAST(T9=32580 AND DATAPERIOD=11);
昨高:IF(DATAPERIOD=1,REF(HH1,P1),IF(DATAPERIOD=2,REF(HH5,P5),IF(DATAPERIOD=3,REF(HH15,P15),IF(DATAPERIOD=11,REF(HH3,P3),0)))),LINETHICK0,COLOR0000FF;
昨低:IF(DATAPERIOD=1,REF(LL1,P1),IF(DATAPERIOD=2,REF(LL5,P5),IF(DATAPERIOD=3,REF(LL15,P15),IF(DATAPERIOD=11,REF(LL3,P3),0)))),LINETHICK0,COLOR40FF00;
开:IF(DATAPERIOD=1,REF(OPEN,P1),IF(DATAPERIOD=2,REF(OPEN,P5),IF(DATAPERIOD=3,REF(OPEN,P15),IF(DATAPERIOD=11,REF(OPEN,P3),0)))),LINETHICK0,COLORFF8000;
昨收:IF(DATAPERIOD=1,REF(REF(C,1),P1),IF(DATAPERIOD=2,REF(REF(C,1),P5),IF(DATAPERIOD=3,REF(REF(C,1),P15),IF(DATAPERIOD=11,REF(REF(C,1),P3),0)))),COLORFF00FF,LINETHICK0;
昨结:REF(REF(分时均线AP,1),P1),COLORFFFFFF,LINETHICK0;
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: T9:=TIME0;TV:=IF(DATE<>REF(DATE,1),0,REF(TV,1))+V;
TT:=IF(DATE<>REF(DATE,1),0,REF(TT,1))+(C+O+H+L)*0.25*V;
分时均线AP:TT/TV,COLOR000000;
HH1:=REF(HHV(HIGH,225),1);{求上周期内最高值}
LL1:=REF(LLV(LOW,225),1);{求上周期内最低值}
DRAWSL(T9=32460 AND DATAPERIOD=1,HH1,0,225,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=32460 AND DATAPERIOD=1,LL1,0,225,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=32460 AND DATAPERIOD=1,OPEN,0,225,0),COLORFF8000;{1分钟开盘显黄水平线}
DRAWSL(T9=32460 AND DATAPERIOD=1,REF(分时均线AP,1),0,225,0),COLORFFFFFF;{上日结算价1分钟显白水平线}
DRAWTEXT(T9=32460 AND DATAPERIOD=1,HH1,'高 '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,LL1,'低 '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,OPEN,'开 '),COLORFF8000,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,REF(分时均线AP,1),'昨结 '),COLORFFFFFF,ALIGN2;
VERTLINE(T9=32460 AND DATAPERIOD=1),COLOR00FFFF;
STICKLINE(TIME0=32460 AND CLOSE>=OPEN AND DATAPERIOD=1,OPEN,CLOSE,4,0),COLORFF00FF; {开盘第1分阳线,则显粉红K线}
STICKLINE(TIME0=32460 AND CLOSE<=OPEN AND DATAPERIOD=1,OPEN,CLOSE,4,0),COLORGREEN; {开盘第1分,则显绿K线}
STICKLINE(TIME0=32460 AND DATAPERIOD=1,CLOSE,HIGH,1,0),COLOR00FFFF; {上影线}
STICKLINE(TIME0=32460 AND DATAPERIOD=1,LOW,CLOSE,1,0),COLOR00FFFF; {下影线}
DRAWTEXT(CLOSE>OPEN AND OPEN<LL1 AND T9=32460 AND DATAPERIOD=1,LOW-4,'多'),COLOR00FFFF;{1分如阳线,则显字"多"}
DRAWTEXT(CLOSE<OPEN AND OPEN>HH1 AND T9=32460 AND DATAPERIOD=1,HIGH+3,'空'),COLOR00FFFF;{阴线,则显字"空"}
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND C>=HH1,HH1,'高'),COLOR00FFFF;
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND C<=LL1,LL1,'低'),COLOR00FFFF;
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND BETWEEN(C,HH1,LL1),C*1.0001,'高'),COLOR00FFFF;
DRAWTEXT(T9=32460 AND DATAPERIOD=1,REF(C,1),'昨收 '),COLORFF00FF,ALIGN2;
DRAWTEXT(T9=32460 AND DATAPERIOD=1 AND C>=HH1,REF(C,1),'昨收'),COLORFF00FF;
DRAWSL(T9=32460 AND DATAPERIOD=1,REF(C,1),0,225,0),COLORFF00FF;
{
P1:=BARSLAST(T9=32460 AND DATAPERIOD=1);
高:REF(HH1,P1),LINETHICK0,COLOR0000FF;
低:REF(LL1,P1),LINETHICK0,COLOR40FF00;
开:REF(OPEN,P1),LINETHICK0,COLORFF8000;
昨收:REF(REF(C,1),P1),COLORFF00FF,LINETHICK0;}
{5}
HH5:=REF(HHV(HIGH,45),1);{求上周期内最高值}
LL5:=REF(LLV(LOW,45),1);{求上周期内最低值}
DRAWSL(T9=32700 AND DATAPERIOD=2,HH5,0,45,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=32700 AND DATAPERIOD=2,LL5,0,45,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=32700 AND DATAPERIOD=2,OPEN,0,45,0),COLORFF8000;{5分钟开盘显黄水平线}
DRAWSL(T9=32700 AND DATAPERIOD=2,REF(C,1),0,45,0),COLORFF00FF;{昨收盘价显粉红水平线}
DRAWTEXT(T9=32700 AND DATAPERIOD=2,HH5,' '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=32700 AND DATAPERIOD=2,LL5,' '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=32700 AND DATAPERIOD=2,OPEN,' '),COLORFF8000,ALIGN2;
VERTLINE(T9=32700 AND DATAPERIOD=2),COLOR00FFFF;
DRAWTEXT(T9=32700 AND DATAPERIOD=2,REF(C,1),' '),COLORFF00FF,ALIGN2;
{15}
HH15:=REF(HHV(HIGH,15),1);{求上周期内最高值}
LL15:=REF(LLV(LOW,15),1);{求上周期内最低值}
DRAWSL(T9=33300 AND DATAPERIOD=3,HH15,0,15,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=33300 AND DATAPERIOD=3,LL15,0,15,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=33300 AND DATAPERIOD=3,OPEN,0,15,0),COLORFF8000;{15分钟开盘显黄水平线}
DRAWSL(T9=33300 AND DATAPERIOD=3,REF(C,1),0,15,0),COLORFF00FF;{昨收盘价显粉红水平线}
DRAWTEXT(T9=33300 AND DATAPERIOD=3,HH15,' '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=33300 AND DATAPERIOD=3,LL15,' '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=33300 AND DATAPERIOD=3,OPEN,' '),COLORFF8000,ALIGN2;
VERTLINE(T9=33300 AND DATAPERIOD=3),COLOR00FFFF;
DRAWTEXT(T9=33300 AND DATAPERIOD=3,REF(C,1),' '),COLORFF00FF,ALIGN2;
{3}
HH3:=REF(HHV(HIGH,75),1);{求上周期内最高值}
LL3:=REF(LLV(LOW,75),1);{求上周期内最低值}
DRAWSL(T9=32580 AND DATAPERIOD=13,HH3,0,75,0),COLOR0000FF;{昨最高价显红水平线}
DRAWSL(T9=32580 AND DATAPERIOD=13,LL3,0,75,0),COLOR40FF00;{昨最低价显绿水平线}
DRAWSL(T9=32580 AND DATAPERIOD=13,OPEN,0,75,0),COLORFF8000;{3分钟开盘显黄水平线}
DRAWSL(T9=32580 AND DATAPERIOD=13,REF(C,1),0,75,0),COLORFF00FF;{昨收盘价显粉红水平线}
DRAWTEXT(T9=32580 AND DATAPERIOD=13,HH3,' '),COLOR0000FF,ALIGN2;
DRAWTEXT(T9=32580 AND DATAPERIOD=13,LL3,' '),COLOR40FF00,ALIGN2;
DRAWTEXT(T9=32580 AND DATAPERIOD=13,OPEN,' '),COLORFF8000,ALIGN2;
VERTLINE(T9=32580 AND DATAPERIOD=13),COLOR00FFFF;
DRAWTEXT(T9=32580 AND DATAPERIOD=13,REF(C,1),' '),COLORFF00FF,ALIGN2;
P1:=BARSLAST(T9=32460 AND DATAPERIOD=1);
P5:=BARSLAST(T9=32700 AND DATAPERIOD=2);
P15:=BARSLAST(T9=33300 AND DATAPERIOD=3);
P3:=BARSLAST(T9=32580 AND DATAPERIOD=11);
昨高:IF(DATAPERIOD=1,REF(HH1,P1),IF(DATAPERIOD=2,REF(HH5,P5),IF(DATAPERIOD=3,REF(HH15,P15),IF(DATAPERIOD=11,REF(HH3,P3),0)))),LINETHICK0,COLOR0000FF;
昨低:IF(DATAPERIOD=1,REF(LL1,P1),IF(DATAPERIOD=2,REF(LL5,P5),IF(DATAPERIOD=3,REF(LL15,P15),IF(DATAPERIOD=11,REF(LL3,P3),0)))),LINETHICK0,COLOR40FF00;
开:IF(DATAPERIOD=1,REF(OPEN,P1),IF(DATAPERIOD=2,REF(OPEN,P5),IF(DATAPERIOD=3,REF(OPEN,P15),IF(DATAPERIOD=11,REF(OPEN,P3),0)))),LINETHICK0,COLORFF8000;
昨收:IF(DATAPERIOD=1,REF(REF(C,1),P1),IF(DATAPERIOD=2,REF(REF(C,1),P5),IF(DATAPERIOD=3,REF(REF(C,1),P15),IF(DATAPERIOD=11,REF(REF(C,1),P3),0)))),COLORFF00FF,LINETHICK0;
昨结:REF(REF(分时均线AP,1),P1),COLORFFFFFF,LINETHICK0;
参数位显示零是不满足条件的画线位。 谢谢老师,三分钟五分钟十五分钟还是不显示昨结,一分钟显示,另外指标抬头上面有很多0000,这个0000没意义是否可以去掉 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容