[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Att : Reinsley (ONLY ONE LOGIC)


  • Date: Thu, 31 Dec 2009 11:34:33 -0000
  • From: "sanjiv" <sumangalam@xxxxxxxx>
  • Subject: [amibroker] Att : Reinsley (ONLY ONE LOGIC)

PureBytes Links

Trading Reference Links

Hello Reinsley,

Please give your views about the following small change to your code(With your permission); It will take care of Complex Fractals (Where Highs or Lows of two adjacent bars are equal)

_SECTION_BEGIN( "pivot" );
num = Param( "trend", 4, 1, 6, 1 );
mHHV = HHV(H,num);
mLLV = LLV(L,num);

FirstVisibleBar = Status( "FirstVisibleBar" );
Lastvisiblebar = Status( "LastVisibleBar" );

for ( b = Firstvisiblebar + num; b <= Lastvisiblebar AND b < BarCount -
        num; b++ )
{
    i = num;
    ml = 0;
    mu = 0;

    while ( i > 0 )
    {
       // if ( L[b] <= L[b-i] && L[b] <= L[b+i] )
		if ( L[b] < L[b+i] )
        {
            ml++;
        }

        //if ( H[b] >= H[b-i] && H[b] >= H[b+i] )
		if ( H[b] > H[b+i] )
        {
            mu++;
        }

        i--;
    }

    //if ( ml == num )
	if ( ml == num AND L[B]==mLLV[B])
    {
        PlotText( "\n *\n", b, L[b], colorGreen );
    }

    //if ( mu == num )
	if ( mu == num  AND H[B]==mHHV[B])
    {
        PlotText( " *\n", b, H[b], colorRed );
    }
}

With Ragards

Sanjiv Bansal

--- In amibroker@xxxxxxxxxxxxxxx, reinsley <reinsley@xxx> wrote:
>
> 
> Hi,
> 
> This logic works :
> 
> Best regards
> 
> 
> _SECTION_BEGIN( "pivot" );
> num = Param( "trend", 4, 1, 6, 1 );
> 
> FirstVisibleBar = Status( "FirstVisibleBar" );
> Lastvisiblebar = Status( "LastVisibleBar" );
> 
> for ( b = Firstvisiblebar + num; b <= Lastvisiblebar AND b < BarCount - 
> num; b++ )
> {
>      i = num;
>      ml = 0;
>      mu = 0;
> 
>      while ( i > 0 )
>      {
>          if ( L[b] <= L[b-i] && L[b] <= L[b+i] )
>          {
>              ml++;
>          }
> 
>          if ( H[b] >= H[b-i] && H[b] >= H[b+i] )
>          {
>              mu++;
>          }
> 
>          i--;
>      }
> 
>      if ( ml == num )
>      {
>          PlotText( "\n *\n", b, L[b], colorGreen );
>      }
> 
>      if ( mu == num )
>      {
>          PlotText( " *\n", b, H[b], colorRed );
>      }
> }
> _SECTION_END();
> 
> 
> 
> 
> 
> Le 30/12/2009 20:31, nifty46 a écrit :
> >
> >
> > AFL masters, is it posible to plot ******** as text on a specific
> > candle, i m trying buy it ploted above every candle , please help,I need
> > only one ********* at on HB3 And one ******* below L3, THAX IN ADWANCED
> >
> > HB3=HHV(H,20);// MY CONDITION IS EXTRA
> > L3=LLV(L,20);
> > for( P = 0; P < BarCount; P++ )
> > {
> > dist = 1.5*ATR(10);
> > if( HB3[P] ) PlotText( "\n*******\n" + HB3[ P ], P, HB3[ P ]-dist[P],
> > colorGreen );
> > if( L3[P] ) PlotText("*******\n" + L3 [P ], P, L3[ P ]+dist[P], colorRed);
> > }
> >
> > REGARDS NIFTY46
> >
> > 
> 
> 
> -- 
> Best regards
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/