[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Help coding custom indicator



PureBytes Links

Trading Reference Links

I am trying to code the following custom indicator. What's in my mind is similar to a price channel, but instead of using HHV or LLV I want the 3rd higher high and 3rd lower low. So for example, today is a new high for a move, I start with todays low, then working backwards find the next lower low (#2), then find the next lower low (#3).  Obviously, this is not necessarily just three days back or LLV (L,3).  It could be several days back to find the 3rd lower low.

 

I then plot a horizontal line from this low to the right side of the chart. When the market closes below this 3rd low line, I then switch to calculating the 3rd higher high. Same way, start with today's high, then find the next higher high(#2), then find the next (#3). I then plot a horizontal line from this high to the right edge of the chart. When the market closes above this line, I reverse and start over.

 

The other conceptual problem I am having is how to get started. What would determine if the first line was a 3rd high or a 3rd Low? Once you get started, it's no problem, you just flip back and forth. It is easy to see on a chart but I can't make the transition to the code.

 

Thanks in advance for any and all input,

 

James



Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos. __._,_.___

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___