Rss & SiteMap

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

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

标题:请问如何修改此模型

1楼
liyuanhao 发表于:2015/5/8 10:16:17
if time>091500 and time<150000 then
begin
if cross(h,r6) then
begin
buy(holding=0,tn,limitr,r6);

此句 : if cross(h,r6) then

CROSS 函数在逐K线模式下不能直接在IF控制语句之内引用。
为什么 下面写法有可以?

if cross(h,r6)  then
 begin
 buy(holding=0,tn,limitr,r6);
 end
if cross(r7,l) then
 begin
 buyshort(holding=0,tn,limitr,r7);
2楼
jinzhe 发表于:2015/5/8 10:18:37

你对“CROSS 函数在逐K线模式下不能直接在IF控制语句之内引用。”理解不对

 

if cross(a,b)  then .......;

这个是可行的

 

if  xxx  then begin

    if cross(a,b) then .......;

end

这个是不可行的

 

cross外面还嵌套了一个if是不行的

[此贴子已经被作者于2015/5/8 10:19:16编辑过]
3楼
liyuanhao 发表于:2015/5/8 10:31:11
谢谢
共3 条记录, 每页显示 10 条, 页签: [1]


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