Skip to main content

Countback for Amibroker (AFL)

kesso over 15 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 3)
  • Tags:
    amibroker, stop loss

Countback line

Stephane Carrasset’s Countback Line (CBL) popularized by Daryl Guppy

Screenshots

Indicator / Formula

Copy & Paste Friendly
//* Stephane Carrasset's Countback Line (CBL) popularized by Daryl Guppy

//Refer to amibroker posting 30th December 2004 */

nR=2;

Cbl[nR]=Null;

bCBL=False;

for( i=nR; i < BarCount; i++)

{

if( (Low[i-2]<Low[i-1]) && (Low[i-1]<Low[i]) )

{

Cbl[i] = Low[i-2];

bCBL = True;

}

else if (bCBL)

{

if (Low[i] < Cbl[i-1])

{

Cbl[i] = Cbl[i-1];

bCBL = False;

}

else

{

n = nR;

minval[i] = Low[i];

breakloop= False;

for (j = 1; NOT(breakloop) && j <= i; j++)

{

if (Low[i-j] < minval[i])

{

if (n>1)

{

minval[i] = Low[i-j];

n--;

}

else

{

Cbl[i] = Low[i-j];

breakloop=True;

}

}

}

if (Cbl[i] < Cbl[i-1])

Cbl[i] = Cbl[i-1];

}

}

else

{

Cbl[i] = Cbl[i-1];

}

if (Cbl[i]==0)

Cbl[i] = Cbl[i-1];

}

Plot(Cbl,"",colorGreen,1);

Plot(C,"",-1,64);

_SECTION_END();

4 comments

1. morgen
almost 14 years ago

If you can not decide ATRper and ATRMultiple, try this!
Very interesting, very good!

almost 14 years ago

Best stoploss for any kind of buy/sell signals :

Stoploss =(HHV(H,26)+LLV(L,26))/2;

Thanks
Viswanath

almost 14 years ago

@kv maligi.

Can u plez clear the formula? do you mean mean price of 26 average of highest high n low as sl

almost 14 years ago
Hi johnnypareek,

you are right, its mean price. I have used many SL such as Chandilier SL, ATR based SL and VSTOP. The best is the mean price of 26. Its one of the ichimoku components called Kiyunsen.

Thanks
Viswanath

Leave Comment

Please login here to leave a comment.