以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  请老师修改公式  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=142196)

--  作者:yzhybw
--  发布时间:2016/11/4 8:13:56
--  请老师修改公式
input:n(1,1,100);
input:x(1,1,100);
if todaybar>1 and h>ref(c,todaybar)*1.1 then tbuy(1,n%,mkt),pertrader;
if tbuyholding(0)>0 and  (tenterprice-c)/tenterprice>=x/100 then tsell(1,0,mkt)

请老师把上面的公式修改成图表程序化策略,满足以下2个条件,1:自己选可能涨停板的股股票,2:用手数买入并且手数可调.

--  作者:yzhybw
--  发布时间:2016/11/4 8:25:59
--  
可能涨停的条件和卖出条件如上面公式不变。
--  作者:jinzhe
--  发布时间:2016/11/4 8:50:52
--  
input:n(1,1,100);
input:x(1,1,100);
if todaybar>1 and h>ref(c,todaybar)*1.1 then buy(1,n,market);
if holding>0 and  (enterprice-c)/enterprice>=x/100 then sell(1,0,market);

--  作者:yzhybw
--  发布时间:2016/11/4 10:19:53
--  
请老师再看看刚修改的公式不会成交,如002778刚涨停,我也做模拟了,没成交,我只买股票。
--  作者:jinzhe
--  发布时间:2016/11/4 10:22:41
--  
input:n(1,1,100);
input:x(1,1,100);
if todaybar>1 and h>=ref(c,todaybar)*1.09 then buy(1,n,market);
if holding>0 and  (enterprice-c)/enterprice>=x/100 then sell(1,0,market);
大概是这样,因为图表里面不能直接用涨停价,所以用一个近似算法来算涨停价

--  作者:yzhybw
--  发布时间:2016/11/4 10:42:48
--  
input:n(100,100,1000);
input:x(1,1,100);
if todaybar>1 and h>=ref(c,todaybar)*1.09 then buy(1,n,market);
if holding>0 and  (enterprice-c)/enterprice>=x/100 then sell(1,0,market);

老师再看看,我交易是股票我把input:n(1,1,100);改成input:n(100,100,1000);
又模拟了,仍然没成交,不知问题出在啥地方?

--  作者:jinzhe
--  发布时间:2016/11/4 10:46:16
--  
有信号没
--  作者:yzhybw
--  发布时间:2016/11/4 10:47:31
--  
没信号
--  作者:yzhybw
--  发布时间:2016/11/4 10:48:23
--  
没反应
--  作者:jinzhe
--  发布时间:2016/11/4 10:57:28
--  
日线还是分钟线