|
公式是从最开始的第一根开始算,所以与真实的三分钟K线不完全吻合。这个是带高低点价位的。
N:=3;
RY1:=BARSCOUNT(CLOSE);
RY0:=FRACPART(RY1/N);
RY2:=ROUND(RY0*N);
PO:=IF(RY0=0,O,REF(O,(RY2-1)));
PC:=IF(RY0=0,REFX(C,N),REFX(C,(RY2-1)));
PH:=IF(RY0=0,REFX(HHV(H,(N+1)),1),REFX(HHV(H,N),(RY2-1)));
PL:=IF(RY0=0,REFX(LLV(L,(N+1)),1),REFX(LLV(L,N),(RY2-1)));
STICKLINE(RY2=N-1 AND PC>PO,PH,PL,11,0),COLOR000055;
STICKLINE(RY2=N-1 AND PC=PO,PH,PL,11,0),COLOR333333;
STICKLINE(RY2=N-1 AND PC<PO,PH,PL,11,0),COLOR551100;
DRAWKLINE(H,O,L,C);
DRAWNUMBER(RY2=N-1,(PH+(EMA(ATR,100))/3),PH);
DRAWNUMBER(RY2=N-1,(PL-(EMA(ATR,100))/3),PL),DRAWABOVE;
|
|