两者都写一下 我学习下
日线:
atr:=stkindi('','atr.atr',0,datatype);
if c<enterprice-atr then sell(1,0,thisclose);
if c>enterprice+3*atr then sell(1,0,thisclose);
if enterbars>5 then sell(1,0,thisclose);
分钟:
分钟线上你要手工算一下一天有多少根k线,假设一天有ss根当前周期的k线
atr:=stkindi('','atr.atr',0,datatype);
if c<enterprice-atr then sell(1,0,thisclose);
if c>enterprice+3*atr then sell(1,0,thisclose);
if enterbars>ss*5 then sell(1,0,thisclose);