JJ:=(CLOSE+HIGH+LOW)/3;
A:=EMA(JJ,7);
B:=REF(A,1);
持股:STICKLINE(A>B,A*0.999,B*0.999,3,0),COLORMAGENTA ;
空: STICKLINE(A
JJ1:=(CLOSE+HIGH+LOW)/3;
AV1:=EMA(JJ1,40);
BV1:=REF(AV1,1);
持股1:STICKLINE(AV1>BV1,AV1 ,BV1*2-AV1 ,3,0),COLOR00FFFF;
空1:STICKLINE(AV1
LL:=(6*L+5*REF(L,1)+4*REF(L,2)+3*REF(L,3)+2*REF(L,4)+REF(L,5))/21;
A1:=IF(C>REF(EXPMEMA(H,6),1),1,0);
A2:=IF(C
A3:=A1+A2;
A4:=IF(A3=0,REF(A3,BArslAST(NOT(A3=0))),A3);
转折线:=IF(A4=-1,MA(HIGH,6),MA(LOW,6))LINETHICK2,COLORFFFFFF;
持仓:IF(CLOSE>=SAR(4,2,20),sar(4,2,20),DRAWNULL),CIRCLEDOT,COLORRED,{COLOR9955FF};
空仓:IF(CLOSE<=SAR(4,2,20),SAR(4,2,20),DRAWNULL),CIRCLEDOT,COLORGREEN,{COLORddfF00};
STICKLINE(C/REF(C,1)>1.095,O,C,1.5,0),COLORYELLOW;
{空头转多头:IF(A4=-1,MA(HIGH,6),MA(LOW,6))LINETHICK2,COLORRED;
多头转空头:IF(空头转多头<=REF(空头转多头,1),空头转多头,DRAWNULL)LINETHICK3,COLORGREEN;}
XG:=(REF(MA(C,30),1)>REF(MA(C,30),2)) ;
H15:=REF(HHV(H,30),1)>REF(HHV(H,30),30);
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(Abs(A7),6),6);
买:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND crOSS(A8,MA(A8,2));
DRAWTEXT(FILTER(买 AND XG AND H15,5),LOW-0.05,'↖买进'),COLORYELLOW;
多方趋势:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1),2,1);
天线:=78.89;
STICKLINE(CROSS(天线,多方趋势),REF(HHV(H,8),1),H*1.001,3,0),COLORYELLOW;
DRAWTEXT(CROSS(天线,多方趋势) ,REF(HHV(H,8),1),'↙逃顶'),COLOR00FF00;