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 |

Candlestick Body % Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
traderlady
Posted : Wednesday, October 17, 2018 2:07:23 PM
Registered User
Joined: 10/7/2004
Posts: 1,178

Please provide an indicator (value) for candlestick body percent.

Bruce_L
Posted : Wednesday, October 17, 2018 4:24:44 PM


Worden Trainer

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

So the body as a percentage of the entire candle?

IIF(H > L, 100 * ABS(O - C) / (H - L), 0)

The above arbitrarily defines a body where the high and low is the same as having a body which is 0% of the candle, but you could change it to another value if desired (such as 50 or 100).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
traderlady
Posted : Wednesday, October 17, 2018 11:24:33 PM
Registered User
Joined: 10/7/2004
Posts: 1,178

When I use the above formula for Body % below along with the two older formulas below for Lower Wick and Upper Wick no longer add up to 100%.  Previously, I had been given a formula for Body % without the IFF capability (which I had deleted).

IIF(H > L, 100 * ABS(O - C) / (H - L), 0

 

Can you please revise these so the total of the three adds up to 100%?

Lower Wick %:

100 * ((O + C - ABS(O - C)) / 2 - L) / (H - L + .00001)

Body %:

IIF(H > L, 100 * ABS(O - C) / (H - L), 0

Upper Wick %:

100 * (H - (O + C + ABS(O - C)) / 2) / (H - L + .00001)

 

 

 

 

Bruce_L
Posted : Thursday, October 18, 2018 7:53:58 AM


Worden Trainer

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

You can just use the following for Body% if you don't want to use the IIF() structure, but it is actually a worse way to deal with the division by zero issue when the candle doesn't have any range.

100 * ABS(O - C) / (H - L + .00001)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
traderlady
Posted : Thursday, October 18, 2018 9:41:01 AM
Registered User
Joined: 10/7/2004
Posts: 1,178

If the IFF formula for Body % is better, then can you change the formulas for Lower Wick % and Upper Wick % using IFF capabilities?

Then, would three IFF formulas equal 100 percent?

Bruce_L
Posted : Thursday, October 18, 2018 10:44:28 AM


Worden Trainer

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

Well I guess I could force it to total 100% even if the candle has no range by making all three formulas return 33.33% instead of 0% or 100%.

Upper%:

IIF(H > L, 100 * (H - GREATEST(O, C)) / (H - L), 100 / 3)

Body%:

IIF(H > L, 100 * ABS(O - C) / (H - L), 100 / 3)

Lower%:

IIF(H > L, 100 * (LEAST(O, C) - L) / (H - L), 100 / 3)

But you probably should replace that 100 / 3 with something like 0, 100 or possibly even -1 to make sure you know that neither the body nor the candle has any range at all.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
traderlady
Posted : Thursday, October 18, 2018 3:27:39 PM
Registered User
Joined: 10/7/2004
Posts: 1,178

Thanks for these new formulas, Bruce.

Bruce_L
Posted : Thursday, October 18, 2018 7:02:52 PM


Worden Trainer

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

 You're welcome.



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