【C_Hammer_HangingMan】
[code]inputs:Len( numericsimple ),
Factor( numericsimple ),
oHammer( numericref ),
oHangingMan( numericref ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 0 ),
var4( 0 ) ;
var0 = MaxList( Close, Open ) ;
var1 = MinList( Close, Open ) ;
var2 = var0 - var1 ;
var3 = XAverage( Close, Len ) ;
var4 = XAverage( var2, Len ) ;
oHammer = 0 ;
oHangingMan = 0 ;
condition1 = var2 < var4
and var2 > 0
and var1 > MedianPrice
and var1 - Low > Factor * var2
and High - var0 < var2 ;
if condition1
then
if Close < var3 then
oHammer = 1
else if Close > var3 then
oHangingMan = 1 ;
C_Hammer_HangingMan = 1 ;
[/code]
页:
[1]