以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  日K线公式加上1分钟K止盈如何写  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=65422)

--  作者:雪球
--  发布时间:2014/5/25 22:39:57
--  日K线公式加上1分钟K止盈如何写

if datatype<>6 then
begin
drawtextex(1,1,50,950,\'本程序使用日线周期,请切换到日线周期\');
exit;
end

m1:= t0totime(timetot0(closetime(0))-60); //收盘前60秒平仓

if dynainfo(207)>opentime(1) and holding=0 and islastbar then
begin
buy(1,1,limitr,open+3*mindiff);
end

//止损50

if holding>0 and L<enterprice-50*mindiff and islastbar then
begin
sell(1,1,market);
end

if dynainfo(207)>m1 and holding>0 and islastbar then
begin
sell(1,1,market);
end


持仓:holding,linethick0;
资产:asset,noaxis;
可用现金:cash(0),linethick0;

 

 

上面为日k线公式,想加上1分钟K的移动止盈公式,请问老师如何写?

--  作者:jinzhe
--  发布时间:2014/5/26 9:21:55
--  
这个做不到,跨周期引用也不好解决
--  作者:雪球
--  发布时间:2014/5/26 9:56:08
--  
请老师跨周期的写下,我模拟盘测试下,才能搞清为什么不行。好吗?
--  作者:jinzhe
--  发布时间:2014/5/26 10:05:03
--  

做不到

[此贴子已经被作者于2014/5/26 10:05:25编辑过]

--  作者:雪球
--  发布时间:2014/5/26 10:17:39
--  
谢谢