【C_PierceLine_DkCloud】
[code]inputs:Len( numericsimple ),
oPiercingLine( numericref ),
oDarkCloud( numericref ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 0 ),
var4( 0 ),
var5( 0 ) ;
var0 = MaxList( Close, Open ) ;
var1 = MinList( Close, Open ) ;
var2 = var0 - var1 ;
var3 = var1 + var2 * .5 ;
var4 = XAverage( Close, Len ) ;
var5 = XAverage( var2, Len ) ;
oPiercingLine = 0 ;
oDarkCloud = 0 ;
if CurrentBar > 1 then
begin
condition1 = C < var4
and C[1] < O[1]
and var2[1] > var5[1]
and var2[1] > H[1] - var0[1]
and var2[1] > var1[1] - L[1]
and O < L[1]
and C < var0[1]
and C > var3[1];
if condition1
then
oPiercingLine = 1
else
begin
condition1 = C > var4
and C[1] > O[1]
and var2[1] > var5[1]
and var2[1] > H[1] - var0[1]
and var2[1] > var1[1] - L[1]
and O > H[1]
and C > var1[1]
and C < var3[1];
if condition1
then
oDarkCloud = 1 ;
end;
end ;
C_PierceLine_DkCloud = 1 ;
[/code]
页:
[1]