老师,请教几个问题
麻烦看一下下面代码,几个问题:1. ma1和ma2好像关于划线风格的设置没有生效2. 为何k线的相关信息(开盘价,收盘价,最高价,最低价)没有了//------------------------------------------------------------------------// 简称: ema_boll// 名称: ema-boll// 类别: 公式应用// 类型: 用户应用// 输出: Void//------------------------------------------------------------------------Params Numeric length1(5); Numeric length2(10); Numeric Length(20); //周期 Numeric Offset(2); //标准差倍数Vars Series<Numeric> ma1; Series<Numeric> ma2; Numeric UpLine; //上轨 Numeric DownLine; //下轨 Series<Numeric> MidLine; //中间线 Numeric Band;DefsEvents //此处实现事件函数 //初始化事件函数,策略运行期间,首先运行且只有一次,应用在订阅数据等操作 OnInit() { } //在所有的数据源准备完成后调用,应用在数据源的设置等操作 OnReady() { } //基础数据更新事件函数 OnDic(StringRef dicName,StringRef dicSymbol,DicDataRef dicValue) { } //在新bar的第一次执行之前调用一次,参数为新bar的图层数组 OnBarOpen(ArrayRef<Integer> indexs) { } //Bar更新事件函数,参数indexs表示变化的数据源图层ID数组 OnBar(ArrayRef<Integer> indexs) { } //下一个Bar开始前,重新执行当前bar最后一次,参数为当前bar的图层数组 OnBarClose(ArrayRef<Integer> indexs) { ma1 = XAverage(Close,length1); ma2 = XAverage(Close,length2); PlotNumeric("ma1", ma1, ma1, Green, Enum_Dash_Dot_Dot); PlotNumeric("ma2", ma2, ma2, RED, Enum_Dash_Dot_Dot); Range[0:DataSourceSize() - 1] { MidLine = AverageFC(Close,Length); Band = StandardDev(Close,Length,2); UpLine = MidLine + Offset * Band; DownLine = MidLine - Offset * Band; PlotNumeric("UpLine",UpLine); PlotNumeric("DownLine",DownLine); PlotNumeric("MidLine",MidLine); } } //Tick更新事件函数,需要SubscribeTick函数订阅后触发,参数evtTick表示更新的tick结构体 OnTick(TickRef evtTick) { } //持仓更新事件函数,参数pos表示更新的持仓结构体 OnPosition(PositionRef pos) { } //策略账户仓更新事件函数,参数pos表示更新的账户仓结构体 OnStrategyPosition(PositionRef pos) { } //委托更新事件函数,参数ord表示更新的委托结构体 OnOrder(OrderRef ord) { } //成交更新事件函数,参数ordFill表示更新的成交结构体 OnFill(FillRef ordFill) { } //定时器更新事件函数,参数id表示定时器的编号,millsecs表示定时间的间隔毫秒值 OnTimer(Integer id,Integer intervalMillsecs) { } //通用事件触发函数,参数evtName为事件名称,参数evtValue为事件内容 OnEvent(StringRef evtName,MapRef<String,String> evtValue) { } //当前策略退出时触发 OnExit() { }