- UID
- 2
- 积分
- 2892947
- 威望
- 1396505 布
- 龙e币
- 1496442 刀
- 在线时间
- 13326 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-12-26
|
【_Single 2dir Rnge En】
- inputs:
- DayOrGTF( 1 ),
- RangeHi( 105 ),
- RangeLo( 95 ),
- Quantity( 1000 ),
- EffectiveBarDate_YYMMDD( 030102 ),
-
- EffectiveBarTime_HHMM( 1300 ) ;
-
-
- variables:
- var0( iff( EffectiveBarDate_YYMMDD < 500000, EffectiveBarDate_YYMMDD
- + 1000000, EffectiveBarDate_YYMMDD ) ),
- var1( false ),
- var2( false ),
- var3( false ),
- var4( false ) ;
- var1 = Date next bar = var0 and ( BarType = 2 or
- ( BarType = 1 and Time next bar >= EffectiveBarTime_HHMM ) ) ;
- var2 = Date next bar > var0 ;
- if DayOrGTF = 1 then
- var3 = var1
- else
- var3 = var1 or var2 ;
- if var3 then
- begin
- condition1 = var4 = false
- and var3[1]
- and ( High >= RangeHi or Low <= RangeLo ) ;
- if condition1
- then
- var4 = true ;
- if var4 = false then
- begin
- Buy Quantity shares next bar at RangeHi stop ;
- Sell Short Quantity shares next bar at RangeLo stop ;
- end ;
- end ;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|