跳到主要內容

台指波段週期


Input: f1(0.007),f2(0.016);
Vars: WHL(0),WH(0),WL(0);

WHL= (highw(0)+loww(0))* 0.5;

WH= WHL*(1+f1);
WL= WHL*(1-f2);

 
if time>=0900 and time<1300 and="" begin="" date="" entriestoday="" span="" then="">
If marketposition<= 1 and close cross over WH then
buy next bar at market;

 
If marketposition>= -1 and close cross under WL then
sellshort next bar at market;
end;

 
if marketposition>0 then sell next bar at entryprice*(1-0.02) stop;
if marketposition<0 at="" bar="" buytocover="" entryprice="" next="" span="" stop="" then="">

if marketposition<>0 and _IsSettlementDay then begin
setexitonclose;
end;

留言

這個網誌中的熱門文章

17分鐘波段策略

使用中 觀察中 待修正 TXF_17min_1 TXF_17min_2 TXF_17min_3 TXF_17min_4 TXF_17min_5 TXF_17min_6 TXF_17min_7 TXF_17min_8 TXF_17min_9 TXF_17min_10 * TXF_17min_11 TXF_17min_12 TXF_17min_13 TXF_17min_14 * TXF_17min_15