[求助]請老師幫忙寫個模型代碼 [金字塔]
- 咨詢內容:
請老師幫忙寫個簡單的均線模型:一分鐘K線周期上用MA15做多空進場條件,當K線收盤價大于均線值5(N)個點則做多,相反則做空,固定下一手。如果盈利超過10點之后回撤達到3點,就平倉,保住盈利。超過10個點的盈利則采取移動止盈,回落至70%的時候平倉。若下單后行情即刻相反的話5個點止損出場。謝謝?。?!
- 金字塔客服:
處理中,請稍等
- 用戶回復:
老師期待ing............
- 網友回復:
多頭為例
VARIABLE:n=0,m=0;
ma15:ma(c,15);
hh:hhv(h,enterbars+1);
if c>ma15+5 then buy(holding=0,1,market);if h-enterprice>=3 and h-enterprice<=10 then n:=1;
if l-enterprice<=3 and n=1 then begin
sell(holding>0,holding,market);
n:=0;
end
if h-enterprice>10 then m:=1;
if l-enterprice<=0.7*(hh-enterprice) and m=1 then begin
sell(holding>0,holding,market);
m:=0;
end
if enterprice-l>=15 then sell(holding>0,holding,market); - 網友回復:
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容