以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 请教关于todaybar (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=58826) |
-- 作者:punkcat401 -- 发布时间:2013/11/15 11:25:08 -- 请教关于todaybar 开盘后三根K线内,第一次出现的阳线,用 valuewhen(todaybar=3,C>O) 好像不行 这个阳线可能是第一根,也可能是第三根,应该怎么描述呢 |
-- 作者:jinzhe -- 发布时间:2013/11/15 11:26:19 -- 求这个阳线的周期数?
|
-- 作者:punkcat401 -- 发布时间:2013/11/15 11:29:58 -- 以下是引用jinzhe在2013/11/15 11:26:19的发言:
求这个阳线的周期数?
阳线出现时 then buy |
-- 作者:jinzhe -- 发布时间:2013/11/15 13:16:25 -- if todaybar=1 and c>o or todaybar=2 and c>o or todaybar=3 and c>o then buy(holding=0,1,market); |
-- 作者:punkcat401 -- 发布时间:2013/11/15 13:20:30 -- 以下是引用jinzhe在2013/11/15 13:16:25的发言:
if todaybar=1 and c>o or todaybar=2 and c>o or todaybar=3 and c>o then buy(holding=0,1,market); 只能这样写吗,不能够自动识别吗 如果是30根K线内,岂不是要写很多条。。。。 |
-- 作者:jinzhe -- 发布时间:2013/11/15 13:31:11 -- cond:=valuewhen(todaybar=30,any(c>o,30)); if cond then buy.... |
-- 作者:punkcat401 -- 发布时间:2013/11/15 13:39:34 -- 以下是引用jinzhe在2013/11/15 13:31:11的发言:
cond:=valuewhen(todaybar=30,any(c>o,30)); if cond then buy.... 如果第二根就满足C>O,那就没有后面的28根了,不能先把todaybar=30写定吧 todaybar<=30,但具体是开盘后第几根出信号需要自动识别 |
-- 作者:jinzhe -- 发布时间:2013/11/15 13:45:51 -- variable:n=0;
if todaybar<=30 and c>O and holding=0 then begin buy(holding=0,1,market); n:=time; end
n就是
|
-- 作者:punkcat401 -- 发布时间:2013/11/15 14:09:25 -- 以下是引用jinzhe在2013/11/15 13:45:51的发言:
variable:n=0;
if todaybar<=30 and c>O and holding=0 then begin buy(holding=0,1,market); n:=time; end
n就是
如果这根C>O的K线成后,要求下一根和下下根的K线的close小于这根K线的CLOSE呢 REF(Todaybar<=30,2)好像不行,周期不固定 |
-- 作者:jinzhe -- 发布时间:2013/11/15 14:26:28 -- 求下一根的close还是k线? |