索罗斯趋势
HH1:=IF(HIGH <REF(HIGH,2) AND REF(HIGH,1)<REF(HIGH,2),REF(HIGH,2),0);
LL1:=IF(LOW >REF(LOW,2) AND REF(LOW,1)>REF(LOW,2),REF(LOW,2),0);
HH2:=IF(HH1>0,HH1,REF(HH1,BARSLAST(HH1>0)));
LL2:=IF(LL1>0,LL1,REF(LL1,BARSLAST(LL1>0)));
K1:=IF(CLOSE>HH2,-3,IF(CLOSE<LL2,1,0));
K2:=IF(K1<0 OR K1>0,K1,REF(K1,BARSLAST(K1<0 OR K1>0)));
W1:=K2;
MA26:=MA(CLOSE,46);
HH11:=REF(HHV(C,4),1);
LL11:=REF(LLV(C,4),1);
HH21:=IF(HH11>0,HH11,REF(HH11,BARSLAST(HH11>0)));
LL21:=IF(LL11>0,LL11,REF(LL11,BARSLAST(LL11>0)));
K11:=IF(CLOSE>HH21,-3,IF(CLOSE<LL21,1,0));
K21:=IF(K11<0 OR K11>0,K11,REF(K11,BARSLAST(K11<0 OR K11>0)));
W11:=K21;
DK11:=(0>W11 AND 0>W1 OR C>MA26 AND 0>W1 OR C>MA26 AND 0>W11);
KK11:=(0<W11 AND 0<W1 OR C<MA26 AND 0<W1 OR C<MA26 AND 0<W11);
C1:=IF(DATE<REF(DATE,1) OR DATE>REF(DATE,1),REF(C,1),REF(REF(C,1),BARSLAST(DATE<REF(DATE,1) OR DATE>REF(DATE,1))));
C5:=IF(DATE<REF(DATE,1) OR DATE>REF(DATE,1),REF(C,5),REF(REF(C,5),BARSLAST(DATE<REF(DATE,1) OR DATE>REF(DATE,1))));
CF1:=MAX(C1,C5);
CF2:=MIN(C5,C1);
O1:=IF(DATE<REF(DATE,1) OR DATE>REF(DATE,1),O,REF(O,BARSLAST(DATE<REF(DATE,1) OR DATE>REF(DATE,1))));
MAH:=MA(HIGH,13);
MAL:=MA(LOW,13);
DK12:=CLOSE>=MAH;
KK12:=MAL>CLOSE;
SJTJ:=DATE<1110815;
DK:= SJTJ AND( (DK11 AND C<=6000) OR( C>O1 AND C>=CF1 AND C>6000 AND C<8000 ) OR(DK12 AND C>8000));
KK:= SJTJ AND( (KK11 AND C<=6000) OR( C<O1-10 AND C<=CF2 AND C>6000 AND C<8000 )OR(KK12 AND C>8000));
DK1:=BARSLAST(DK);
KK1:=BARSLAST(KK);
DK2:=BARSLAST(CROSS(KK1,DK1));
KK2:=BARSLAST(CROSS(DK1,KK1));
HS:=DK2<KK2;
LS:=KK2<DK2;
{分析家公式网 WWW,88GS,COM}
W2:=OPEN-CLOSE;
HT:=IF(OPEN>CLOSE,OPEN,CLOSE);
LT:=IF(OPEN<CLOSE,OPEN,CLOSE);
STICKLINE(W2>0 AND HS,OPEN,CLOSE,2.6,0),COLORRED;
STICKLINE(W2>0 AND HS,OPEN,H,0.01,0),COLORRED;
STICKLINE(W2>0 AND HS,C,L,0.01,0),COLORRED;
STICKLINE(W2<=0 AND HS,OPEN,CLOSE,2.6,1),COLORRED;
STICKLINE(W2<=0 AND HS,O,L,0.01,0),COLORRED;
STICKLINE(W2<=0 AND HS,C,H,0.01,0),COLORRED;
STICKLINE(W2>0 AND LS,OPEN,CLOSE,2.6,0),COLORCYAN;
STICKLINE(W2>0 AND LS,OPEN,H,0.01,0),COLORCYAN;
STICKLINE(W2>0 AND LS,C,L,0.01,0),COLORCYAN;
STICKLINE(W2<=0 AND LS,OPEN,CLOSE,2.6,1),COLORCYAN;
STICKLINE(W2<=0 AND LS,C,H,0.01,0),COLORCYAN;
STICKLINE(W2<=0 AND LS,O,L,0.01,0),COLORCYAN;
DRAWTEXT(HS=1 AND REF(LS,1),LOW*0.995,'开多');
DRAWTEXT(LS=1 AND REF(HS,1),H*1.005,'开空');
DXX:=C>6000 AND C<8000;
DKX:=IF(HS,MIN(CF2,O1),MAX(CF1,O1));
DRAWNUMBER(ISLASTBAR AND C>6000 AND C<8000,DKX,DKX),COLORYELLOW;
DRAWNUMBER(ISLASTBAR AND LS AND (C>8000 OR C<800),MAH,MAH),COLORYELLOW;
DRAWNUMBER(ISLASTBAR AND HS AND (C>8000 OR C<800),MAL,MAL),COLORYELLOW; |