Rss & SiteMap

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

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

标题:开空

1楼
pxmygl 发表于:2014/8/15 9:22:35
 

现K低于A-8点, 且前4K中有1K低于A-8点, 开空

A:= hhv(h, todaybar);

if ref(L,1)<(A-8) or ref(L,2)<(A-8) or ref(L,3)<(A-8) or ref(L,4)<(A-8) and L<=a-8 then begin

buyshort(holding=0,1,market);

end

对不对?

其它方法?

2楼
jinzhe 发表于:2014/8/15 9:32:22

A:= hhv(h, todaybar);

if l<a-8 and ref(any(l<a-8,4),1) then begin

buyshort(holding=0,1,market);

end

3楼
pyd 发表于:2014/8/15 9:32:54
A:= hhv(h, todaybar);
if l<=a-8 and ref(llv(l,4),1)<a-8 then
buyshort(holding=0,1,market);
[此贴子已经被作者于2014/8/15 9:33:20编辑过]
4楼
pxmygl 发表于:2014/8/15 9:36:52

if l<a-8 and ref(any(l<a-8,4),1) then begin

要求:4为不确定值,可能为3或2或1或0

??
5楼
jinzhe 发表于:2014/8/15 9:39:01

用any你再想想看对不对

6楼
pxmygl 发表于:2014/8/15 10:11:14

图片点击可在新窗口打开查看此主题相关图片如下:1.jpg
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:2.jpg
图片点击可在新窗口打开查看
7楼
pxmygl 发表于:2014/8/15 10:12:38

我要的是第二种

any会有第一种

8楼
jinzhe 发表于:2014/8/15 10:17:16

那你写的也不对,你写的和我一个意思,只不过我是简化了的

要写成

ref(l,1)<a-8 and not(ref(l,2)<a-8) and not(ref(l,3)<a-8) and not(ref(l,4)<a-8) or

ref(l,2)<a-8 and not(ref(l,1)<a-8) and not(ref(l,3)<a-8) and not(ref(l,4)<a-8) or

ref(l,3)<a-8 and not(ref(l,1)<a-8) and not(ref(l,2)<a-8) and not(ref(l,4)<a-8) or

ref(l,4)<a-8 and not(ref(l,1)<a-8) and not(ref(l,2)<a-8) and not(ref(l,3)<a-8)

 

前4只有一个 条件成立

9楼
pxmygl 发表于:2014/8/15 10:21:56

不能简化?

10楼
jinzhe 发表于:2014/8/15 10:31:03
sumbars(l<a-8,1)<=4看看这个咋样
共24 条记录, 每页显示 10 条, 页签: [1] [2][3]


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