箱体红绿灯
源码如下:
箱顶:PEAK(CLOSE,20,1)*0.98;
箱底:TROUGH(CLOSE,20,1)*1.02;
箱高:100*(箱顶-箱底)/箱底,NODRAW;
{HLD}
RSV:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=((3 * K) - (2 * D));
X1:=(((((3 * CLOSE) + HIGH) + LOW) + OPEN) / 6);
X2:=EMA(X1,10);
AA10:MA(CLOSE,8),COLORYELLOW ,NODRAW;
RSV24:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);
K24:=SMA(RSV24,3,1);
D24:=SMA(K24,3,1);
J24:=((3 * K24) - (2 * D24));
VARD:=((((OPEN + LOW) + HIGH) + CLOSE) / 4);
Ö§³Å:EMA(VARD,5),NODRAW;
¾ùÏß:MA(CLOSE,16),NODRAW;
×èµ²:=(SMA(HIGH,21,2) * 1.05);
A:=(3*C+L+O+H)/6;
B:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210;
{STICKLINE(B>REF(B,1),REF(B,1),B,4,0),COLORYELLOW;
STICKLINE(B<=REF(B,1),REF(B,1),B,4,0),COLORGREEN;}
MA3:=MA(C,3),NODRAW;
MA13:=MA(C,13),COLORGREEN,NODRAW;
IF(MA13>REF(MA13,1),MA13,DRAWNULL),COLORRED,NODRAW;
IF(MA13<REF(MA13,1),MA13,DRAWNULL),COLORYELLOW,NODRAW;
DRAWICON(C>MA3 AND C>MA13 AND MA13>REF(MA13,1)
AND REF(C,1)<MA13,L*0.99,9);
VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14)))),NODRAW;
VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
DIR1:=ABS(CLOSE-REF(CLOSE,5));
VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
ER1:=DIR1/VIR1;
CS1:=ER1*(0.8-2/8)+2/8;
CQ1:=CS1*CS1;
DIR2:=ABS(CLOSE-REF(CLOSE,10));
VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);
ER2:=DIR2/VIR2;
CS2:=ER2*(0.8-2/24)+2/24;
CQ2:=CS2*CS2;
STICKLINE(VAR2 < MA(VAR3,8),LOW,HIGH,0,1),COLORBLUE;
STICKLINE(VAR2 > MA(VAR3,8),LOW,HIGH,0,1),COLORRED;
STICKLINE(((OPEN>CLOSE)AND(VAR2<MA(VAR3,6))),(CLOSE-0.03),OPEN,3,0),COLORBLUE;
STICKLINE(((OPEN<CLOSE)AND(VAR2<MA(VAR3,6))),CLOSE,OPEN,3,1),COLORBLUE;
STICKLINE(((OPEN>CLOSE)AND(VAR2>MA(VAR3,6))),OPEN,(CLOSE-0.03),3,0),COLORRED;
STICKLINE(((OPEN<CLOSE)AND(VAR2>MA(VAR3,6))),OPEN,CLOSE,3,1),COLORRED;
DRAWICON(CROSS(VAR2,MA(VAR3,6)),(LOW - (LOW*0.02)),7);
DRAWICON(CROSS(MA(VAR3,6),VAR1),(HIGH+(HIGH*0.02)),8);
MA30:EMA(CLOSE,30),COLORGREEN; |