請老師修改公式
作者:金字塔 來源:cxh99.com 發布時間:2016年12月05日
- 咨詢內容:
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);
大概是這樣,因為圖表里面不能直接用漲停價,所以用一個近似算法來算漲停價