Rss & SiteMap

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

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

标题:老师帮忙编写策略

1楼
huo88 发表于:2018/4/24 10:53:38
收盘价大于前收盘价,买入
2楼
FireScript 发表于:2018/4/24 10:54:31
 if c>ref(c,1) then buy(holding=0,1,market);

一句代码就行了。
3楼
huo88 发表于:2018/4/24 11:20:35

如果一根比一根收盘大, 只开三次,每次一手。等到收盘小于前一根时,全部平仓,并且开空一手,最多也是连续开三次。反复如此。谢谢好老师再帮下

4楼
FireScript 发表于:2018/4/24 13:21:49
 
if ref(c,1)<c then
begin
sellshort(holding<0,holding,market);
buy(holding<3 and holding>=0,1,market);
end

if c<ref(c,1) then
begin
sell(holding>0,holding,market);
buyshort(holding<=0 and abs(holding)<3,1,market);
end

持仓:holding;
5楼
huo88 发表于:2018/4/24 14:26:36

不行,导入会乱套的,老师你给看看

6楼
huo88 发表于:2018/4/24 14:30:26
可以了
共6 条记录, 每页显示 10 条, 页签: [1]


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