{Z基础位移-大智慧版}
T1:=BARSLAST(C>MAXCYC*POW(1.1,0.9));
T2:=BARSLAST(C
T4:=REF(MAXCYC,BARSLAST(T3));
BPR:LN(C/T4)/LN(1.1),COLORSTICK,COLORYELLOW;
STICKLINE(BPR>0,BPR,0,6,0),COLORRED;
STICKLINE(BPR<=0,BPR,0,6,0),COLORBLUE;
SSL:IF(BPR>0,BARSLAST(BPR<0 OR BARPOS=1),-1*BARSLAST(BPR>0 OR BARPOS=1)),LINETHICK0;
2;
1;
-2;
-1;
{ZH基础位移-通达信版}
ER:=V/FINANCE(7)*100;
A0:=TMA(ER,(1-ER),1);
MAXCYC:=DMA((C+O)/2,ER/TMA(ER,(1-ER),1));
T1:=BARSLAST(C>MAXCYC*POW(1.1,0.9));
T2:=BARSLAST(C
T4:=REF(MAXCYC,BARSLAST(T3));
BPR:LN(C/T4)/LN(1.1),COLORSTICK,COLORYELLOW;
STICKLINE(BPR>0,BPR,0,3,0),COLORRED;
STICKLINE(BPR<=0,BPR,0,3,0),COLORBLUE;
SSL:IF(BPR>0,BARSLAST(BPR<0 OR BARSCOUNT(C)=0),-1*BARSLAST(BPR>0 OR BARSCOUNT(C)=0)),NODRAW;
2;
1;
-2;
-1;
{ZH基础位移-飞狐版}
ER:=VOL/CAPITAL;
MAXCYC:=DMA((C+O)/2,ER/TMA(ER,(1-ER),1));
T1:=BARSLAST(C>MAXCYC*POW(1.1,0.9));
T2:=BARSLAST(C
T4:=REF(MAXCYC,BARSLAST(T3));
BPR:LN(C/T4)/LN(1.1),COLORSTICK,COLORYELLOW;
STICKLINE(BPR>0,BPR,0,6,0),COLORRED;
STICKLINE(BPR<=0,BPR,0,6,0),COLORBLUE;
SSL:IF(BPR>0,BARSLAST(BPR<0 OR BARPOS=1),-1*BARSLAST(BPR>0 OR BARPOS=1)),LINETHICK0;
2;
1;
-2;
-1;