金字塔開盤半小時突破多空交易策略[金字塔模型]
- 編寫內容:
老師;請教1個模型的編寫:交易周期15分鐘周期,交易手數:2手,每天開倉只一次。交易思路:在每天開盤半小時后,接下來超過前半小時最高價1個點做多,低于前半小時最低價1個點做空。止損都是15個點。盈利脫離開倉價15個點止損就調到開倉價。盈利高過開倉價30點,止盈1手,超過70點止盈另1手,沒到止損 止盈價,就以收盤前1分鐘的收盤價平倉。謝謝老師!
- 金字塔技術人員:
input:n(2,1,100);
variable:n1=0;//計算次數zuigao:valuewhen(time<=094500,hhv(h,todaybar));//前半個小時最高價
zuidi:valuewhen(time<=094500,llv(l,todaybar));//前半個小時最高價if h>zuigao and todaybar>2 and n1=0 and time<151500 then begin
buy(holding=0,1,market);
n1:=1;
endif l<zuidi and todaybar>2 and n1=0 and time<151500 then begin
buyshort(holding=0,1,market);
n1:=1;
endif c-enterprice>=15*mindiff and holding<0 then sellshort(holding<0,0,market);
if enterprice-c>=15*mindiff and holding>0 then sell(holding>0,0,market);//止損
if c-enterprice>=30*mindiff and holding>0 then sell(holding>0,0,market);
if enterprice-c>=30*mindiff and holding<0 then sellshort(holding<0,0,market);//止盈
if time>=151500 then begin
sell(holding>0,0,market);
sellshort(holding<0,0,market);
n1:=0;
endif datatype<>3 then exit;
1盈利脫離開倉價15個點止損就調到開倉價,這句不懂
2一天只開一手倉,那么70點的二次止盈就沒啥用了。
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 262069696 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容