【C_MornDoji_EveDoji】
[code]inputs:Len( numericsimple ),
Percent( numericsimple ),
oMorningDojiStar( numericref ),
oEveningDojiStar( 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( var2, Len ) ;
var4 = High - Low ;
oMorningDojiStar = 0 ;
oEveningDojiStar = 0 ;
if CurrentBar > 2 then
begin
condition1 = Close[2] < Open[2]
and var2[2] > var3[2]
and var0[1] < var1[2]
and var2[1] <= var4[1] * Percent * .01
and Close > Open
and var0 > var1[2];
if condition1
then
oMorningDojiStar = 1
else
begin
condition1 = Close[2] > Open[2]
and var2[2] > var3[2]
and var1[1] > var0[2]
and var2[1] <= var4[1] * Percent * .01
and Close < Open
and var1 < var0[2];
if condition1
then
oEveningDojiStar = 1 ;
end;
end ;
C_MornDoji_EveDoji = 1 ;
[/code]
页:
[1]