Bars since higher or equal value

Bars since highest counting from some event
http://www.amibroker.com/f?highestsincebars
or (bars since highest in given period):
http://www.amibroker.com/f?hhvbars
or (bars since all time highest):
http://www.amibroker.com/f?highestbars