请帮助把这个策略修改成能在金字塔上使用的策略 Params NumericLength1(5); NumericLength2(100); NumericLength3(21); Vars NumericSeriesMA1; NumericSeriesMA2; NumericSeriesMA3; BoolBuyCondition; BoolSellShortCondition; BoolSellCondition; BoolBuyToCoverCondition; Begin MA1= AverageFC(Close,Length1); MA2= AverageFC(Close,Length2); MA3= AverageFC(Close,Length3); If(MarketPosition == 0 And Close[2]<MA2And Close[1]>MA2) Buy(1,Open); If(MarketPosition ==1 And Close[1]<MA3) Sell(1,Open); If(MarketPosition ==0 And Close[2]>MA2 And Close[1]<MA2) SellShort(1,Open); If(MarketPosition == -1 And Close[1]>MA3) BuyToCover(1,Open); End
|