Countback for Amibroker (AFL)
kesso over 15 years ago Amibroker (AFL)
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
Leave Comment
Please login here to leave a comment.
If you can not decide ATRper and ATRMultiple, try this!
Very interesting, very good!
Best stoploss for any kind of buy/sell signals :
Thanks
Viswanath
@kv maligi.
Can u plez clear the formula? do you mean mean price of 26 average of highest high n low as sl
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