后台程序返回的无效值 [金字塔]
-
咨询内容:
DEBUGFILE(FILE,'当前运行的bar时间%.0f',TIME);
IF ISLASTBAR THEN
BEGIN
DEBUGFILE(FILE,'行情时间%.2f',dynainfo(207));
DEBUGFILE(FILE,'当前价格%.2f',DQJ);
DEBUGFILE(FILE,'当前上轨%.2f',UP);
DEBUGFILE(FILE,'当前下轨%.2f',DOWN);
DEBUGFILE(FILE,'当前震荡线%.2f',JZX);
DEBUGFILE(FILE,'当前震荡线2%.2f',ZDX2);
DEBUGFILE(FILE,'前一收盘价%.2f',LASTBARCLOSE);
END
这是我的主要代码,用的SIMNOW模拟账户,但是后台程序化监控有时候返回的都是无效值,特别是TIME的时间戳为0,请问这个是数据问题?还是行情问题?还是模拟服务器问题?还是代码问题呢?
后面是LOG
2020-10-13 14:58:51.103 当前运行的bar时间1859002020-10-13 14:58:51.108 行情时间185850.002020-10-13 14:58:51.114 当前价格117040.002020-10-13 14:58:51.120 当前上轨117530.002020-10-13 14:58:51.125 当前下轨117030.002020-10-13 14:58:51.131 当前震荡线116986.502020-10-13 14:58:51.137 当前震荡线2116986.502020-10-13 14:58:51.143 前一收盘价117060.002020-10-13 14:58:51.731 当前运行的bar时间02020-10-13 14:58:51.737 行情时间185851.002020-10-13 14:58:51.742 当前价格117040.002020-10-13 14:58:51.748 当前上轨-1.#R2020-10-13 14:58:51.754 当前下轨-1.#R2020-10-13 14:58:51.760 当前震荡线0.002020-10-13 14:58:51.766 当前震荡线20.002020-10-13 14:58:51.777 前一收盘价-1.#R2020-10-13 14:58:51.915 当前运行的bar时间1859002020-10-13 14:58:51.921 行情时间185851.002020-10-13 14:58:51.927 当前价格117040.002020-10-13 14:58:51.933 当前上轨117530.002020-10-13 14:58:51.939 当前下轨117030.002020-10-13 14:58:51.945 当前震荡线116986.502020-10-13 14:58:51.950 当前震荡线2116986.502020-10-13 14:58:51.957 前一收盘价117060.002020-10-13 14:58:52.735 行情时间185852.002020-10-13 14:58:52.735 当前运行的bar时间02020-10-13 14:58:52.740 下单时趋势延续状态-1.002020-10-13 14:58:52.746 行情时间185852.002020-10-13 14:58:52.751 下单时状态0.002020-10-13 14:58:52.757 当前价格117030.002020-10-13 14:58:52.763 当前价格117030.002020-10-13 14:58:52.773 当前上轨-1.#R2020-10-13 14:58:52.779 当前上轨117530.002020-10-13 14:58:52.785 当前下轨-1.#R2020-10-13 14:58:52.791 当前下轨117030.002020-10-13 14:58:52.797 当前震荡线0.002020-10-13 14:58:52.803 当前震荡线116986.502020-10-13 14:58:52.808 当前震荡线20.002020-10-13 14:58:52.814 前一收盘价117060.002020-10-13 14:58:52.819 前一收盘价-1.#R2020-10-13 14:58:52.825 当前运行的bar时间1859002020-10-13 14:58:52.838 行情时间185852.002020-10-13 14:58:52.843 当前价格117030.002020-10-13 14:58:52.849 当前上轨117530.002020-10-13 14:58:52.856 当前下轨117030.002020-10-13 14:58:52.861 当前震荡线116986.502020-10-13 14:58:52.868 当前震荡线2116986.502020-10-13 14:58:52.873 前一收盘价117060.002020-10-13 14:58:53.556 当前运行的bar时间1859002020-10-13 14:58:53.562 行情时间185853.002020-10-13 14:58:53.568 当前价格117040.002020-10-13 14:58:53.574 当前上轨117530.002020-10-13 14:58:53.579 当前下轨117030.002020-10-13 14:58:53.586 当前震荡线116986.502020-10-13 14:58:53.592 当前震荡线2116986.502020-10-13 14:58:53.597 前一收盘价117060.002020-10-13 14:58:53.729 当前运行的bar时间02020-10-13 14:58:53.734 行情时间185853.002020-10-13 14:58:53.741 当前价格117040.002020-10-13 14:58:53.747 当前上轨-1.#R2020-10-13 14:58:53.753 当前下轨-1.#R2020-10-13 14:58:53.759 当前震荡线0.002020-10-13 14:58:53.765 当前震荡线20.002020-10-13 14:58:53.775 前一收盘价-1.#R2020-10-13 14:58:54.353 行情时间185853.002020-10-13 14:58:54.359 下单时趋势延续状态-1.002020-10-13 14:58:54.365 下单时状态0.002020-10-13 14:58:54.370 当前价格117030.002020-10-13 14:58:54.376 当前上轨117530.002020-10-13 14:58:54.382 当前下轨117030.002020-10-13 14:58:54.388 当前震荡线116986.502020-10-13 14:58:54.394 前一收盘价117060.002020-10-13 14:58:54.400 当前运行的bar时间1859002020-10-13 14:58:54.406 行情时间185853.002020-10-13 14:58:54.411 当前价格117030.002020-10-13 14:58:54.417 当前上轨117530.002020-10-13 14:58:54.422 当前下轨117030.002020-10-13 14:58:54.428 当前震荡线116986.502020-10-13 14:58:54.434 当前震荡线2116986.502020-10-13 14:58:54.439 前一收盘价117060.002020-10-13 14:58:54.734 当前运行的bar时间02020-10-13 14:58:54.740 行情时间185854.002020-10-13 14:58:54.746 当前价格117030.002020-10-13 14:58:54.752 当前上轨-1.#R2020-10-13 14:58:54.758 当前下轨-1.#R2020-10-13 14:58:54.764 当前震荡线0.002020-10-13 14:58:54.773 当前震荡线20.002020-10-13 14:58:54.779 前一收盘价-1.#R2020-10-13 14:58:55.165 当前运行的bar时间1859002020-10-13 14:58:55.171 行情时间185854.002020-10-13 14:58:55.177 当前价格117040.002020-10-13 14:58:55.183 当前上轨117530.002020-10-13 14:58:55.188 当前下轨117030.002020-10-13 14:58:55.194 当前震荡线116986.502020-10-13 14:58:55.199 当前震荡线2116986.502020-10-13 14:58:55.205 前一收盘价117060.002020-10-13 14:58:55.735 当前运行的bar时间02020-10-13 14:58:55.741 行情时间185855.002020-10-13 14:58:55.748 当前价格117040.002020-10-13 14:58:55.754 当前上轨-1.#R2020-10-13 14:58:55.760 当前下轨-1.#R2020-10-13 14:58:55.769 当前震荡线0.002020-10-13 14:58:55.775 当前震荡线20.002020-10-13 14:58:55.780 前一收盘价-1.#R2020-10-13 14:58:55.978 当前运行的bar时间1859002020-10-13 14:58:55.985 行情时间185855.002020-10-13 14:58:55.990 当前价格117040.002020-10-13 14:58:55.995 当前上轨117530.002020-10-13 14:58:56.001 当前下轨117030.002020-10-13 14:58:56.007 当前震荡线116986.502020-10-13 14:58:56.012 当前震荡线2116986.502020-10-13 14:58:56.017 前一收盘价117060.002020-10-13 14:58:56.732 当前运行的bar时间02020-10-13 14:58:56.737 行情时间185856.002020-10-13 14:58:56.743 当前价格117040.002020-10-13 14:58:56.750 当前上轨-1.#R2020-10-13 14:58:56.756 当前下轨-1.#R2020-10-13 14:58:56.762 当前震荡线0.002020-10-13 14:58:56.773 当前震荡线20.002020-10-13 14:58:56.786 前一收盘价-1.#R来源: WWW.CXH99.COM
-
金字塔客服:
2020-10-13 14:58:55.754 当前上轨-1.#R2020-10-13 14:58:55.760 当前下轨-1.#R这样的无效值?
一般这种无效值就是你公式代码上的计算问题,常见问题是计算的数据不够,比如你后台只加载了500根k线数据,那么你MA(C,600)这样就会因为数据不够而出现无效值,你尝试改大后再试试。
还有就是你可以将公式在图表上调试好,然后再移交到后台,应该会更容易些。
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容