On 2/27/2016 1:28 PM, mdcoulter@gmail.com [amibroker] wrote:
Greetings All!
I am hoping for some help in figuring out where my coding is incorrect (simple rookie mistake, I would think). The code below is designed to find/filter for ONLY the LOWEST LOW or the HIGHEST HIGH of the 50-100 MACD SINCE it most recently crossed Above or Below the Zero Line.
The problem is that it often returns cases where the MACD is NOT at it's lowest or highest since crossing the Zero Line. I've attached on example of the problem...
Any ideas?? Thanks a million in advance...
All the best,
Mark Coulter
///Calculate # of Bars Since MACD 50-100 Crossed ABOVE (UP) or BELOW (DN) 0///
DN_MAXD = BarsSince(Cross(0, MACD(50,100))); ///Bars SINCE MACD50-100 Crossed BELOW 0///
UP_MAXD = BarsSince(Cross(MACD(50,100), 0 )); ///Bars SINCE MACD50-100 Crossed ABOVE 0///
///Insure that MACD 50-100 is at it's HIGHEST/LOWEST Value since Crossing the ZERO Line///
MAXDUP = HHV(MACD(50, 100), UP_MAXD);
MAXDDN = LLV(MACD(50, 100), DN_MAXD);
Attachment(s) from Alan | View attachments on the web
1 of 1 Photo(s)
Posted by: Alan <alan@thenorthams.us>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (6) |
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
EmoticonEmoticon