我的量化程序信号闪烁什么原因??
请老师帮我看一下,这个小量化程序怎么会出现 信号闪烁? 请求帮忙解决 Params Numeric qdjglow(18000); // 低价——价格区间 Numeric qdjghi(20000); // 高价——价格区间 Numeric wgjg(500); // 每个网格间格的价格是多少 Numeric Lots(1); // 交易手数 Numeric pc(10); // 平仓时网络处加多少平仓 Vars Global Numeric qdjg(20000); Global Array<Numeric> n; Global Array<Numeric> jdj; Global Array<Numeric> pcj; Numeric i(0); Global Numeric scount(1); // 循环次数 Events //初始化事件函数,策略运行期间,首先运行且只有一次, OnInit() { qdjg=qdjglow; } OnBar(ArrayRef<Integer> indexs) { scount=(qdjghi-qdjglow)/wgjg; For i = 0 To scount { // 开空仓 If(High[1] <qdjg+wgjg*i And High >= qdjg+wgjg*i And n[i] == 0 and High>qdjglow and High<qdjghi) { SellShort(Lots, qdjg+wgjg*i); n[i] = 1; Commentary("1n"+text(i)); } // 平空仓 If( Low <= qdjg+wgjg*(i-1)-pc And n[i] == 1) { BuyToCover(Lots, qdjg+wgjg*(i-1)-pc); n[i] = 0; Commentary("2n"+text(i)); } } }