后臺(tái)程序返回的無效值
作者:金字塔 來源:cxh99.com 發(fā)布時(shí)間:2021年03月02日
-
咨詢內(nèi)容:
DEBUGFILE(FILE,'當(dāng)前運(yùn)行的bar時(shí)間%.0f',TIME);
IF ISLASTBAR THEN
BEGIN
DEBUGFILE(FILE,'行情時(shí)間%.2f',dynainfo(207));
DEBUGFILE(FILE,'當(dāng)前價(jià)格%.2f',DQJ);
DEBUGFILE(FILE,'當(dāng)前上軌%.2f',UP);
DEBUGFILE(FILE,'當(dāng)前下軌%.2f',DOWN);
DEBUGFILE(FILE,'當(dāng)前震蕩線%.2f',JZX);
DEBUGFILE(FILE,'當(dāng)前震蕩線2%.2f',ZDX2);
DEBUGFILE(FILE,'前一收盤價(jià)%.2f',LASTBARCLOSE);
END
這是我的主要代碼,用的SIMNOW模擬賬戶,但是后臺(tái)程序化監(jiān)控有時(shí)候返回的都是無效值,特別是TIME的時(shí)間戳為0,請(qǐng)問這個(gè)是數(shù)據(jù)問題?還是行情問題?還是模擬服務(wù)器問題?還是代碼問題呢?
后面是LOG
2020-10-13 14:58:51.103? ? 當(dāng)前運(yùn)行的bar時(shí)間1859002020-10-13 14:58:51.108? ? 行情時(shí)間185850.002020-10-13 14:58:51.114? ? 當(dāng)前價(jià)格117040.002020-10-13 14:58:51.120? ? 當(dāng)前上軌117530.002020-10-13 14:58:51.125? ? 當(dāng)前下軌117030.002020-10-13 14:58:51.131? ? 當(dāng)前震蕩線116986.502020-10-13 14:58:51.137? ? 當(dāng)前震蕩線2116986.502020-10-13 14:58:51.143? ? 前一收盤價(jià)117060.002020-10-13 14:58:51.731? ? 當(dāng)前運(yùn)行的bar時(shí)間02020-10-13 14:58:51.737? ? 行情時(shí)間185851.002020-10-13 14:58:51.742? ? 當(dāng)前價(jià)格117040.002020-10-13 14:58:51.748? ? 當(dāng)前上軌-1.#R2020-10-13 14:58:51.754? ? 當(dāng)前下軌-1.#R2020-10-13 14:58:51.760? ? 當(dāng)前震蕩線0.002020-10-13 14:58:51.766? ? 當(dāng)前震蕩線20.002020-10-13 14:58:51.777? ? 前一收盤價(jià)-1.#R2020-10-13 14:58:51.915? ? 當(dāng)前運(yùn)行的bar時(shí)間1859002020-10-13 14:58:51.921? ? 行情時(shí)間185851.002020-10-13 14:58:51.927? ? 當(dāng)前價(jià)格117040.002020-10-13 14:58:51.933? ? 當(dāng)前上軌117530.002020-10-13 14:58:51.939? ? 當(dāng)前下軌117030.002020-10-13 14:58:51.945? ? 當(dāng)前震蕩線116986.502020-10-13 14:58:51.950? ? 當(dāng)前震蕩線2116986.502020-10-13 14:58:51.957? ? 前一收盤價(jià)117060.002020-10-13 14:58:52.735? ? 行情時(shí)間185852.002020-10-13 14:58:52.735? ? 當(dāng)前運(yùn)行的bar時(shí)間02020-10-13 14:58:52.740? ? 下單時(shí)趨勢(shì)延續(xù)狀態(tài)-1.002020-10-13 14:58:52.746? ? 行情時(shí)間185852.002020-10-13 14:58:52.751? ? 下單時(shí)狀態(tài)0.002020-10-13 14:58:52.757? ? 當(dāng)前價(jià)格117030.002020-10-13 14:58:52.763? ? 當(dāng)前價(jià)格117030.002020-10-13 14:58:52.773? ? 當(dāng)前上軌-1.#R2020-10-13 14:58:52.779? ? 當(dāng)前上軌117530.002020-10-13 14:58:52.785? ? 當(dāng)前下軌-1.#R2020-10-13 14:58:52.791? ? 當(dāng)前下軌117030.002020-10-13 14:58:52.797? ? 當(dāng)前震蕩線0.002020-10-13 14:58:52.803? ? 當(dāng)前震蕩線116986.502020-10-13 14:58:52.808? ? 當(dāng)前震蕩線20.002020-10-13 14:58:52.814? ? 前一收盤價(jià)117060.002020-10-13 14:58:52.819? ? 前一收盤價(jià)-1.#R2020-10-13 14:58:52.825? ? 當(dāng)前運(yùn)行的bar時(shí)間1859002020-10-13 14:58:52.838? ? 行情時(shí)間185852.002020-10-13 14:58:52.843? ? 當(dāng)前價(jià)格117030.002020-10-13 14:58:52.849? ? 當(dāng)前上軌117530.002020-10-13 14:58:52.856? ? 當(dāng)前下軌117030.002020-10-13 14:58:52.861? ? 當(dāng)前震蕩線116986.502020-10-13 14:58:52.868? ? 當(dāng)前震蕩線2116986.502020-10-13 14:58:52.873? ? 前一收盤價(jià)117060.002020-10-13 14:58:53.556? ? 當(dāng)前運(yùn)行的bar時(shí)間1859002020-10-13 14:58:53.562? ? 行情時(shí)間185853.002020-10-13 14:58:53.568? ? 當(dāng)前價(jià)格117040.002020-10-13 14:58:53.574? ? 當(dāng)前上軌117530.002020-10-13 14:58:53.579? ? 當(dāng)前下軌117030.002020-10-13 14:58:53.586? ? 當(dāng)前震蕩線116986.502020-10-13 14:58:53.592? ? 當(dāng)前震蕩線2116986.502020-10-13 14:58:53.597? ? 前一收盤價(jià)117060.002020-10-13 14:58:53.729? ? 當(dāng)前運(yùn)行的bar時(shí)間02020-10-13 14:58:53.734? ? 行情時(shí)間185853.002020-10-13 14:58:53.741? ? 當(dāng)前價(jià)格117040.002020-10-13 14:58:53.747? ? 當(dāng)前上軌-1.#R2020-10-13 14:58:53.753? ? 當(dāng)前下軌-1.#R2020-10-13 14:58:53.759? ? 當(dāng)前震蕩線0.002020-10-13 14:58:53.765? ? 當(dāng)前震蕩線20.002020-10-13 14:58:53.775? ? 前一收盤價(jià)-1.#R2020-10-13 14:58:54.353? ? 行情時(shí)間185853.002020-10-13 14:58:54.359? ? 下單時(shí)趨勢(shì)延續(xù)狀態(tài)-1.002020-10-13 14:58:54.365? ? 下單時(shí)狀態(tài)0.002020-10-13 14:58:54.370? ? 當(dāng)前價(jià)格117030.002020-10-13 14:58:54.376? ? 當(dāng)前上軌117530.002020-10-13 14:58:54.382? ? 當(dāng)前下軌117030.002020-10-13 14:58:54.388? ? 當(dāng)前震蕩線116986.502020-10-13 14:58:54.394? ? 前一收盤價(jià)117060.002020-10-13 14:58:54.400? ? 當(dāng)前運(yùn)行的bar時(shí)間1859002020-10-13 14:58:54.406? ? 行情時(shí)間185853.002020-10-13 14:58:54.411? ? 當(dāng)前價(jià)格117030.002020-10-13 14:58:54.417? ? 當(dāng)前上軌117530.002020-10-13 14:58:54.422? ? 當(dāng)前下軌117030.002020-10-13 14:58:54.428? ? 當(dāng)前震蕩線116986.502020-10-13 14:58:54.434? ? 當(dāng)前震蕩線2116986.502020-10-13 14:58:54.439? ? 前一收盤價(jià)117060.002020-10-13 14:58:54.734? ? 當(dāng)前運(yùn)行的bar時(shí)間02020-10-13 14:58:54.740? ? 行情時(shí)間185854.002020-10-13 14:58:54.746? ? 當(dāng)前價(jià)格117030.002020-10-13 14:58:54.752? ? 當(dāng)前上軌-1.#R2020-10-13 14:58:54.758? ? 當(dāng)前下軌-1.#R2020-10-13 14:58:54.764? ? 當(dāng)前震蕩線0.002020-10-13 14:58:54.773? ? 當(dāng)前震蕩線20.002020-10-13 14:58:54.779? ? 前一收盤價(jià)-1.#R2020-10-13 14:58:55.165? ? 當(dāng)前運(yùn)行的bar時(shí)間1859002020-10-13 14:58:55.171? ? 行情時(shí)間185854.002020-10-13 14:58:55.177? ? 當(dāng)前價(jià)格117040.002020-10-13 14:58:55.183? ? 當(dāng)前上軌117530.002020-10-13 14:58:55.188? ? 當(dāng)前下軌117030.002020-10-13 14:58:55.194? ? 當(dāng)前震蕩線116986.502020-10-13 14:58:55.199? ? 當(dāng)前震蕩線2116986.502020-10-13 14:58:55.205? ? 前一收盤價(jià)117060.002020-10-13 14:58:55.735? ? 當(dāng)前運(yùn)行的bar時(shí)間02020-10-13 14:58:55.741? ? 行情時(shí)間185855.002020-10-13 14:58:55.748? ? 當(dāng)前價(jià)格117040.002020-10-13 14:58:55.754? ? 當(dāng)前上軌-1.#R2020-10-13 14:58:55.760? ? 當(dāng)前下軌-1.#R2020-10-13 14:58:55.769? ? 當(dāng)前震蕩線0.002020-10-13 14:58:55.775? ? 當(dāng)前震蕩線20.002020-10-13 14:58:55.780? ? 前一收盤價(jià)-1.#R2020-10-13 14:58:55.978? ? 當(dāng)前運(yùn)行的bar時(shí)間1859002020-10-13 14:58:55.985? ? 行情時(shí)間185855.002020-10-13 14:58:55.990? ? 當(dāng)前價(jià)格117040.002020-10-13 14:58:55.995? ? 當(dāng)前上軌117530.002020-10-13 14:58:56.001? ? 當(dāng)前下軌117030.002020-10-13 14:58:56.007? ? 當(dāng)前震蕩線116986.502020-10-13 14:58:56.012? ? 當(dāng)前震蕩線2116986.502020-10-13 14:58:56.017? ? 前一收盤價(jià)117060.002020-10-13 14:58:56.732? ? 當(dāng)前運(yùn)行的bar時(shí)間02020-10-13 14:58:56.737? ? 行情時(shí)間185856.002020-10-13 14:58:56.743? ? 當(dāng)前價(jià)格117040.002020-10-13 14:58:56.750? ? 當(dāng)前上軌-1.#R2020-10-13 14:58:56.756? ? 當(dāng)前下軌-1.#R2020-10-13 14:58:56.762? ? 當(dāng)前震蕩線0.002020-10-13 14:58:56.773? ? 當(dāng)前震蕩線20.002020-10-13 14:58:56.786? ? 前一收盤價(jià)-1.#R
?
?來源: www.kzuj.com.cn
-
金字塔客服:
2020-10-13 14:58:55.754? ? 當(dāng)前上軌-1.#R2020-10-13 14:58:55.760? ? 當(dāng)前下軌-1.#R這樣的無效值?
一般這種無效值就是你公式代碼上的計(jì)算問題,常見問題是計(jì)算的數(shù)據(jù)不夠,比如你后臺(tái)只加載了500根k線數(shù)據(jù),那么你MA(C,600)這樣就會(huì)因?yàn)閿?shù)據(jù)不夠而出現(xiàn)無效值,你嘗試改大后再試試。
還有就是你可以將公式在圖表上調(diào)試好,然后再移交到后臺(tái),應(yīng)該會(huì)更容易些。