随便搞的,应该有点作用的,主要缺点是太迟钝,准确率低,可以看看哦
月线:MA(C,60);
年线:EMA(C,250),;
买线:EMA(C,5),;
卖线:EMA(SLOPE(C,21)*20+C,42),;
BUY1:=CROSS(买线,卖线);
SEL1:=CROSS(卖线,买线);
DRAWTEXT(buy1,LOW*0.95,'B '),;
DRAWTEXT(sel1,HIGH*1.05,'S'),;
限制:=EMA((((H+C)/2+L+(C+L)/2)/3-EMA(LLV(((H+C)/2+L+(C+L)/2)/3,89),2))/(EMA(HHV (((H+C)/2+L+(C+L)/2)/3,21),2)-EMA(LLV(((H+C)/2+L+(C+L)/2)/3,89),2)),8)*100;
平衡:=SMA(EMA(SMA((C+L)/2,3,1),3),5,1);
DRAWTEXT(FILTER(平衡>REF(平衡,1)AND HHV(MA((H+C)/2,13),10)REF((C+L)/2,1),5)AND 限制<88,L*0.98,' ------'),colorcyan;
TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
DMP:= SUM(IF(HD>0 AND HD>LD,HD,0),N);
DMM:= SUM(IF(LD>0 AND LD>HD,LD,0),N);
pDI:=DMP*100/TR;
mDI:=DMM*100/TR;
IF (CROSS(PDI,MDI))
BUY;