drawtext(high>ref(high,1) and high>ref(high,2) and h>refx(&high,1) ,h*1.01,'▲'),colorred;drawtext(l<ref(l,1) and l<ref(l,2) and l<refx(&low,1) ,l,'▼'),color00ff00;cc:...
{假设阴线幅度>7%,根据需要修改} dyx:=(c-o)/ref(c,1)*100;days:=barslast(dyx);mid:=(ref(c,days)+ref(o,days))/2;欲反包:days>1 and days< 5 and c >mid and count(c>mid,days)=1;
a1:=hhv(c,1800)>llv(c,1800)*1.6 and llv(c,1800)*2<hhv(c,1800) and count(c/ref(c,1)>0.098,100)>=1 and barscount(close)>600 ;a2:= (c-ma(c,200))/ma(c,200)<0.2 { 相对于200天线正乖离小于20%...
if:=ema(close,12)-ema(close,26);dea:=ema(dif,9);macd:=(dif-dea)*2; typ:=(high+low+close)/3;cci:=(typ-ma(typ,14))/(0.015***edev(typ,14));xg:cross(cci,100) and range(macd,-0.1,0.1);