Params
Numeric length(30);
Numeric i(100);
Numeric lots(1);
Vars
Series<Numeric> mta;
Series<Numeric> mtb;
Numeric LRSlope;
Numeric LRAngle;
Numeric LRIntercept;
Numeric LRValue;
Numeric LRSlope1;
Numeric LRAngle1;
Numeric LRIntercept1;
Numeric LRValue1;
Numeric mt;
Begin
LinearReg(Close[1],length,0,LRSlope, LRAngle, LRIntercept, LRValue);
mta=LRSlope;
LinearReg(mta*50,length,0,LRSlope1, LRAngle1, LRIntercept1, LRValue1);
mtb=LRSlope1;
mt=mta*mtb*50;
//{
if(MarketPosition!=1 And mt>I And mta>0)
{
if(MarketPosition==-1)
BuyToCover(0,0);
Else
Buy(lots,Open);
}
if(MarketPosition!=-1 And mt>I And mta<0)
{
if(MarketPosition==1)
Sell(0,0);
Else
SellShort(lots,Open);
}
if(MarketPosition==1 and mt<0)
Sell(lots,0);
if(MarketPosition==-1 and mt<0)
BuyToCover(lots,0);
End
老师,那到底怎么弄?我是新手
兄弟,你好,我喜欢白漂,你的QQ号多少?
编译显示缺少返回语句
升级也没有用,还是原来的