设为首页收藏本站

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

这个日内交易程序怎么样?请大家多多抛砖引玉! [复制链接]

Rank: 1

精华
0
UID
25346
积分
17
帖子
1
主题
1
阅读权限
10
注册时间
2011-2-5
最后登录
2011-6-26
跳转到指定楼层
1#
发表于 2011-5-30 15:11:47 |只看该作者 |倒序浏览
Vars
Numeric maxLots(2);//最大开仓手数
Begin

//开仓条件
if (CurrentTime==0.0001*905 && Q_BidPrice>Q_AvgPrice && Abs(CurrentContracts)<=Maxlots) Buy(1,Q_AskPrice);
if (CurrentTime==0.0001*905 && Q_BidPrice<Q_AvgPrice&& Abs(CurrentContracts)<=Maxlots) SellShort(1,Q_BidPrice);

if (CurrentTime>0.0001*910 && CurrentTime>=0.0001*1445 && Q_BidPrice>=Q_High && Abs(CurrentContracts)<=Maxlots) Buy(1,q_askprice);
if (CurrentTime>0.0001*910 && CurrentTime>=0.0001*1445 && Q_BidPrice<=Q_Low && Abs(CurrentContracts)<=Maxlots) SellShort(1,Q_BidPrice);

//止损条件

if (MarketPosition==1 and Q_BidPrice<Q_AvgPrice) sell(0,Q_BidPrice);//多头下破均线止损
if (MarketPosition==-1 and Q_BidPrice>Q_AvgPrice) BuyToCover(0,Q_AskPrice);//空头上破均线止损

//止赢条件
if (MarketPosition==1  && MaxPositionProfit>100 And 0.7*MaxPositionProfit<A_PositionProfitLoss) sell(0,Q_BidPrice);
if (MarketPosition==-1  && MaxPositionProfit>100 And 0.7*MaxPositionProfit<A_PositionProfitLoss) BuyToCover(0,Q_AskPrice);

//尾盘平仓
if (CurrentTime>=0.0001*1459 && MarketPosition==1) sell(0,Q_BidPrice);Else if (MarketPosition==-1) BuyToCover(0,Q_AskPrice);

End

Rank: 1

精华
0
UID
49394
积分
34
帖子
21
主题
0
阅读权限
10
注册时间
2011-6-24
最后登录
2021-3-8
2#
发表于 2011-7-8 10:54:02 |只看该作者
此帖仅作者可见

使用道具 举报

Rank: 4

精华
0
UID
26116
积分
377
帖子
84
主题
15
阅读权限
50
注册时间
2011-2-18
最后登录
2015-8-26
3#
发表于 2011-7-11 13:14:33 |只看该作者
此帖仅作者可见

使用道具 举报

Rank: 5Rank: 5

精华
0
UID
24835
积分
910
帖子
94
主题
6
阅读权限
60
注册时间
2011-1-25
最后登录
2022-2-24
4#
发表于 2011-12-5 22:52:08 |只看该作者
此帖仅作者可见
国际期货张永龙

使用道具 举报

Rank: 5Rank: 5

精华
0
UID
24835
积分
910
帖子
94
主题
6
阅读权限
60
注册时间
2011-1-25
最后登录
2022-2-24
5#
发表于 2011-12-5 23:17:20 |只看该作者
此帖仅作者可见
国际期货张永龙

使用道具 举报

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

bottom

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

GMT+8, 2024-5-18 15:19

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部