只开一仓,为什么 [开拓者 TB]
- 咨询内容:
Params
Numeric ALength(4);
Numeric BLength(9);
Numeric CLength(18);
Vars
NumericSeries AMA;
NumericSeries BMA;
NumericSeries CMA;
Bool Condition1;
Bool Condition2;
Begin
If(!W_CallAuctionFilter()) Return;
AMA = Average(Close, ALength);
BMA = Average(Close, BLength);
CMA = Average(Close, CLength);
PlotNumeric("短线",AMA);
PlotNumeric("中线",BMA);
PlotNumeric("长线",CMA);
Condition1 = CrossOver(AMA[1],BMA[1]) AND AMA[1]>CMA[1] AND BMA>CMA;
Condition1 = CrossUnder(AMA[1],BMA[1]) AND AMA[1]<CMA[1] AND BMA<CMA;
if (MarketPosition != 1 And Condition1)
{
Buy(0,Open);
}Else
if (MarketPosition != -1 And Condition2)
{
SellShort(0,Open);
}
End - TB技术人员:
2个 Condition1
- TB客服: Condition1 = CrossUnder(AMA[1],BMA[1]) AND AMA[1]<CMA[1] AND BMA<CMA; 应该写成: Condition2 = CrossUnder(AMA[1],BMA[1]) AND AMA[1]<CMA[1] AND BMA<CMA;
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容