Sorry, the line
MACD_Bars = BarsSince(0,MD);
should be
MACD_Bars = BarsSince(Cross(0,MD));
- Original Message -
From: "bilbo0211" <[EMAIL PROTECTED]>
To:
Sent: Thursday, January 10, 2008 6:45 AM
Subject: [amibroker] Re: code help request
>I don't think t
I don't think that will work because MD just crossed above zero so
BarsSince(MD==0);
will be 1.
I think you need something like
bsZeroCross=BarsSince(MD==0);
bsPrevZeroCross=BarsSince(Ref(MD,-bsZeroCross)==0)
LowPrice = LLV(Low,bsZeroCross+bsPrevZeroCross);
Bill
--- In amibroker@yahoogroups.c