设为首页收藏本站

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

求版主改进一下 [复制链接]

Rank: 1

精华
0
UID
240634
积分
8
帖子
6
主题
2
阅读权限
10
注册时间
2016-9-19
最后登录
2018-6-15
跳转到指定楼层
1#
发表于 2016-10-20 10:09:28 |只看该作者 |倒序浏览
Params
Numeric length(20);
Numeric lots(0);
Numeric huadian(3);
Numeric zsysg(50);
Numeric zsyxg(3);
Vars
Numeric bofu;
NumericSeries ma1;
NumericSeries ma2;
NumericSeries ma3;
NumericSeries ma4;
NumericSeries xian;
Begin
bofu=high[1]-low[1];
ma2=AverageFC(close[1],length);
ma1=AverageFC(ma2+bofu);
ma3=AverageFC(ma2-bofu);
PlotNumeric("ma1",ma1);
PlotNumeric("ma2",ma2);
PlotNumeric("ma3",ma3);
xian=length;
if(close[1]>=close[2])xian=xian-1;
if(close[1]<Close[2])xian=xian+1;
xian=max(xian,zsyxg);
xian=min(xian,zsysg);
ma4=Average(close,xian);
PlotNumeric("ma4",ma4);
if(!CallAuctionFilter())Return;
if(close[1]>=ma1[1]*1.002)
{
buy(lots,max(open*1.003+huadian*MinMove*PriceScale,ma1*1.003+huadian*MinMove*PriceScale));
}
if(MarketPosition==1 AND BarsSinceEntry>=1)
{
if(close[1]<=ma4[1])
{
sell(lots,min(open*0.998-huadian*MinMove*PriceScale,ma4*0.998-huadian*MinMove*PriceScale));
}
}
if(close[1]<=ma3[1]*0.998)
{
SellShort(lots,min(open*0.997-huadian*MinMove*PriceScale,ma3*0.997-huadian*MinMove*PriceScale));
}
if(MarketPosition==-1 AND BarsSinceEntry>=1)
{
if(close[1]>=ma4[1])
{
BuyToCover(lots,max(open*1.002+huadian*MinMove*PriceScale,ma4*1.002+huadian*MinMove*PriceScale));
}
}
End
您需要登录后才可以回帖 登录 | 注册

bottom

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

GMT+8, 2024-5-23 01:40

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部