以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  thisclose ,limit  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=95140)

--  作者:打盹的小和尚
--  发布时间:2016/3/25 16:04:22
--  thisclose ,limit
请教老师,周期5秒钟K线,在下述代码中

if holding=0  && time = 145955 then  begin


 buyshort(1,n,thisclose);
 
end

thisclose在测试时是按145955那个K线的收盘价格进行计算的,而实盘中却是按照对手价进行委托

我就是想在实盘中也实现以145955这根K线的收盘价格来委托,那这样表达是否正确:

if holding=0  && time = 145955 then  begin


 buyshort(1,n,limit,close);
 
end

--  作者:jinzhe
--  发布时间:2016/3/25 16:13:03
--  

在走完k线模式的前提下单,代码改为

if holding=0  && time = 145955 then  begin


 buyshort(1,n,limitR,close);
 
end

要加一个R,才是本周期,不加R为次周期价格