Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Min Max Trend Indicator Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Reynolds05
Posted : Thursday, December 6, 2012 1:16:45 PM
Registered User
Joined: 3/6/2005
Posts: 16

How do I code this in TC 2000?

 

- decide the length of the indicator. I use 200 days,

- find a maximum price during last “length” of days

- count how many days ago was the maximum, this will be “maximum index”

- find a minimum price during last “length” of days

- count how many days ago was the minimum, this will be “minimum index”

- calculate difference: minimum index - maximum index

 

If the result is positive the trend is up. If the result is negative the trend is down.

Reynolds05
Posted : Thursday, December 6, 2012 1:23:55 PM
Registered User
Joined: 3/6/2005
Posts: 16

Corrections:

2nd line - find a maximum price during last "length" of days

3rd line - count how many days ago was the maximum, this will be "maximim index"

4th line - find a minimum price during last "length" of days

5th line - count how many days ago was the minimum, this will be  "minimum index"

Bruce_L
Posted : Thursday, December 6, 2012 1:34:41 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

It is theoretically possible to use the techniques in the Days Since Last Peak (or other day-counting needs) topic to create an Indicator Formula for this. That said, the resulting formulas end up being too slow and long to be practical or post in the forums.

Note that your description comes very close to the Aroon and Aroon Oscillator indicators. The big difference is the the Aroon indicators are calculated as a percent of the period since the high or low was most recently reached instead of using a raw count.

The Aroon and Aroon Oscillator indicators are built into TC2000 version 12.2. It is possible to create indicator formulas short enough to post for relatively short periods, but not for periods such as 200.

Aroon Indicators and Oscillator

But the fact that they are built into TC2000 version 12.2 makes such formulas mostly obsolete.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.