为什么回溯使用[]和ref输出结果不一样
Numeric num1KD=PriceScale*MinMove; Commentary("[]:"+text(count(IIF( H <= H[1] + num1KD AND L >= L[1] - num1KD,1,0),CurrentBar+1))); Commentary("ref:"+text(count(IIF( H <= ref(H,1) + num1KD AND L >= ref(L,1) - num1KD,1,0),CurrentBar+1))); Commentary("#"); Commentary("[]:"+text(count(IIF( L >= L[1] - num1KD,1,0),CurrentBar+1))); Commentary("ref:"+text(count(IIF( L >= ref(L,1) - num1KD,1,0),CurrentBar+1))); Commentary("#"); Commentary("[]:"+text(count(IIF( H <= H[1] + num1KD ,1,0),CurrentBar+1))); Commentary("ref:"+text(count(IIF( H <= ref(H,1) + num1KD ,1,0),CurrentBar+1))); Commentary("#"); Commentary("[]:"+text(count(IIF( L >= L[1] ,1,0),CurrentBar+1))); Commentary("ref:"+text(count(IIF( L >= ref(L,1) ,1,0),CurrentBar+1))); Commentary("#"); Commentary("[]:"+text(count(IIF( H <= H[1] ,1,0),CurrentBar+1))); Commentary("ref:"+text(count(IIF( H <= ref(H,1) ,1,0),CurrentBar+1))); Commentary("#"); Commentary("[]:"+text(count(IIF( H <= H[1] AND L >= L[1] ,1,0),CurrentBar+1))); Commentary("ref:"+text(count(IIF( H <= ref(H,1) AND L >= ref(L,1) ,1,0),CurrentBar+1)));