【C_BullHar_BearHar】
[code]inputs:Len( numericsimple ),
oBullishHarami( numericref ),
oBearishHarami( numericref ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ) ;
var0 = MaxList( Close, Open ) - MinList( Close, Open ) ;
var1 = XAverage( Close, Len ) ;
var2 = XAverage( var0, Len ) ;
oBullishHarami = 0 ;
oBearishHarami = 0 ;
if CurrentBar > 1 then
begin
condition1 = Close < var1
and Close > Open
and var0 < var2
and C[1] < O[1]
and var0[1] > var2[1]
and Close <= Open[1]
and Open >= Close[1]
and var0[1] / var0 >= 1.3;
if condition1
then
oBullishHarami = 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 var0[1] / var0 >= 1.3;
if condition1
then
oBearishHarami = 1 ;
end;
end ;
C_BullHar_BearHar = 1 ;
[/code]
页:
[1]