ma21:stkindi('','ma.ma1(21)',0,6,);
ma13:stkindi('','ma.ma1(13)',0,6,);
ma55:stkindi('','ma.ma1(55)',0,6);
ma144:stkindi('','ma.ma1(144)',0,6);
b13:=(c-ma13)<c*0.015;
b21:=(c-ma21)<c*0.015;
b55:=(c-ma55)<c*0.015;
b144:=(c-ma144)<c*0.015;
s13:=(ma13-c)<c*0.015;
s21:=(ma21-c)<c*0.015;
s55:=(ma55-c)<c*0.015;
s144:=(ma144-c)<c*0.015;
bt:=b21 or b13 or b55 or b144;
ct:=s13 or s21 or s55 or s144;
if bt then buy(holding=0,1,market);
if ct then buyshort(holding=0,1,market);
我想实现5分钟图上价格在上方接近日图13日均线,21日均线,55日均线,144日均线的1.5%,开仓买入
反之开空,这样写对吗
平仓条件是别的条件,我就想问问这个开仓条件符合我的意图吗,怎么我在图表测试上有一些买入信号跑到线下面去了
b13:=(c-ma13)<c*0.015;
感觉是
b13:= c-ma13>ma13*0.015