代写选股公式、TB程序化交易系统、通达信选股公式代写

//------------------------------------------------------------------------
// 简称: 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 或邮箱:[email protected]
微信:codinghelp

猜你喜欢

转载自www.cnblogs.com/TBCode/p/9231147.html