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:用手数买入并且手数可调.
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);
请老师再看看刚修改的公式不会成交,如002778刚涨停,我也做模拟了,没成交,我只买股票。
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);
大概是这样,因为图表里面不能直接用涨停价,所以用一个近似算法来算涨停价
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);
又模拟了,仍然没成交,不知问题出在啥地方?