V2.0
@ 提升下單機處理速度
@ 新增康和API下單(人工下單不支援)
@ 新增康和API下單(人工下單不支援)
使用注意:
- 請將自己的康和API內物件覆蓋過下單機內檔案,並執行[註冊元件]
將自己的康和API註冊到主機內,未執行此動作無法使用此功能
if condition then buy this bar on close; if marketposition > 0 then exitlong next bar at entryprice(0)+20 limit;
if condition then begin buy this bar on close; exitlong next bar at close+20 limit end; if marketposition > 0 then exitlong next bar at entryprice(0)+20 limit;
if condition then buy this bar on close; if marketposition > 0 then exitlong next bar at entryprice(0)-20 stop;
if condition then begin buy this bar on close; buy next bar at close-20 stop; end; if marketposition > 0 then exitlong next bar at entryprice(0)-20 stop;
if condition then buy next bar at value1 stop; if marketposition > 0 then exitlong next bar at entryprice(0)+20 limit;
if condition then begin buy next bar at value1 stop; exitlong next bar at value1+20 limit end; if marketposition > 0 then exitlong next bar at entryprice(0)+20 limit;
if codition then buy next bar at value1 stop; if marketposition > 0 then begin exitlong next bar at entryprice(0)+30 limit; exitlong next bar at entryprice(0)-20 stop; end;
/* Mail: ChunI.Kuo@Gmail.com Blog: http://chunikuo.blogspot.com/ Designed by Chun-I Kuo */ parameters: Length(Numeric); vars: ShortDate(0), TM(0), MBD(0), Q(0), M(0), Y(0); ShortDate = floor((date/100))*100; MBD = BalanceDayOfMonth(ShortDate); if date > MBD then // The balance day of this month has passed TM = floor(date / 10000) * 12 + month(date) - Length + 1 else // The balance day of this month doesn't arrival TM = floor(date / 10000) * 12 + month(date) - Length; end if BalanceDay = BalanceDayOfMonth((Floor(TM/12)*100 + Mod(TM, 12))*100);
/* Mail: ChunI.Kuo@Gmail.com Blog: http://chunikuo.blogspot.com/ Designed by Chun-I Kuo */ parameters: M1(Numeric); if dayofweek(M1+01) = 0 then BalanceDayOfMonth = M1+18 else if dayofweek(M1+01) = 1 then BalanceDayOfMonth = M1+17 else if dayofweek(M1+01) = 2 then BalanceDayOfMonth = M1+16 else if dayofweek(M1+01) = 3 then BalanceDayOfMonth = M1+15 else if dayofweek(M1+01) = 4 then BalanceDayOfMonth = M1+21 else if dayofweek(M1+01) = 5 then BalanceDayOfMonth = M1+20 else if dayofweek(M1+01) = 6 then BalanceDayOfMonth = M1+19; end if end if end if end if end if end if end if
{ Mail: ChunI.Kuo@Gmail.com Blog: http://chunikuo.blogspot.com/ Designed by Chun-I Kuo } Inputs: Length(NumericSimple); vars: ShortDate(0), TM(0), MBD(0), Q(0), M(0), Y(0); ShortDate = floor((date/100))*100; MBD = BalanceDayOfMonth(ShortDate); if date > MBD then {The balance day of this month has passed} TM = floor(date / 10000) * 12 + month(date) - Length + 1 else {The balance day of this month doesn't arrival} TM = floor(date / 10000) * 12 + month(date) - Length; BalanceDay = BalanceDayOfMonth((Floor(TM/12)*100 + Mod(TM, 12))*100);
{ Mail: ChunI.Kuo@Gmail.com Blog: http://chunikuo.blogspot.com/ Designed by Chun-I Kuo } Inputs: M1(NumericSimple); if dayofweek(M1+01) = 0 then BalanceDayOfMonth = M1+18 else begin if dayofweek(M1+01) = 1 then BalanceDayOfMonth = M1+17 else begin if dayofweek(M1+01) = 2 then BalanceDayOfMonth = M1+16 else begin if dayofweek(M1+01) = 3 then BalanceDayOfMonth = M1+15 else begin if dayofweek(M1+01) = 4 then BalanceDayOfMonth = M1+21 else begin if dayofweek(M1+01) = 5 then BalanceDayOfMonth = M1+20 else begin if dayofweek(M1+01) = 6 then BalanceDayOfMonth = M1+19; end; end; end; end; end; end;