[amibroker] Help Request with LLV and HHV (Coding Newbie question) [1 Attachment]

 
[Attachment(s) from mdcoulter@gmail.com [amibroker] included below]

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 mdcoulter@gmail.com [amibroker] | View attachments on the web

1 of 1 Photo(s)


Posted by: mdcoulter@gmail.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Check out the automatic photo album with 1 photo(s) from this topic.
LLV error sample 1.jpg

**** IMPORTANT PLEASE READ ****
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