UP商品4号-T+0
副图
默认周期:5分钟
周期锁定:=1;
开仓时间:=(TIME>090000 AND
20226241184269806.png
TIME<154500 ) OR (TIME>190000 AND TIME<215000);
平仓时间:=TIME>155400 OR TIME>220000;
Y:=(H+L)/2;
BLUE:=SMA(Y,13,1);
RED:=SMA(Y,2.5,1);
GREEN:=SMA(Y,5,1);
B2:=REF(BLUE,8);
R2:=REF(RED,5);
G2:=REF(GREEN,3);
KU1:=IFF(H==HHV(H,3) AND C>RED,1,0);
KD1:=IFF(L==LLV(L,3) AND L<RED,1,0);
UL:=IFF(REF(KU1,2)==1 AND REF(KU1,1)==0 AND KU1==0,REF(H,2),REF(H,2+BARSLAST(REF(KU1,2)==1 AND REF(KU1,1)==0 AND KU1==0)));
DL:=IFF(REF(KD1,2)==1 AND REF(KD1,1)==0 AND KD1==0,REF(L,2),REF(L,2+BARSLAST(REF(KD1,2)==1 AND REF(KD1,1)==0 AND KD1==0)));
KU:=IFF(C>B2 AND C>R2 AND C>G2,1,0);
KD2:=IFF(C<B2 AND C<R2 AND C<G2,-1,0);
KK:=IFF(BARSLAST(KU==1 AND REF(KU,1)==0)<BARSLAST(KD2==-1 AND REF(KD2,1)==0),1,-1);
AO:=MA(Y ,5 )-MA(Y ,34 );
AC:=AO-MA( AO,5);
AC1:=REF(AC,1);
AO1:=REF(AO,1);
KAC:=IFF(AC>AC1 AND AO>AO1,1,0);
KAO:=IFF(AC<AC1 AND AO<AO1,-1,0);
蓝:=SMA(Y,13,1),COLORBLUE;
红:=SMA(Y,2.5,1),COLORRED;
绿:=SMA(Y,5,1),COLORGREEN;
压力:=IFF(H>=R2,UL,REF(UL,BARSLAST(H>R2))),COLORMAGENTA;
支撑:=IFF(L<=R2,DL,REF(DL,BARSLAST(L<=R2))),COLORCYAN;
OL:=(170*MA(Y,5)-170*MA(Y,34)+165*MA(Y,33)-136*MA(Y,4))/29;
CL:=(165*MA(Y,33)-136*MA(Y,4)+170*(4*MA(AO,4)+5*(REF(AO,4)-MA(REF(AO,4),5)))/4)/29;
H1:=REF(H,4);
H2:=REF(H,3);
H3:=REF(H,2);
H4:=REF(H,1);
H5:=H;
L1:=REF(L,4);
L2:=REF(L,3);
L3:=REF(L,2);
L4:=REF(L,1);
L5:=L;
DU0:=CROSS(AO,0);
UD0:=CROSS(0,AO);
TDU0:=BARSLAST(DU0);
TUD0:=BARSLAST(UD0);
DU3:=REF(DU0,1);
UD3:=REF(UD0,1);
TDU3:=BARSLAST(DU3);
TUD3:=BARSLAST(UD3);
多空线:=IFF(TDU3<TUD3,REF(HHV(H,2),TDU3),REF(LLV(L,2),TUD3)),COLORYELLOW;
做多:=C>压力 AND C>多空线 AND C>O AND 开仓时间;
做空:=C<支撑 AND C<多空线 AND C<O AND 开仓时间;
平多:=C<支撑 OR 平仓时间 ;
平空:=C>压力 OR 平仓时间;
买入:=TFILTER(做多,平多,1);
卖出:=TFILTER(做空,平空,1);
多平:=TFILTER(平多,做多,1);
空平:=TFILTER(平空,做空,1);
STICKLINE(周期锁定,-30,-30,100,0),COLOR000000;
STICKLINE(周期锁定,100,100,100,0),COLOR000000;
STICKLINE(周期锁定,0,2,300,0),COLORRED;
STICKLINE(周期锁定,100,98,100,0),COLORFFFF00;
STICKLINE(周期锁定 AND (买入 OR 空平),0,30,2,0),COLORRED;
STICKLINE(周期锁定 AND (卖出 OR 多平),100,70,2,0),COLORFFFF00;
WZLONG:=IFF(PERIOD==3,260,IFF(PERIOD==2,520,DRAWNULL));
WZSHORT:=IFF(PERIOD==3,65,IFF(PERIOD==2,130,IFF(PERIOD==1,260,IFF(PERIOD==0,780,DRAWNULL))));
UP短线:=IFF(IFF(BETWEEN(PERIOD,0,3),1,0),EMA(100*(C-LLV(LOW,WZSHORT))/(HHV(H,WZSHORT)-LLV(LOW,WZSHORT)),3),DRAWNULL),COLORRED;
最近超跌:=EXIST(UP短线<10,12) OR EXIST(UP短线>90,10),NODRAW;
开多:=买入 AND 最近超跌;
最近超涨:=EXIST(UP短线>90,12) OR EXIST(UP短线<10,10),NODRAW;
开空:=卖出 AND 最近超涨;
DRAWICON(开多 AND 周期锁定,0,82);
DRAWICON(开空 AND 周期锁定,130,83);
开多仓:IFF(买入 AND 空平==0 AND 周期锁定,100,DRAWNULL),COLORRED;
开空仓:IFF(卖出 AND 多平==0 AND 周期锁定,100,DRAWNULL),COLORFFFF00;
平多仓:IFF(卖出==0 AND 多平 AND 周期锁定,100,DRAWNULL),COLORYELLOW;
平空仓:IFF(买入==0 AND 空平 AND 周期锁定,100,DRAWNULL),COLORYELLOW;
平多仓开空仓:IFF(多平 AND 卖出 AND 周期锁定,100,DRAWNULL),COLORFFFF00;
平空仓开多仓:IFF(空平 AND 买入 AND 周期锁定,100,DRAWNULL),COLORRED;
仅限5分钟用:IFF(周期锁定!=1,1,DRAWNULL),NODRAW,COLORWHITE;
20226241185173460.png
|