TAG:波段

 网友求助:

想求10点到11点的波幅,并标出最高最低点...为什么总是出来一堆呢?

in:=BARSLAST(year=2012 and MONTH=2 AND DAY=24 AND HOUR=9);
out:=BARSLAST(year=2012 and MONTH=2 AND DAY=24 AND HOUR=10);
a:ref(hhv(H,in-out),out);
b:ref(llv(L,in-out),out);
DRAWNUMBER(h=a,h,a,2);
DRAWNUMBER(l=b,l,b,2);

 

 

 

波段区间最高最低点问题

 

解答如下:

HH0:=REF(HHV(H,BARSLAST(TIME<100000)+1),BARSLAST(TIME<110000));
LL0:=REF(LLV(L,BARSLAST(TIME<100000)+1),BARSLAST(TIME<110000));
HH1:=HH0[DATACOUNT];
LL1:=LL0[DATACOUNT];
SS:=TIME>=10000 AND TIME<=110000;
DRAWNUMBER(SS AND H=HH1,H*1.002,HH1,2),COLORYELLOW;
DRAWNUMBER(SS AND L=LL1,L/1.002,LL1,2),COLORYELLOW;
VERTLINE(CROSS(0.5,TIME<100000)),COLORGREEN;
VERTLINE(CROSS(0.5,TIME<110000)),COLORGREEN;

 

 

波段区间最高最低点问题