移動止盈怎么寫 [金字塔]
- 咨詢內容:
盈利達到0.5%后最大盈利回跌n%怎么寫,求教高手,謝謝
- 金字塔客服:
盈利達到0.5%后最大盈利回跌n%止盈該怎么寫,求教高手,謝謝
- 用戶回復:
VARIABLE:x=0,m=0;
//多頭
hh:=hhv(h,enterbars+1);
t1:hh-ENTERPRICE>0.05*enterprice;
t2:hh-l>=0.0n*hh;
if t1 then x:=1;
if x=1 and t2 and holding>0 then begin
sell(1,holding,market);
x:=0;
end
//空頭
ll:=llv(l,enterbars+1);
k1:=enterprice-ll>0.05*enterprice;
k2:h-ll>=0.0n*ll;
if k1 then m:=1;
if m=1 and k2 and holding<0 then
begin
sellshort(1,holding,market);
m:=0;
end - 網友回復: 感謝版主指教
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容