以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  这些条件帮忙写一个图表程序化交易程序  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=98000)

--  作者:FACAI123456
--  发布时间:2016/5/30 16:29:30
--  这些条件帮忙写一个图表程序化交易程序
多头开仓条件;Ma300>Ma900 and Ma5>Ma60 and Ma10>Ma60 and Ma20>Ma60 
多头平仓条件;L<ma100 

空头开仓条件;Ma300<Ma900 and Ma5<Ma60 and Ma10<Ma60 and Ma20<Ma60 
空头平仓条件;L>ma100 

--  作者:jinzhe
--  发布时间:2016/5/30 16:43:18
--  

if 多头开仓条件 then buy(holding=0,1,marketr);

if 多头平仓条件 then sell(1,0,marketr);

 

if 空头开仓条件 then buyshort(holding=0,1,marketr);

if 空头平仓条件 then sellshrot(1,0,marketr);


--  作者:FACAI123456
--  发布时间:2016/5/30 17:21:34
--  
图片点击可在新窗口打开查看有问题,marketr控制符只能用在交易系统中

--  作者:jinzhe
--  发布时间:2016/5/30 17:29:20
--  

if 多头开仓条件 then buy(holding=0,1,marketr);

if 多头平仓条件 then sell(1,0,marketr);

 

if 空头开仓条件 then buyshort(holding=0,1,marketr);

if 空头平仓条件 then sellshort(1,0,marketr);

 

上面有拼写错误,不好意思,现在已经改正