设为首页收藏本站

 找回密码
 注册
查看: 3952|回复: 0
打印 上一主题 下一主题

请老师帮忙写模型 [复制链接]

Rank: 5Rank: 5

精华
1
UID
42516
积分
1239
帖子
264
主题
31
阅读权限
60
注册时间
2011-5-25
最后登录
2014-9-23
1#
发表于 2012-6-27 09:59:56 |显示全部楼层
Pamars
Numeric Short(10);
Numeric Long(20);
Numeric Length(80);
Numeric Lots(1);
Var
NumericSeries Ma10;
NumericSeries Ma20;
NumericSeries Ma80;


Begin
Ma10=Average(Shrot,Close);
Ma20=Average(Long,Close);
Ma80=Average(Length,Close);
If(Marketsition!=1 && Ma10[1]>Ma10[2] && Ma20[1]>Ma20[2] && Close[1]>Ma80[1])
Buy(Lots,Open);
If(Marketsition=1 && Ma10[1]<Ma10[2]&& Ma20[1]<Ma20[2])
Sell(Lots,Open);

If(Marketsition!=-1 && Ma10[1]<Ma10[2] && Ma20[1]<Ma20[2] && Close[1]<Ma80[1])
SellShort(Lots,Open);
If(Marketsition=-1 && Ma10[1]>Ma10[2]&& Ma20[1]>Ma20[2])
BuytoCover(Lots,Open);

End

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

bottom

静态版|手机版|联系我们|交易开拓者 ( 粤ICP备07044698   

GMT+8, 2024-5-19 02:35

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部