_SECTION_BEGIN( "Gator" );
Lips_Period    =  5;
Teeth_Period    =  8;
Jaw_Period        = 13;
MidPrice        = ( H + L ) / 2;

Lips     = MA( MidPrice, Lips_Period );
Teeth     = MA( MidPrice, Teeth_Period );
Jaw     = MA( MidPrice, Jaw_Period );

for ( i = Lips_Period + 1; i < BarCount; i++ )
{
    iSum = ( Lips[i-1] * ( Lips_Period - 1 ) ) + MidPrice[i];
    Lips[i] = iSum / Lips_Period;
}

for ( j = Teeth_Period + 1; j < BarCount; j++ )
{
    jSum = ( Teeth[j-1] * ( Teeth_Period - 1 ) ) + MidPrice[j];
    Teeth[j] = jSum / Teeth_Period;
}

for ( k = Jaw_Period + 1; k < BarCount; k++ )
{
    kSum = ( Jaw[k-1] * ( Jaw_Period - 1 ) ) + MidPrice[k];
    Jaw[k] = kSum / Jaw_Period;
}

GatorAbove0 = abs( Jaw - Teeth );

GatorBelow0 = -( abs( Teeth - Lips ) );

Plot( GatorAbove0, "GatorAbove0", IIf( GatorAbove0 < Ref( GatorAbove0, -1 ), colorRed, IIf( GatorAbove0 > Ref( GatorAbove0, -1 ), colorGreen, colorGrey40 ) ), styleHistogram,Null,Null,0,0,3 );
Plot( GatorBelow0, "GatorBelow0", IIf( GatorBelow0 > Ref( GatorBelow0, -1 ), colorRed, IIf( GatorBelow0 < Ref( GatorBelow0, -1 ), colorGreen, colorGrey40 ) ), styleHistogram,Null,Null,0,0,3 );
_SECTION_END();

0 komentar:

Posting Komentar

statistik web

Flag Counter
Diberdayakan oleh Blogger.

Buku Penulis

ALLIGATOR TRAINING EVENT

ALLIGATOR TRAINING EVENT

PUBLIC CHANNEL

FACEBOOK GROUP

WA PREMIUM