以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://222.73.7.161/bbs/index.asp)
--  公式模型编写问题提交  (http://222.73.7.161/bbs/list.asp?boardid=4)
----  不解为何只仓1手  (http://222.73.7.161/bbs/dispbbs.asp?boardid=4&id=182086)

--  作者:fxrock4
--  发布时间:2020/9/7 21:32:52
--  不解为何只仓1手

图片点击可在新窗口打开查看此主题相关图片如下:2020-08-12_150335.jpg
图片点击可在新窗口打开查看
INPUT:x1(2,1,100,1);
S1:=X1;
if STKLABEL=\'IH00\' then S1:=1; 
if STKLABEL=\'IF00\' then S1:=1;
 if kk then begin
Tbuyshort(kk AND TSELLHOLDINGEX(ZH1,\'\',1)<1,S1,LMT,CLOSE,1,ZH1,\'\');
    end 
TSELLshort(pk,TSELLHOLDINGEX(ZH1,\'\',1),MKT,1,ZH1,\'\');

OI 为何只开仓一手,不知道哪里出错呢?



--  作者:fxrock4
--  发布时间:2020/9/7 21:40:02
--  

图片点击可在新窗口打开查看此主题相关图片如下:2020-09-07_213438.jpg
图片点击可在新窗口打开查看
上面传错了图片。OI00 P00 B00 为何都只是开仓一手,默认的是2手哦。
--  作者:FireScript
--  发布时间:2020/9/8 8:54:12
--  
 你ZH1怎么定义的。
--  作者:fxrock4
--  发布时间:2020/9/8 9:27:14
--  
ZH1=账户啊
--  作者:wenarm
--  发布时间:2020/9/8 9:33:36
--  

你自己在Tbuyshort(kk AND TSELLHOLDINGEX(ZH1,\'\',1)<1,S1,LMT,CLOSE,1,ZH1,\'\');这句话前面加debugfile输出自己的手数等条件的结果。

 

或者贴出完整的代码给我们

[此贴子已经被作者于2020/9/8 9:42:31编辑过]

--  作者:fxrock4
--  发布时间:2020/9/8 9:46:43
--  
2020-09-07 21:20:22.712    OI00是否满足PD条件:1.000
2020-09-07 21:20:22.713    OI00是否满足PK条件:0.000
2020-09-07 21:20:22.713    OI00是否满足KD条件:0.000
2020-09-07 21:20:22.714    OI00是否满足KK条件:1.000
2020-09-07 21:20:22.715    OI00开仓价:8589.000
2020-09-07 21:20:22.715    OI00平仓价:8648.000
2020-09-07 21:20:22.950    FG00是否满足PD条件:0.000
2020-09-07 21:20:22.951    FG00是否满足PK条件:0.000
2020-09-07 21:20:22.952    FG00是否满足KD条件:0.000
2020-09-07 21:20:22.953    FG00是否满足KK条件:0.000
2020-09-07 21:20:22.954    FG00开仓价:1794.000
2020-09-07 21:20:22.955    FG00平仓价:-1.#QO
2020-09-07 21:20:23.113    SA00是否满足PD条件:0.000
2020-09-07 21:20:23.114    SA00是否满足PK条件:0.000
2020-09-07 21:20:23.114    SA00是否满足KD条件:0.000
2020-09-07 21:20:23.115    SA00是否满足KK条件:0.000
2020-09-07 21:20:23.115    SA00开仓价:-1.#QO
2020-09-07 21:20:23.116    SA00平仓价:-1.#QO
2020-09-07 21:20:23.280    C00是否满足PD条件:0.000
2020-09-07 21:20:23.281    C00是否满足PK条件:0.000
2020-09-07 21:20:23.281    C00是否满足KD条件:0.000
2020-09-07 21:20:23.282    C00是否满足KK条件:0.000
2020-09-07 21:20:23.283    C00开仓价:2339.000
2020-09-07 21:20:23.283    C00平仓价:2292.000
2020-09-07 21:20:23.419    B00是否满足PD条件:0.000
2020-09-07 21:20:23.420    B00是否满足PK条件:1.000
2020-09-07 21:20:23.421    B00是否满足KD条件:0.000
2020-09-07 21:20:23.421    B00是否满足KK条件:0.000
2020-09-07 21:20:23.422    B00开仓价:3483.000
2020-09-07 21:20:23.422    B00平仓价:3455.000
2020-09-07 21:20:23.578    PG00是否满足PD条件:0.000
2020-09-07 21:20:23.579    PG00是否满足PK条件:1.000
2020-09-07 21:20:23.579    PG00是否满足KD条件:0.000
2020-09-07 21:20:23.580    PG00是否满足KK条件:0.000
2020-09-07 21:20:23.580    PG00开仓价:3536.000
2020-09-07 21:20:23.581    PG00平仓价:3518.000
2020-09-07 21:20:24.061    CF00是否满足PD条件:0.000
2020-09-07 21:20:24.062    CF00是否满足PK条件:0.000
2020-09-07 21:20:24.062    CF00是否满足KD条件:0.000
2020-09-07 21:20:24.063    CF00是否满足KK条件:0.000
2020-09-07 21:20:24.063    CF00开仓价:-1.#QO
2020-09-07 21:20:24.064    CF00平仓价:-1.#QO
2020-09-07 21:20:24.596    NI00是否满足PD条件:1.000
2020-09-07 21:20:24.597    NI00是否满足PK条件:0.000
2020-09-07 21:20:24.598    NI00是否满足KD条件:0.000
2020-09-07 21:20:24.598    NI00是否满足KK条件:0.000
2020-09-07 21:20:24.599    NI00开仓价:120250.000
2020-09-07 21:20:24.599    NI00平仓价:119480.000
2020-09-07 21:20:25.123    SC0000是否满足PD条件:0.000
2020-09-07 21:20:25.123    SC0000是否满足PK条件:0.000
2020-09-07 21:20:25.124    SC0000是否满足KD条件:0.000
2020-09-07 21:20:25.125    SC0000是否满足KK条件:0.000
2020-09-07 21:20:25.125    SC0000开仓价:281.300
2020-09-07 21:20:25.126    SC0000平仓价:-1.#QO
2020-09-07 21:25:09.521    RB00是否满足PD条件:1.000
2020-09-07 21:25:09.521    RB00是否满足PK条件:0.000
2020-09-07 21:25:09.522    RB00是否满足KD条件:0.000
2020-09-07 21:25:09.523    RB00是否满足KK条件:0.000
2020-09-07 21:25:09.523    RB00开仓价:3747.000
2020-09-07 21:25:09.524    RB00平仓价:3743.000
2020-09-07 21:25:09.881    EG00是否满足PD条件:0.000
2020-09-07 21:25:09.882    EG00是否满足PK条件:1.000
2020-09-07 21:25:09.883    EG00是否满足KD条件:0.000
2020-09-07 21:25:09.885    EG00是否满足KK条件:0.000
2020-09-07 21:25:09.885    EG00开仓价:4024.000
2020-09-07 21:25:09.886    EG00平仓价:4049.000
2020-09-07 21:25:10.380    M00是否满足PD条件:0.000
2020-09-07 21:25:10.381    M00是否满足PK条件:1.000
2020-09-07 21:25:10.381    M00是否满足KD条件:0.000
2020-09-07 21:25:10.383    M00是否满足KK条件:0.000
2020-09-07 21:25:10.384    M00开仓价:3008.000
2020-09-07 21:25:10.385    M00平仓价:2976.000
2020-09-07 21:25:10.948    JM00是否满足PD条件:1.000
2020-09-07 21:25:10.948    JM00是否满足PK条件:0.000
2020-09-07 21:25:10.949    JM00是否满足KD条件:0.000
2020-09-07 21:25:10.949    JM00是否满足KK条件:0.000
2020-09-07 21:25:10.950    JM00开仓价:1288.500
2020-09-07 21:25:10.951    JM00平仓价:1285.500
2020-09-07 21:25:11.505    AL00是否满足PD条件:0.000
2020-09-07 21:25:11.506    AL00是否满足PK条件:1.000
2020-09-07 21:25:11.507    AL00是否满足KD条件:0.000
2020-09-07 21:25:11.508    AL00是否满足KK条件:0.000
2020-09-07 21:25:11.509    AL00开仓价:14500.000
2020-09-07 21:25:11.509    AL00平仓价:-1.#QO
2020-09-07 21:25:12.324    CU00是否满足PD条件:0.000
2020-09-07 21:25:12.324    CU00是否满足PK条件:0.000
2020-09-07 21:25:12.325    CU00是否满足KD条件:0.000
2020-09-07 21:25:12.326    CU00是否满足KK条件:0.000
2020-09-07 21:25:12.327    CU00开仓价:52030.000
2020-09-07 21:25:12.328    CU00平仓价:52390.000
2020-09-07 21:25:13.249    ZN00是否满足PD条件:0.000
2020-09-07 21:25:13.249    ZN00是否满足PK条件:0.000
2020-09-07 21:25:13.250    ZN00是否满足KD条件:0.000
2020-09-07 21:25:13.250    ZN00是否满足KK条件:0.000
2020-09-07 21:25:13.251    ZN00开仓价:19810.000
2020-09-07 21:25:13.252    ZN00平仓价:19895.000
2020-09-07 21:25:13.868    I00是否满足PD条件:0.000
2020-09-07 21:25:13.869    I00是否满足PK条件:0.000
2020-09-07 21:25:13.869    I00是否满足KD条件:0.000
2020-09-07 21:25:13.870    I00是否满足KK条件:0.000
2020-09-07 21:25:13.871    I00开仓价:868.500
2020-09-07 21:25:13.871    I00平仓价:-1.#QO
2020-09-07 21:25:14.125    MA00是否满足PD条件:1.000
2020-09-07 21:25:14.126    MA00是否满足PK条件:0.000
2020-09-07 21:25:14.126    MA00是否满足KD条件:0.000
2020-09-07 21:25:14.127    MA00是否满足KK条件:0.000
2020-09-07 21:25:14.127    MA00开仓价:2063.000
2020-09-07 21:25:14.128    MA00平仓价:2049.000
2020-09-07 21:25:14.411    TA00是否满足PD条件:0.000
2020-09-07 21:25:14.412    TA00是否满足PK条件:1.000
2020-09-07 21:25:14.412    TA00是否满足KD条件:0.000
2020-09-07 21:25:14.413    TA00是否满足KK条件:0.000

--  作者:wenarm
--  发布时间:2020/9/8 9:52:09
--  
手数呢?请问您知道加debugfile的目的吗?
--  作者:fxrock4
--  发布时间:2020/9/8 10:06:55
--  
是呀没手数呢,目的,目的。。。
DEBUGFILE(\'D:\\WeiSoft Stock_2\\Setting\\OrderLog\\test.txt\',STKLABEL+\'是否满足KD条件:%.3f\',KD);

--  作者:FireScript
--  发布时间:2020/9/8 10:07:38
--  
 不是。你要贴代码和你的程序化设置。其他的是看不出来问题的。
--  作者:fxrock4
--  发布时间:2020/9/8 11:03:46
--  

图片点击可在新窗口打开查看此主题相关图片如下:2020-09-08_110005.jpg
图片点击可在新窗口打开查看
这里出错么,开始时程序是设1手的