问一下高手为什么我的系统不产生交易信号
Params
Numeric malen1(20);
Numeric malen2(40);
Numeric offset(2);
Vars
Bool Condition1;
Bool Condition2;
Numeric i_offset;
NumericSeries ma1;
NumericSeries ma2;
Begin
ma1=Average(Open,malen1);
ma1=Average(Open,malen2);
i_offset=offset*MinMove*PriceScale;
if(CurrentBar>malen2)
{
Condition1 =CrossOver(ma1,ma2) ;
Condition2 =CrossUnder(ma1,ma2);
if(MarketPosition == 0)
{
if (Condition1)
{
Buy(1,Open+i_offset);
Return;
}
Else if (Condition2)
{
SellShort(1,Open-i_offset);
Return;
}
}
if(MarketPosition == 1)
{
if (Condition2)
Sell(0,Open-i_offset);
SellShort(1,open-i_offset);
Return;
}
if(MarketPosition == -1)
{
if (Condition1)
BuyToCover(0,Open+i_offset);
Buy(1,open+i_offset);
}
Return;
}
End 跪求大神指点 有木有啊,有木有 TB就没有人了吗
页:
[1]