金字塔决策交易系统

 找回密码
 

微信登录

微信扫一扫,快速登录

搜索
查看: 1837|回复: 1

直接这样写可以吗

[复制链接]

226

主题

879

帖子

879

积分

等级: 免费版

注册:
2022-4-2
曾用名:
发表于 2023-5-11 14:31 | 显示全部楼层 |阅读模式
或者不论日盘品种还是日盘品种直接下面这样
optime:=
(TIMETOT0(time)-TIMETOT0(opentime(1))>0 and TIMETOT0(time)-TIMETOT0(opentime(1))<=15*60)  or  
(TIMETOT0(time)-TIMETOT0(opentime(2))>0 and TIMETOT0(time)-TIMETOT0(opentime(2))<=15*60 ) or
(TIMETOT0(time)-TIMETOT0(opentime(3))>0 and TIMETOT0(time)-TIMETOT0(opentime(3))<=15*60)  or
(TIMETOT0(time)-TIMETOT0(opentime(4))>0 and TIMETOT0(time)-TIMETOT0(opentime(4))<=15*60)

cltime:= (not(islastbar) and time=closetime(1)) or (ISLASTBAR and TIMETOT0(closetime(1))-TIMETOT0(DYNAINFO(207))<=60) or
             (not(islastbar) and time=closetime(4)) or (ISLASTBAR and TIMETOT0(closetime(4))-TIMETOT0(DYNAINFO(207))<=60)


if optime or cltime then BEGIN
if bpkcond then begin
   sellshort(holding<0,holding,thisclose);
   buy(holding=0 and buy_filcond,lots,thisclose);
   end

if spkcond then begin
   sell(holding>0,holding,thisclose);
   buyshort(holding=0 and sell_filcond,lots,thisclose);
   end
end

回复

使用道具 举报

0

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
gxx978
发表于 2023-5-11 14:37 | 显示全部楼层
https://www.weistock.com/bbs/for ... &extra=page%3D1
请勿重复发帖,感谢配合。
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 微信登录

本版积分规则

手机版|小黑屋|上海金之塔信息技术有限公司 ( 沪ICP备13035422号 )

GMT+8, 2025-7-9 04:25 , Processed in 0.093553 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表