Thank you Tomasz I used PREV and the function seems to work OK,
except
the line drawn on the chart doesn't seem correct, guess I got
it wrong.
I'm trying to duplicate Guppys CountBack function, has
anyone already done
this? I would realy appreciate seeing how to do
it! The MetaStock code is
public and is as follows"
HighDays := Input("Enter # days to cover last
HIGH for CBL calc'n:",
3, 55, 13);
If(HIGH < HHV(HIGH,
HighDays), {then ...} PREV, {previous CBLhi,
else...}
If(Ref(L,-2)
< Ref(L,-1) AND Ref(L,-2) < L AND Ref(L,-1) < L,
{then ...}
Ref(L,-2), {2nd day back low, else...}
If((Ref(L,-3)< Ref(L,-2)
AND Ref(L,-3) < Ref(L,-1) AND Ref(L,-3) < L)
AND (Ref(L,-2)< L
OR Ref(L,-1) < L), {then ... } Ref(L,-3), {3rd day back low,
else...}
If((Ref(L,-4)< Ref(L,-3) AND Ref(L,-4) < Ref(L,-2)
AND Ref(L,-4) < Ref
(L,-1) AND Ref(L,-4) < L) AND (Ref(L,-3)< L
OR Ref(L,-2) < L
OR Ref(L,-1) < L), {then... } Ref(L,-4), {4th
day back low, else...}
If((Ref(L,-5)< Ref(L,-4) AND Ref(L,-5) <
Ref(L,-3) AND Ref(L,-5) < Ref
(L,-2) AND Ref(L,-5) < Ref(L,-1) AND
Ref(L,-5) < L) AND (Ref(L,-4)
<L
OR Ref(L,-3) < L
OR
Ref(L,-2) < L
OR Ref(L,-1) < L), {then ...} Ref(L,-5), {5th day back
low, else...}
PREV )))))
Hope someone can help, thank
you.
StanG
--- In amibroker@xxxxxxxxxps.com,
"Tomasz Janeczko" <groups@xxx>
wrote:
>
> Hello,
>
> The archive search reveals many posts about the same subject,
>
including last one from May 28, 2008:
> http://finance.groups.yahoo.com/group/amibroker/message/124603
>
>
> Best regards,
> Tomasz Janeczko
>
amibroker.com
> ----- Original Message -----
> From: "Stan
Graham" <asahi3@xxx>
> To: <amibroker@xxxxxxxxxps.com>
>
Sent: Tuesday, July 01, 2008 8:00 PM
> Subject: [amibroker] PREV
>
>
> > Need help! Any one any idea how to replace the PREV
function when
> > transposing a Metastock formula to AmiBroker?
Would appreciate
any
> > help, thank ypou.
> >
StanG
> >
> >
> >
------------------------------------
> >
> >
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
> >
> >
>
>
>