Params
        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