//------------------------------------------------------------------------
// 简称: DualMA
// 名称: 双均线交易系统
// 类别: 公式应用
// 类型: 内建应用
//------------------------------------------------------------------------
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
//------------------------------------------------------------------------
// 编译版本 GS2010.12.08
// 版权所有 TradeBlazer Software 2003-2010
// 更改声明 TradeBlazer Software保留对TradeBlazer平
// 台每一版本的TradeBlazer公式修改和重写的权利
//------------------------------------------------------------------------
文章为转载互联网文章,其仅供参考,并不构成投资建议。
如有需要,请加QQ:99515681 或邮箱:99515681@qq.com
微信:codinghelp