A1 : (EMA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16))/3;
a2 : (EMA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/3;
A3 : (EMA(CLOSE,9)+MA(CLOSE,18)+MA(CLOSE,36))/3;
a4 : (EMA(CLOSE,13)+MA(CLOSE,26)+MA(CLOSE,52))/3;
a5 : (EMA(CLOSE,18)+MA(CLOSE,36)+MA(CLOSE,72))/3;
A6 : (EMA(CLOSE,24)+MA(CLOSE,48)+MA(CLOSE,96))/3;
多头:A1>A2 and A2>A3 and A3>A4 and A4>A5 and A5>A6,linethick0;
空头:A1<A2 and A2<A3 and A3<A4 and A4<A5 and A5<A6,linethick0;
//long:last(多头,19,0),linethick0;
long:=多头;
if holding=0 and time<=145000 and long then buy(1,1,thisclose);
if holding>0 and (enterprice-c)>=5 then sell(1,1,thisclose);
if holding>0 and (c-enterprice)>=20 and o-c>=2 then sell(1,1,thisclose);
if time>=151000 and holding>0 then sell(1,1,thisclose);