if holding<0 and HIGH=dd then SELLSHORT(1,1,LIMITR);//平空
if holding>0 and LOW=kk then sell(1,1,LIMITR);//平多
if holding=0 and HIGH=dd then buy(1,1,LIMITR);//开多
if holding=0 and LOW=kk then buyshort(1,1,LIMITR);//开空
均线会有很对小数位,开高低收原始数据是浮点型,也会存在很多小数位。
你可以使用ROUND等数学函数对其进行处理。
不是等于不行,是两个比较的数据并相等。
close实际中可能是4654.000001这种情况,均线也是一个道理
[此贴子已经被作者于2018/5/16 9:10:15编辑过]