PureBytes Links
Trading Reference Links
|
Thank you, Don
I have that code but the output does not agree with the Guppy
MetaStock output. I have BK (Bank of NY Mellon) on my screen in both
AmiBroker and MetaStock - CBL is 34.19 in AB and 34.93 in MS also the
line drawn is much different. MS allows for the lookback period to be
changed (set at 10 periods now) but I cannot find the countback
period in the CBL code! The AB CBL is also below the last price bar -
not a good entry point! In fact it is below the last 5 price bars,
whereas the MS CBL passes through the last 6 (six) price bars.
Stan
--- In amibroker@xxxxxxxxxxxxxxx, "Donald F Lindberg" <dlindber@xxx>
wrote:
>
> Stan,
> Below find code that Ipulled from AFL Library for Guppy Coutback.
>
> _SECTION_BEGIN("Guppy Countback Line");
>
> /* 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();
>
>
> _____
>
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
On Behalf
> Of Stan Graham
> Sent: Monday, September 08, 2008 1:25 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Guppy Count Back Line
>
>
>
> Has anyone coded the Guppy Count Back Entry line in AmiBroker?
> Stan
>
------------------------------------
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
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:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto: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/
|