Rss & SiteMap

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

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

标题:老师帮忙编写一个公式

1楼
ed421 发表于:2016/7/28 10:48:58
如果当前价比上一根K线的收盘价大于10,做多
如果当前价比上一根K线的收盘价小于10,做空
开仓后的第五根K线开盘价平仓

2楼
jinzhe 发表于:2016/7/28 10:51:48

if holding=0 and c>ref(c,1)+10 then buy(1,1,thisclose);

if holding=0 and c<ref(c,1)-10 then buyshort(1,1,thisclose);

if enterbars=5 then begin

   sell(1,0,limitr,o);

   sellshort(1,0,limitr,o);

end

3楼
ed421 发表于:2016/7/28 11:42:49
当前最新价怎么写呢
4楼
jinzhe 发表于:2016/7/28 12:55:25
用close,简写为c
共4 条记录, 每页显示 10 条, 页签: [1]


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