公式错误

//------------------------------------------------------------------------
// 简称: xx
// 名称: 
// 类别: 公式应用
// 类型: 用户应用
// 输出: Void
//------------------------------------------------------------------------
Params
    Numeric Price(1);            //数值型序列值
    Numeric Length(10);            //周期数
    Numeric TgtBar(0);            //Bar偏移
Vars
    Numeric LRSlope; 
    Numeric LRAngle;
    Numeric LRIntercept;
    Numeric LRValue;
Begin
    LinearReg(Price, Length, TgtBar, LRSlope, LRAngle, LRIntercept, LRValue);
    Return LRValue;
Events
    OnBar(ArrayRef<Integer> indexs)
    {
        Range[0:DataCount - 1]
        {
            if(CurrentBar <= 10)
            {
                //求线性回归的角度
                Numeric value = LinearRegValue(High, 5);
                Print("Symbol:" + Symbol + ",LinearRegValue:" + Text(value)); 
            }
        }
    }
//------------------------------------------------------------------------
// 编译版本    2023/01/01 112027
// 版权所有    yxx32518
// 更改声明    TradeBlazer Software保留对TradeBlazer平台
//            每一版本的TradeBlazer公式修改和重写的权利
//------------------------------------------------------------------------

 

这公式错误怎么改?

为什么以前无源码导出现导入不了
公式管理器错误
新建公式编译时,提示程序体不存在,错误号为1001
我这不管编译什么公式都会报错,还不提示什么错误。
求斜率公式提示“潜在逻辑错误”
账号关联错误
潜在的逻辑错误
显示错误
漏洞错误很多?
编译时提示错误,错误号2002,帮忙看看是否有问题

我是想要在图表上划出线性回归值,该怎么改呢,老师修改后还是不能划出这条线。

如果不管您的意图,只是让这个公式通过编译的话,可以这么改:

Params
    Numeric Price(1);            //数值型序列值
    Numeric Length(10);            //周期数
    Numeric TgtBar(0);            //Bar偏移
Vars
    Numeric LRSlope; 
    Numeric LRAngle;
    Numeric LRIntercept;
    Numeric LRValue;

Events
    OnBar(ArrayRef<Integer> indexs)
    {
        Range[0:DataCount - 1]
        {
            if(CurrentBar <= 10)
            {
                //求线性回归的角度
                Numeric value = LinearRegValue(High, 5);
                Print("Symbol:" + Symbol + ",LinearRegValue:" + Text(value)); 
            }
        }
    }