设为首页收藏本站

 找回密码
 注册
查看: 1822|回复: 0

请问这个系统信号为什么会消失的呢 [复制链接]

Rank: 1

精华
0
UID
256662
积分
2
帖子
1
主题
1
阅读权限
10
注册时间
2017-9-8
最后登录
2018-7-19
发表于 2017-9-20 17:08:24 |显示全部楼层
请问第一个双均线系统,为什么会有讯号消失的情况呢?跟第二个有什么区别吗

Params
Numeric length1(5);
Numeric length2(20);

Vars
NumericSeries firstline;
NumericSeries secondline;
BoolSeries buycon;
BoolSeries sellcon;


Begin
        // 集合竞价和小节休息过滤
        If(!CallAuctionFilter()) Return;
       
       
        firstline=Average(close,length1);
        secondline=Average(close,length2);
        buycon=firstline>secondline ;
        sellcon=firstline<secondline ;
        if (marketposition!=1 and buycon[1] and vol>0) Buy(1,open);
        if(marketposition!=-1 and sellcon[1] and vol>0)sellshort(1,open);


end







-----------------------------------系统自带双均线--------------------------------------------------------------
        Numeric FastLength(5);
        Numeric SlowLength(20);
Vars
        NumericSeries AvgValue1;
        NumericSeries AvgValue2;
Begin
        AvgValue1 = AverageFC(Close,FastLength);
        AvgValue2 = AverageFC(Close,SlowLength);

        PlotNumeric("MA1",AvgValue1);
        PlotNumeric("MA2",AvgValue2);               
       
        // 集合竞价和小节休息过滤
        If(!CallAuctionFilter()) Return;
       
        If(MarketPosition <>1 && AvgValue1[1] > AvgValue2[1])
        {
                Buy(1,Open);
        }
       
        If(MarketPosition <>-1 && AvgValue1[1] < AvgValue2[1])
        {
                SellShort(1,Open);
        }
        //PlotNumeric("PL",Portfolio_TotalProfit);       
End



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

bottom

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

GMT+8, 2024-3-29 01:02

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部