P1:=5; P2:=13;P3:=34 ;G:=300;
CYC1:0.01*EMA(AMOUNT,P1)/EMA(VOL,P1);
CYC2:0.01*EMA(AMOUNT,P2)/EMA(VOL,P2);
CYC3:0.01*EMA(AMOUNT,P3)/EMA(VOL,P3);
CYC :DMA(AMOUNT/(100*VOL),VOL/(100*FINANCE(7)));
大盘:INDEXC/(EMA(INDEXC,G)/EMA(C,G)),COLORRED;
DRAWTEXT(FILTER(CROSS(C,COST(1)*1.1),7),L*0.98,'盈亏临界'),COLORYELLOW;
{周线寻马}
EMA7:=EMA(C,7),COLOR00FF00;
EMA14:=EMA(C,14),COLORWHITE;
EMA21:=EMA(C,21),COLORYELLOW;
ZMA7:=EMA(C,35),COLORFF00FF;
ZMA14:=EMA(C,70),COLORFFCCCC;
ZMA34:=EMA(C,170),COLORFFCC66;
VV0:=BARSLAST(CROSS(ZMA7,ZMA14) AND ZMA7 ZMA14);
VV1:=VV0 AND BARSLAST(CROSS(ZMA7,ZMA34));
VV2:=VV1 AND CROSS(ZMA14,ZMA34);
DRAWTEXT(VV2,L*0.97,'周线波一'),COLORYELLOW;
VV3:=ZMA7 ZMA34 AND ZMA14 ZMA34;
VV4:=VV3 AND CROSS(ZMA7,ZMA14);
DRAWTEXT(VV4,L*0.95,'周线波二'),COLORRED;
周线买点:=VV2 OR VV4;
MA1:=MA(C,60);
MA2:=MA(C,120);
C1:=(3*C+O+L+H)/6;
C2:=MAX(MA1,MA2);
C3:=MIN(MA1,MA2);
牛熊:=IF(C1 C2,1,IF(C1 C3,0.6,IF(C1 C3 AND C1 C2,0.8,0))),COLORRED,NODRAW;{2+3区间,返回1;2-3区间,返回0.6;2 3区间,返回0.8}
SCTJ:=IF(牛熊=1,100,IF(牛熊=0.8,80,IF(牛熊=0.6,60,0)));
DRAWTEXT_FIX(1,0,0,0,IF(SCTJ=100,'■2+3区间,安全系数100',IF(SCTJ=80,'■2 3区间,安全系数80',IF(SCTJ=60,'■2-3区间,安全系数60',DRAWNULL)))),COLORYELLOW;