Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共15 条记录, 每页显示 10 条, 页签: [1] [2]
[浏览完整版]

标题:图表交易连续开多平空,怎么编写?

1楼
songsongl 发表于:2014/9/22 16:31:53
图表交易连续开多平空,怎么编写?
2楼
jinzhe 发表于:2014/9/22 16:39:58

if  开多平空条件 then begin

     sellshort(1,0,market);

     buy(holding=0,1,market);

end

3楼
songsongl 发表于:2014/9/22 16:55:47
对这个语句还是不太懂,那有详细点的教程?
4楼
jinzhe 发表于:2014/9/22 17:00:03

http://www.weistock.com/WeisoftHelp/gongshibianxiejiaocheng.htm

金字塔公式教程,只要看现在只看初级篇就行了

5楼
songsongl 发表于:2014/9/22 20:14:36
bb>0开多平空
ss>0开空平多
收盘价上穿a平空开多
收盘价下穿b平多开空


老师这四个能在图表交易中做到吗,该怎么写?

6楼
pyd 发表于:2014/9/23 9:04:29
if bb>0 then begin
sellshort(holding<0,1,market);
buy(holding=0,1,market);
end
if ss>0 then begin
sell(holding>0,1,market);
buyshort(holding=0,1,market);
end
t1:=cross(c,a);
t2:=cross(b,c);
if t1 then begin
sellshort(holding<0,1,market);
buy(holding=0,1,market);
end
if t2 then BEGIN
sell(holding>0,1,market);
buyshort(holding=0,1,market);
end
7楼
songsongl 发表于:2014/9/23 12:59:07
感谢老师,前半部分已经顺利工作,后半不分不工作,正在找原因。
t1:=cross(c,a);
t2:=cross(b,c);
if t1 then begin
sellshort(holding<0,1,market);
buy(holding=0,1,market);
end
if t2 then BEGIN
sell(holding>0,1,market);
buyshort(holding=0,1,market);
end
8楼
songsongl 发表于:2014/9/23 13:01:48
老师,要是开仓为1手,平仓为全仓是不是把这个1改为0
sellshort(holding<0,1,market);
buy(holding=0,1,market);
9楼
FexTel 发表于:2014/9/23 13:32:23

把平仓仓位改为HOLDING,若改成0,则会平仓账户所有持仓

sellshort(holding<0,holding,market);
buy(holding=0,1,market);
10楼
songsongl 发表于:2014/9/23 15:02:17
为什么我模拟交易设置是5手,结果下单成了26手,不知道啥原因

共15 条记录, 每页显示 10 条, 页签: [1] [2]


Powered By Dvbbs Version 8.3.0
Processed in 0.02344 s, 3 queries.