- UID
- 2
- 积分
- 2874604
- 威望
- 1387331 布
- 龙e币
- 1487273 刀
- 在线时间
- 13155 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
【C_BullEng_BearEng】
- inputs:
- Len( numericsimple ),
- oBullishEngulfing( numericref ),
- oBearishEngulfing( numericref ) ;
- variables:
- var0( 0 ),
- var1( 0 ),
- var2( 0 ) ;
- var0 = MaxList( Close, Open ) - MinList( Close, Open ) ;
- var1 = XAverage( Close, Len ) ;
- var2 = XAverage( var0, Len ) ;
- oBullishEngulfing = 0 ;
- oBearishEngulfing = 0 ;
- if CurrentBar > 1 then
- begin
- condition1 = Close < var1
-
- and Close > Open
-
- and var0 > var2
-
- and Close[1] < Open[1]
-
- and var0[1] < var2[1]
-
- and Close >= Open[1]
-
- and Open <= Close[1]
-
- and ( Close > Open[1] or Open < Close[1] );
- if condition1
-
- then
- oBullishEngulfing = 1
- else
- begin
- condition1 = Close > var1
-
- and Close < Open
-
- and var0 > var2
-
- and Close[1] > Open[1]
-
- and var0[1] < var2[1]
-
- and Close <= Open[1]
-
- and Open >= Close[1]
-
- and ( Close < Open[1] or Open > Close[1] );
- if condition1
-
- then
- oBearishEngulfing = 1 ;
- end;
- end ;
- C_BullEng_BearEng = 1 ;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|