Rss & SiteMap

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

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

标题:请问如何实现开仓用K线走完,平仓用固定时间间隔

1楼
IF左边 发表于:2015/7/14 11:47:19
我想开仓用一根K线走完的模式,平仓用固定时间间隔的模式,如何能实现。
2楼
COMBOY 发表于:2015/7/14 12:37:20

if cross(c,上轨) and time>091500 and time<150000  then
begin
buy(holding=0,ss,limitr,上轨);
end
if cross(下轨,c) and time>091500 and time<150000 then
begin
buyshort(holding=0,ss,limitr,下轨);
end
if holding>0 and cross(中轨,c) then
begin
sell(1,0,limitr,中轨);
end
if holding<0 and cross(c,中轨) then
begin
sellshort(1,0,limitr,中轨);
end

 

 

 

上面这段代码如何实现走完k线开仓,平仓固定轮询?请教高手帮助

[此贴子已经被作者于2015/7/14 12:38:30编辑过]
3楼
jinzhe 发表于:2015/7/14 13:08:14

if ref(cross(c,上轨),1) and time>091500 and time<150000  then
begin
buy(holding=0,ss,limitr,上轨);
end
if ref(cross(下轨,c),1) and time>091500 and time<150000 then
begin
buyshort(holding=0,ss,limitr,下轨);
end
if holding>0 and cross(中轨,c) then
begin
sell(1,0,limitr,中轨);
end
if holding<0 and cross(c,中轨) then
begin
sellshort(1,0,limitr,中轨);
end

 

 

使用固定时间间隔模式,时间间隔设置为1秒

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


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