请各位老师帮改一下代码

麻烦请各位老师看一下我的网格交易代码,为什么过不去,麻烦帮改一下,谢谢各位老师Params //网格策略参数 Numeric GridSpace(10); // 网格间距(点) Numeric Lots(1); // 每次交易手数 Numeric TradeMode(1); // 1:低买高卖 2:高卖低买 Numeric InitPrice(0); // 初始基准价,0表示用第一个Bar的开盘价Vars //策略变量 NumericSeries BasePrice; NumericSeries GridTop; NumericSeries GridBottom; BoolSeries IsFirst(True);Begin // 初始化网格 If (IsFirst == True) { If (InitPrice == 0) { BasePrice = Open; } Else { BasePrice = InitPrice; } GridTop = BasePrice + GridSpace * MinPoint; GridBottom = BasePrice - GridSpace * MinPoint; IsFirst = False; } // 模式1:低买高卖 If (TradeMode == 1) { // 低买条件:价格跌到下轨 If (Low <= GridBottom) { Buy(Lots, GridBottom); // 网格向下移动 BasePrice = BasePrice - GridSpace * MinPoint; GridTop = BasePrice + GridSpace * MinPoint; GridBottom = BasePrice - GridSpace * MinPoint; } // 高卖条件:价格涨到上轨 If (High >= GridTop) { Sell(Lots, GridTop); // 网格向上移动 BasePrice = BasePrice + GridSpace * MinPoint; GridTop = BasePrice + GridSpace * MinPoint; GridBottom = BasePrice - GridSpace * MinPoint; } } // 模式2:高卖低买 If (TradeMode == 2) { // 高卖条件:价格涨到上轨 If (High >= GridTop) { Sell(Lots, GridTop); // 网格向上移动 BasePrice = BasePrice + GridSpace * MinPoint; GridTop = BasePrice + GridSpace * MinPoint; GridBottom = BasePrice - GridSpace * MinPoint; } // 低买条件:价格跌到下轨 If (Low <= GridBottom) { Buy(Lots, GridBottom); // 网格向下移动 BasePrice = BasePrice - GridSpace * MinPoint; GridTop = BasePrice + GridSpace * MinPoint; GridBottom = BasePrice - GridSpace * MinPoint; } }End

AI写的吗

回复:是的呀,咱也不是专业的,想找老师帮写,也摇不到人,只能写一个框架出来,找一个好心的老师帮改一下,肯定是会给老师感谢费的

回复:代写找我