- UID
- 2
- 积分
- 2892307
- 威望
- 1396185 布
- 龙e币
- 1496122 刀
- 在线时间
- 13313 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-12-25
|
【TimeExit (Calndr) SX】
- [IntrabarOrderGeneration = false]
- inputs:
- NumDays( 3 ),
- NumHours( 0 ),
- NumMinutes( 0 ) ;
- variables:
- var0( 0 ),
- var1( 0 ),
- var2( 0 ),
- var3( NumHours * 60 + NumMinutes ) ;
- if MarketPosition = -1 then
- begin
- var0 = DateToJulian( Date ) - DateToJulian( EntryDate ) ;
- var1 = TimeToMinutes( Time ) - TimeToMinutes( EntryTime ) ;
- var2 = var0 - NumDays ;
- condition1 = var2 >= 0 and var1 + var2 * 1440 >= var3 ;
- if condition1 then
- Buy To Cover ( "TimeCalSX" ) next bar at market ;
- end ;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|