代码编译错误,帮我修改一下
2022-02-18 09:39

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

评论区
zyqh100091573

老师,那到底怎么弄?我是新手

2022-02-18 10:39
zyqh100091573

兄弟,你好,我喜欢白漂,你的QQ号多少?

2022-02-18 10:22
zyqh100091573

编译显示缺少返回语句

2022-02-18 10:12
zyqh100091573

升级也没有用,还是原来的

2022-02-18 10:10
顶部