【C_3WhSolds_3BlkCrows】
[code]inputs:Len( numericsimple ),
Percent( numericsimple ),
o3WhiteSoldiers( numericref ),
o3BlackCrows( numericref ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 0 ),
var4( 0 ),
var5( 0 ),
var6( 0 ),
var7( Percent * .01 ) ;
var0 = MaxList( Close, Open ) ;
var1 = MinList( Close, Open ) ;
var2 = var0 - var1 ;
var3 = XAverage( var2, Len ) ;
var4 = High - var0 ;
var5 = var1 - Low ;
var6 = High - Low ;
o3WhiteSoldiers = 0 ;
o3BlackCrows = 0 ;
condition1 = CurrentBar > 2
and var2 > var3
and var2[1] > var3[1]
and var2[2] > var3[2] ;
if condition1
then
begin
condition1 = Close > Open
and Close[1] > Open[1]
and Close[2] > Open[2]
and Close > Close[1]
and Close[1] > Close[2]
and Open < Close[1] and Open > Open[1]
and Open[1] < Close[2] and Open[1] > Open[2]
and var4 / var6 < var7
and var4[1] / var6[1] < var7
and var4[2] / var6[2] < var7 ;
if condition1
then
o3WhiteSoldiers = 1
else begin
condition1 = Close < Open
and Close[1] < Open[1]
and Close[2] < Open[2]
and Close < Close[1]
and Close[1] < Close[2]
and Open > Close[1] and Open < Open[1]
and Open[1] > Close[2] and Open[1] < Open[2]
and var5 / var6 < var7
and var5[1] / var6[1] < var7
and var5[2] / var6[2] < var7 ;
if condition1
then
o3BlackCrows = 1 ;
end;
end ;
C_3WhSolds_3BlkCrows = 1 ;
[/code]
页:
[1]