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

RE: [amibroker] Re: Countback Line dll



PureBytes Links

Trading Reference Links

Here is an attempt I did some time ago. It is not perfect as it picks
highs/lows from history instead of just recent ones.
It should give enough for a starting point for you to create your own

// INDICATOR 
//Count Back Line 
//by Graham Kavanagh 22 May 2003
//
Plot(C, "Close", colorBlack, styleBar+styleNoLabel);

period = 3;
Bar = SelectedValue(BarIndex());
LastBar = LastValue(BarIndex());
start = Lastbar-bar;

LowerLow[0] = SelectedValue(L);

for ( j=1; j<=period; j++ )
{
 for ( i=1 ; i < Bar ; i++ )
 {
  if ( L[i] < LowerLow[j-1] )
  {
   LowerLow[j] = L[i];
  }
 }
}
Lowerline = SelectedValue(LowerLow[period]);
BarL   = ValueWhen( L==Lowerline, BarIndex(), 1 );
CBLow  = IIf( BarIndex()>=BarL, Lowerline, Null );
Plot(CBLow, EncodeColor(colorRed)+ "3 day CB Low", colorRed, styleDots);

//Plot(SelectedValue(L), EncodeColor(colorRed)+ "Bar Low", colorRed,
styleLine);


HigherHigh[0] = SelectedValue(H);
for ( j=1; j<=period; j++ )
{
 for ( i=1; i < Bar ; i++ )
 {
  if ( H[i] > HigherHigh[j-1] )
  {
   HigherHigh[j] = H[i];
  }
 }
}


Higherline = SelectedValue(HigherHigh[period]);
BarH   = ValueWhen( H==Higherline, BarIndex(), 1 );
CBHigh  = IIf( BarIndex()>=BarH, Higherline, Null );


//Plot(SelectedValue(H), EncodeColor(colorGreen)+ "Bar high", colorGreen,
styleLine);
Plot(CBHigh, EncodeColor(colorGreen)+ "3 day CB High", colorGreen,
styleDots);

Title = Name() + " " + Date() + " / " + BarCount + " / " + bar + " / " +
Lastbar + " ? "+ L[0] + " ? ";

Cheers,
Graham
http://e-wire.net.au/~eb_kavan/

-----Original Message-----
From: Col [mailto:colgiddins@xxxxxxxxx] 
Sent: Wednesday, December 29, 2004 1:48 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Countback Line dll




goldwing01_1999
Thanks for the reply but the 3 line break is not what I'm looking 
for.
Guppy's countback line is a variation of Stowell's 3 bar nett.
Thanks
Col

<goldwing01_1999@xxxx> wrote:
> 
> is this what you are looking for.
> 
> http://finance.groups.yahoo.com/group/amibroker/message/25914










Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links



 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

<*> 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/