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 |

Tails indicator Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
hkusp40
Posted : Saturday, December 13, 2008 10:20:21 PM
Registered User
Joined: 7/13/2008
Posts: 35
I'd like to create a custom indicator that creates a line displaying the difference between tails up and tails down. The trick, I would suppose, is to determine whether to measure the distance from the open or close of the bar to to high/low.

So a hammer candle would add to the line the length of the tail down minus any tail up (distance from top of candle body to high). Conversely, a shooting star would subtract from the line the length of the tail up minus any tail down. A perfect spinning top would, of course, neither add nor subtract from the line.

I imagine this may be difficult to code since one must first determine which inputs to use based on whether the candle body is solid or hollow, unless there is a function for bodytop and bodybottom.

Is this possible?
hkusp40
Posted : Saturday, December 13, 2008 10:26:22 PM
Registered User
Joined: 7/13/2008
Posts: 35
The purpose of such an indicator, I should add, would be to identify situations in which price is moving up for example, but the indicator is beginning to move down due to longer tails up than down. One would look for divergences between the two to spot a loss of momentum in a particular direction.
jschott
Posted : Monday, December 15, 2008 9:20:13 AM
Registered User
Joined: 10/27/2004
Posts: 821
Location: Philly area
If CLOSE is > OPEN the calculate top tail from the difference between Close and HIgh, for the opposite side reverse the > and use Open and Low - then add or subtract as required from the cumulative total.
hkusp40
Posted : Thursday, December 18, 2008 9:58:37 PM
Registered User
Joined: 7/13/2008
Posts: 35
Exactly right, I just don't know how to program such an indicator.
Bruce_L
Posted : Friday, December 19, 2008 8:40:00 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
hkusp40,
I think you would want to create the following RealCode Indicator:

'# Cumulative
Static Total As Single
If isFirstBar Then Total = 0
Total += (System.Math.Min(Price.Open, Price.Last) - Price.Low) - _
    (Price.High - System.Math.Max(Price.Open, Price.Last))
Plot = Total

That said, I'm not sure if the top tail should be subtracted from the bottom tail or vice versa and may have it backwards. I'm also not positive that the Indicator is supposed to be cumulative.

-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.