ma4:stkindi('',ma(close,42),0,11);
sell(c<ma4 and holding>0,0,market);
buyshort(close<ma4 and holding=0,1,market);
sellshort(c>ma4 and holding<0,0,market);
buy(close>ma4 and holding=0,1,market);
以上程序问题出在哪?
平仓数量上怎么会是 0 .
ma4:stkindi('','ma.MA1',0,11);//加上一对单引号,然后在MA公式里面把MA1的参数改成42
sell(c<ma4 and holding>0,0,market);
buyshort(close<ma4 and holding=0,1,market);
sellshort(c>ma4 and holding<0,0,market);
buy(close>ma4 and holding=0,1,market);
引用昨日当前品种的收盘价呢?
zclose:"close##day";这样对吗?
1.参考问题39
http://www.weistock.com/bbs/dispbbs.asp?boardid=2&Id=49
2.或参考函数
CALLSTOCK('if08',VTCLOSE ,6 , -1);//红色改外想引用的品种代码
c2:"if08$close##day";
品种可以改
CALLSTOCK('if08',VTCLOSE ,6 , -1);
c2:"if08$close##day"; |
这两条程序可以不指定品种吗?可以的话要怎么该呢?或者还有别的办法。
我的意图是想同一策略监控多个产品的