一、量化波段王-主圖指標
永久日:=1221212;
永久:=IF(DATE<永久日,1,DRAWNULL);
STEP1:=15/20*永久;
MVALUE1:=40/8*永久;
SARLINE:=SAR(3,STEP1,MVALUE1)*永久;
A:IF(CLOSE>SARLINE,SARLINE,DRAWNULL)*永久,CIRCLEDOT,COLORRED;
B:IF(CLOSE<SARLINE,SARLINE,DRAWNULL)*永久,CIRCLEDOT,COLORGREEN;
DRAWTEXT(CROSS(C,SARLINE),L-0.05*L,'。')*永久,COLORRED;
DRAWTEXT(CROSS(SARLINE,C),H+0.05*H,'。')*永久,COLORGREEN;
STICKLINE(C>SAR(3,STEP1,MVALUE1) AND C<O,C,O,2.8,0)*永久,COLORRED;
STICKLINE(C>SAR(3,STEP1,MVALUE1) AND C>O,C,O,2.8,1)*永久,COLORRED;
STICKLINE(C>SAR(3,STEP1,MVALUE1),H,MAX(C,O),0,0)*永久,COLORRED;
STICKLINE(C>SAR(3,STEP1,MVALUE1),L,MIN(C,O),0,0)*永久,COLORRED;
STICKLINE(C<SAR(3,STEP1,MVALUE1) AND C<O,C,O,2.8,0)*永久,COLORGREEN;
STICKLINE(C<SAR(3,STEP1,MVALUE1) AND C>O,C,O,2.8,1)*永久,COLORGREEN;
STICKLINE(C<SAR(3,STEP1,MVALUE1),H,MAX(C,O),0,0),COLORGREEN;
STICKLINE(C<SAR(3,STEP1,MVALUE1),L,MIN(C,O),0,0),COLORGREEN;
Z1:=STRCAT(DYBLOCK,'');
Z2:=STRCAT(Z1,HYBLOCK);
Z3:=STRCAT(Z2,'');
DRAWTEXT_FIX(ISLASTBAR,0.70,1,0,STRCAT(Z3,GNBLOCK)),COLORYELLOW;
ZTZ1:=CONST(ZTPRICE(REF(C,1),0.1));
ZTZ:=CON2STR(ZTZ1,2);
N:=2;
T0:IF(CURRBARSCOUNT<=N+6 AND CURRBARSCOUNT>2,CONST(ZTZ1),DRAWNULL),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=3,T0,ZTZ),COLORGREEN;
放下邊市值:=STRCAT(STRCAT('流通市值:',CON2STR((CAPITAL/1000000)*C,2)),'億');
二、量化資金流向-副圖指標
永久日:=1221212;
永久:=IF(DATE<永久日,1,DRAWNULL);
DY11:=(2*CLOSE+HIGH+LOW)/4*永久;
DY22:=LLV(LOW,34)*永久;
DY33:=HHV(HIGH,34)*永久;
A11:=EMA((DY11-DY22)/(DY33-DY22)*100,9)*永久;
B11:=EMA(0.667*REF(A11,1)+0.333*A11,2)*永久;
多頭:EMA((DY11-DY22)/(DY33-DY22)*100,30)*永久,COLORRED;
空頭:EMA(多頭,5)*永久,COLORGREEN;
STICKLINE(空頭>=A11,空頭,A11,1,0)*永久,COLORGREEN;
STICKLINE(空頭>=A11,B11,多頭,0,0)*永久,COLORGREEN;
STICKLINE(空頭<=A11,空頭,A11,1,0)*永久,COLORRED;
STICKLINE(空頭<=A11,B11,多頭,0,0)*永久,COLORRED;
三、量化偵察兵-副圖指標
永久日:=1221212;
永久:=IF(DATE<永久日,1,DRAWNULL);
主力持倉:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3)*永久,COLORMAGENTA,LINETHICK2;
警戒線: 80*永久,COLORYELLOW;
XIAO1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1)*永久;
XIAO2:=SMA(ABS(LOW-XIAO1),13,1)/SMA(MAX(LOW-XIAO1,0),10,1)*永久;
XIAO3:=EMA(XIAO2,10)*永久;
XIAO4:=LLV(LOW,33)*永久;
XIAO5:=EMA(IF(LOW<=XIAO4,XIAO3,0),3)*永久;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,3,0 )*永久,COLOR000055;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,2.6,0 )*永久,COLOR000077;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,2.1,0 )*永久,COLOR000099;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,1.5,0 )*永久,COLOR0000BB;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,0.9,0 )*永久,COLOR0000DD;
STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,0.3,0 )*永久,COLOR0000FF;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,3,0)*永久,COLOR005500;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,2.6,0)*永久,COLOR007700;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,2.1,0)*永久,COLOR009900;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,1.5,0)*永久,COLOR00BB00;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,0.9,0)*永久,COLOR00DD00;
STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,0.3,0)*永久,COLOR00FF00;
主力出沒:IF(XIAO5>REF(XIAO5,1),XIAO5,0)*永久,COLORRED,NODRAW;
洗盤:IF(XIAO5<REF(XIAO5,1),XIAO5,0)*永久,COLORGREEN,NODRAW;
VAR1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2))*永久;
VARD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2))*永久;
VARE:=(REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VARF:=(REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR10:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR11:=(REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR12:=(REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR13:=(REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR14:=(REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR15:=(REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR16:=(REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR17:=(REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2))*永久;
VAR18:=(REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2))*永久;
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26)*永久;
DEA:=EMA(DIFF,9)*永久,COLORFFFF00;
MACD:=(DIFF-DEA)*2*永久;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1))*永久;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1))*永久;
底背離:=REF(CLOSE,A1+1)>CLOSE AND DIFF> REF(DIFF,A1+1) AND CROSS(DIFF,DEA)*永久;
頂背離:=REF(CLOSE,A2+1)< CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF)*永久;
④:IF(底背離,57,0),LINETHICK3,COLORBROWN;
DRAWTEXT(底背離,15,'←MACD 底背離')*永久,COLORWHITE;
DRAWTEXT(頂背離,70,'←MACD 頂背離'),COLORGREEN;
聯(lián)系客服