公式应用于5分钟k线图
先把系统自带的macd公式抄过来,然后写下面的代码:
d1:=stkindi('','macd.diff',0,1);
d2:=stkindi('','macd.dea',0,1);
if cross(diff,dea) then buy(holding=0,1,market);
if cross(dea,diff) then buyshort(holding=0,1,market);
if cross(d2,d1) then sell(1,0,market);
if cross(d1,d2) then sellshort(1,0,market);
http://www.weistock.com/WeisoftHelp/tubiaochengshihuajiaoyi.htm
参考链接里面的“开始图表程式化交易”