加在成交量公式后面就可以 {N:=150;} OI:AMOUNT,LINETHICK0,COLOR00FF00; VH :=REFX(IF(ISLASTBAR,HHV(V ,N+1),0),N); OIH:=REFX(IF(ISLASTBAR,HHV(OI,N+1),0),N); OIL:=REFX(IF(ISLASTBAR,LLV(OI,N+1),0),N); OIV:=(OI-OIL)/(OIH-OIL)*VH; PARTLINE(STKTYPE=7 AND REF(VH,1)>0,OIV),COLOR00FF00; VERTLINE(REF(VH,1)>REF(VH,2)),COLOR00FF00; XX:REF(OI,1)-REF(OI,2),LINETHICK0,COLORFF7700; X:OI-REF(OI,1),LINETHICK0,COLORAA00AA; 新5.0版本如以上公式不能正常使用,請用以下公式
OI:AMOUNT,COLOR00FF00,LINETHICK0;{持倉量}
OI+:OI-REF(OI,1),COLORFF9900,LINETHICK0;
{畫線起點} XX:=150;
V0:=IF(ISLASTBAR,HHV(VOL,XX),0);{最高成交}
V1:=FLOOR(FRACPART(V0/10)*10);V10:=BACKSET(V1=1 OR V1=4 OR
V1=7,XX)+BACKSET(V1=2 OR V1=5 OR V1=8,XX)*2+BACKSET(V1=3 OR V1=4 OR
V1=5 OR V1=9,XX)*3+BACKSET(V1=6 OR V1=7 OR V1=8 OR
V1=9,XX)*6;
V2:=FLOOR(FRACPART(V0/100)*10);V20:=BACKSET(V2=1 OR V2=4 OR
V2=7,XX)+BACKSET(V2=2 OR V2=5 OR V2=8,XX)*2+BACKSET(V2=3 OR V2=4 OR
V2=5 OR V2=9,XX)*3+BACKSET(V2=6 OR V2=7 OR V2=8 OR
V2=9,XX)*6;
V3:=FLOOR(FRACPART(V0/1000)*10);V30:=BACKSET(V3=1 OR V3=4 OR
V3=7,XX)+BACKSET(V3=2 OR V3=5 OR V3=8,XX)*2+BACKSET(V3=3 OR V3=4 OR
V3=5 OR V3=9,XX)*3+BACKSET(V3=6 OR V3=7 OR V3=8 OR
V3=9,XX)*6;
V4:=FLOOR(FRACPART(V0/10000)*10);V40:=BACKSET(V4=1 OR V4=4 OR
V4=7,XX)+BACKSET(V4=2 OR V4=5 OR V4=8,XX)*2+BACKSET(V4=3 OR V4=4 OR
V4=5 OR V4=9,XX)*3+BACKSET(V4=6 OR V4=7 OR V4=8 OR
V4=9,XX)*6;
V5:=FLOOR(FRACPART(V0/100000)*10);V50:=BACKSET(V5=1 OR V5=4 OR
V5=7,XX)+BACKSET(V5=2 OR V5=5 OR V5=8,XX)*2+BACKSET(V5=3 OR V5=4 OR
V5=5 OR V5=9,XX)*3+BACKSET(V5=6 OR V5=7 OR V5=8 OR
V5=9,XX)*6;
V6:=FLOOR(FRACPART(V0/1000000)*10);V60:=BACKSET(V6=1 OR V6=4
OR V6=7,XX)+BACKSET(V6=2 OR V6=5 OR V6=8,XX)*2+BACKSET(V6=3 OR V6=4
OR V6=5 OR V6=9,XX)*3+BACKSET(V6=6 OR V6=7 OR V6=8 OR
V6=9,XX)*6;
V7:=FLOOR(FRACPART(V0/10000000)*10);V70:=BACKSET(V7=1 OR V7=4
OR V7=7,XX)+BACKSET(V7=2 OR V7=5 OR V7=8,XX)*2+BACKSET(V7=3 OR V7=4
OR V7=5 OR V7=9,XX)*3+BACKSET(V7=6 OR V7=7 OR V7=8 OR
V7=9,XX)*6;
V00:=V10+V20*10+V30*100+V40*1000+V50*10000+V60*100000+V70*1000000;{最高成交}
H0:=IF(ISLASTBAR,HHV(AMOUNT,XX),0);{最高持倉}
H1:=FLOOR(FRACPART(H0/10)*10);H10:=BACKSET(H1=1 OR H1=4 OR
H1=7,XX)+BACKSET(H1=2 OR H1=5 OR H1=8,XX)*2+BACKSET(H1=3 OR H1=4 OR
H1=5 OR H1=9,XX)*3+BACKSET(H1=6 OR H1=7 OR H1=8 OR
H1=9,XX)*6;
H2:=FLOOR(FRACPART(H0/100)*10);H20:=BACKSET(H2=1 OR H2=4 OR
H2=7,XX)+BACKSET(H2=2 OR H2=5 OR H2=8,XX)*2+BACKSET(H2=3 OR H2=4 OR
H2=5 OR H2=9,XX)*3+BACKSET(H2=6 OR H2=7 OR H2=8 OR
H2=9,XX)*6;
H3:=FLOOR(FRACPART(H0/1000)*10);H30:=BACKSET(H3=1 OR H3=4 OR
H3=7,XX)+BACKSET(H3=2 OR H3=5 OR H3=8,XX)*2+BACKSET(H3=3 OR H3=4 OR
H3=5 OR H3=9,XX)*3+BACKSET(H3=6 OR H3=7 OR H3=8 OR
H3=9,XX)*6;
H4:=FLOOR(FRACPART(H0/10000)*10);H40:=BACKSET(H4=1 OR H4=4 OR
H4=7,XX)+BACKSET(H4=2 OR H4=5 OR H4=8,XX)*2+BACKSET(H4=3 OR H4=4 OR
H4=5 OR H4=9,XX)*3+BACKSET(H4=6 OR H4=7 OR H4=8 OR
H4=9,XX)*6;
H5:=FLOOR(FRACPART(H0/100000)*10);H50:=BACKSET(H5=1 OR H5=4 OR
H5=7,XX)+BACKSET(H5=2 OR H5=5 OR H5=8,XX)*2+BACKSET(H5=3 OR H5=4 OR
H5=5 OR H5=9,XX)*3+BACKSET(H5=6 OR H5=7 OR H5=8 OR
H5=9,XX)*6;
H6:=FLOOR(FRACPART(H0/1000000)*10);H60:=BACKSET(H6=1 OR H6=4
OR H6=7,XX)+BACKSET(H6=2 OR H6=5 OR H6=8,XX)*2+BACKSET(H6=3 OR H6=4
OR H6=5 OR H6=9,XX)*3+BACKSET(H6=6 OR H6=7 OR H6=8 OR
H6=9,XX)*6;
H7:=FLOOR(FRACPART(H0/10000000)*10);H70:=BACKSET(H7=1 OR H7=4
OR H7=7,XX)+BACKSET(H7=2 OR H7=5 OR H7=8,XX)*2+BACKSET(H7=3 OR H7=4
OR H7=5 OR H7=9,XX)*3+BACKSET(H7=6 OR H7=7 OR H7=8 OR
H7=9,XX)*6;
H00:=H10+H20*10+H30*100+H40*1000+H50*10000+H60*100000+H70*1000000;{最高持倉}
L0:=IF(ISLASTBAR,LLV(AMOUNT,XX),0);{最低持倉}
L1:=FLOOR(FRACPART(L0/10)*10);L10:=BACKSET(L1=1 OR L1=4 OR
L1=7,XX)+BACKSET(L1=2 OR L1=5 OR L1=8,XX)*2+BACKSET(L1=3 OR L1=4 OR
L1=5 OR L1=9,XX)*3+BACKSET(L1=6 OR L1=7 OR L1=8 OR
L1=9,XX)*6;
L2:=FLOOR(FRACPART(L0/100)*10);L20:=BACKSET(L2=1 OR L2=4 OR
L2=7,XX)+BACKSET(L2=2 OR L2=5 OR L2=8,XX)*2+BACKSET(L2=3 OR L2=4 OR
L2=5 OR L2=9,XX)*3+BACKSET(L2=6 OR L2=7 OR L2=8 OR
L2=9,XX)*6;
L3:=FLOOR(FRACPART(L0/1000)*10);L30:=BACKSET(L3=1 OR L3=4 OR
L3=7,XX)+BACKSET(L3=2 OR L3=5 OR L3=8,XX)*2+BACKSET(L3=3 OR L3=4 OR
L3=5 OR L3=9,XX)*3+BACKSET(L3=6 OR L3=7 OR L3=8 OR
L3=9,XX)*6;
L4:=FLOOR(FRACPART(L0/10000)*10);L40:=BACKSET(L4=1 OR L4=4 OR
L4=7,XX)+BACKSET(L4=2 OR L4=5 OR L4=8,XX)*2+BACKSET(L4=3 OR L4=4 OR
L4=5 OR L4=9,XX)*3+BACKSET(L4=6 OR L4=7 OR L4=8 OR
L4=9,XX)*6;
L5:=FLOOR(FRACPART(L0/100000)*10);L50:=BACKSET(L5=1 OR L5=4 OR
L5=7,XX)+BACKSET(L5=2 OR L5=5 OR L5=8,XX)*2+BACKSET(L5=3 OR L5=4 OR
L5=5 OR L5=9,XX)*3+BACKSET(L5=6 OR L5=7 OR L5=8 OR
L5=9,XX)*6;
L6:=FLOOR(FRACPART(L0/1000000)*10);L60:=BACKSET(L6=1 OR L6=4
OR L6=7,XX)+BACKSET(L6=2 OR L6=5 OR L6=8,XX)*2+BACKSET(L6=3 OR L6=4
OR L6=5 OR L6=9,XX)*3+BACKSET(L6=6 OR L6=7 OR L6=8 OR
L6=9,XX)*6;
L7:=FLOOR(FRACPART(L0/10000000)*10);L70:=BACKSET(L7=1 OR L7=4
OR L7=7,XX)+BACKSET(L7=2 OR L7=5 OR L7=8,XX)*2+BACKSET(L7=3 OR L7=4
OR L7=5 OR L7=9,XX)*3+BACKSET(L7=6 OR L7=7 OR L7=8 OR
L7=9,XX)*6;
L00:=L10+L20*10+L30*100+L40*1000+L50*10000+L60*100000+L70*1000000;{最低持倉}
PARTLINE(L00>0,V00*(AMOUNT-L00)/(H00-L00)),COLOR00FF00,LINETHICK2;{畫持倉線}
STICKLINE(L00>0 AND
REF(L00=0,1),0,V00,1,0),COLOR00FF00;{畫線起點}
|
|
來自: 耀日131 > 《籌碼系統(tǒng)》