AM3:=IF(PERIOD=4,4,1/10);
AM4:=IF(PERIOD=11,1/60,AM3);
AM5:=IF(PERIOD=5,1,AM4);
AM6:=IF(PERIOD=6,1/5,AM5);
AM7:=IF(PERIOD=7,1/20,AM6);
DIF:=EMA(CLOSE,AM7*120)-EMA(CLOSE,AM7*260);
DEA:=EMA(DIF,AM7*90);
买:crOSS(DIF,DEA);
AM3:=IF(PERIOD=4,4,1/10);
AM4:=IF(PERIOD=11,1/60,AM3);
AM5:=IF(PERIOD=5,1,AM4);
AM6:=IF(PERIOD=6,1/5,AM5);
AM7:=IF(PERIOD=7,1/20,AM6);
DIF:=EMA(CLOSE,AM7*120)-EMA(CLOSE,AM7*260);
DEA:=EMA(DIF,AM7*90);
买:crOSS(DIF,DEA);