欢迎您光临花生网社区!
| |

 找回密码
 立即注册
查看: 5814|回复: 13
打印 上一主题 下一主题

怎么写语句判断现在是几点几分? [复制链接]



Rank: 3Rank: 3

跳转到指定楼层
1#
发表于 2013-5-7 13:12:12 |只看该作者 |正序浏览 | [分享到 腾讯微博 新浪微博]
比如我有个策略只有在14:35分开始执行判断,一直到收盘

使用道具 举报



Rank: 3Rank: 3

14#
发表于 2013-5-14 21:22:11 |只看该作者 | [分享到 腾讯微博 新浪微博]
噢,感谢,看来还不够完善啊

使用道具 举报



Rank: 8Rank: 8

13#
发表于 2013-5-14 16:40:28 |只看该作者 | [分享到 腾讯微博 新浪微博]
winplusx 发表于 2013-5-14 11:58
要在界面上叠加啊。。。不能直接引用吗?

要引用可以用refdata,但不能用到交易策略中,只能用在指标中
1,Initial stop loss
2,Trailing stop loss(Moves up from initial stop to reduce risk,Protects us at break-even point)
3,Profit protection stop(Keeps winning trades from becoming losses,Locks in a portion of the open profit)
4,Profit maximizing exit(Attempts to exit without giving back profits)

使用道具 举报



Rank: 3Rank: 3

12#
发表于 2013-5-14 11:58:47 |只看该作者 | [分享到 腾讯微博 新浪微博]
要在界面上叠加啊。。。不能直接引用吗?

使用道具 举报



Rank: 8Rank: 8

11#
发表于 2013-5-14 08:46:46 |只看该作者 | [分享到 腾讯微博 新浪微博]
一样的啊。
期指上叠加hs300,
交易程序里写:
基差:c-data2.c;
1,Initial stop loss
2,Trailing stop loss(Moves up from initial stop to reduce risk,Protects us at break-even point)
3,Profit protection stop(Keeps winning trades from becoming losses,Locks in a portion of the open profit)
4,Profit maximizing exit(Attempts to exit without giving back profits)

使用道具 举报



Rank: 3Rank: 3

10#
发表于 2013-5-14 00:53:01 |只看该作者 | [分享到 腾讯微博 新浪微博]
如何在交易程序里写

使用道具 举报



Rank: 8Rank: 8

9#
发表于 2013-5-13 09:36:03 |只看该作者 | [分享到 腾讯微博 新浪微博]
winplusx 发表于 2013-5-12 13:48
感谢,再问个问题,怎么表示当前股指期货与沪深300之间的基差?即股指期货-沪深300指数? ...

期指上叠加hs300,
然后用公式:
基差:c-data2.c;
1,Initial stop loss
2,Trailing stop loss(Moves up from initial stop to reduce risk,Protects us at break-even point)
3,Profit protection stop(Keeps winning trades from becoming losses,Locks in a portion of the open profit)
4,Profit maximizing exit(Attempts to exit without giving back profits)

使用道具 举报



Rank: 3Rank: 3

8#
发表于 2013-5-12 13:48:00 |只看该作者 | [分享到 腾讯微博 新浪微博]
感谢,再问个问题,怎么表示当前股指期货与沪深300之间的基差?即股指期货-沪深300指数?

使用道具 举报



Rank: 8Rank: 8

7#
发表于 2013-5-7 14:37:37 |只看该作者 | [分享到 腾讯微博 新浪微博]
#Run_By_Bar

variable:最后一小时h(0),
                 最后一小时l(0);
if Date <> Date[1] then
begin
        最后一小时l=0;
        最后一小时h=0;
end
if(time>=141500 and time <151500) then
begin
        if 最后一小时l=0 then 最后一小时l=l;
        最后一小时l=if(l<最后一小时l,l,最后一小时l);
        最后一小时h=if(h>最后一小时h,h,最后一小时h);
          
end
ll:最后一小时l;
hh:最后一小时h;
1,Initial stop loss
2,Trailing stop loss(Moves up from initial stop to reduce risk,Protects us at break-even point)
3,Profit protection stop(Keeps winning trades from becoming losses,Locks in a portion of the open profit)
4,Profit maximizing exit(Attempts to exit without giving back profits)

使用道具 举报



Rank: 3Rank: 3

6#
发表于 2013-5-7 13:29:32 |只看该作者 | [分享到 腾讯微博 新浪微博]
还有个问题,我如果要取得股指期货最后一小时(14:15--15:15)的最高,最低,收盘应该怎么写?

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册


bottom

Archiver|www.hs633.com ( 粤ICP备11107430号 )

GMT+8, 2024-6-27 01:08 , Processed in 0.085937 second(s), 8 queries .

花生网 Copyright©2012-2014

回顶部