老师麻烦帮编一个简单的程序
5日线上穿或下穿60日线开仓,盈利40点或者亏损20点平仓,谢谢老师!! ParamsNumeric N1(5);
Numeric N2(60);
Vars
NumericSeries MA1;
NumericSeries MA2;
Numeric MinPoint;
Numeric myEntryPrice;
Bool con1(False);
Bool con2(False);
Begin
MA1=AvregeFC(Close,N1);
MA2=AvregeFC(Close,N2);
MinPoint=MinMove*PriceScale;
con1= Crossover(MA1),MA2);
con2=H>=myEntryPrice+40* MinPoint OR L<=myEntryPrice-20* MinPoint;
If(MarketPosition=0 AND con1=ture)
{
myEntryPrice=Open;
BUY(0,myEntryPrice);
}
If(MarketPosition=1 AND con2=ture)Sell(0,0);
End
你试试
非常感谢!!
提示:
缺少分号 C0011 24行 有分号啊?怎么回事? con1= Crossover(MA1),MA2);
页:
[1]