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 |

Comparing Price Bars Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
MCPP
Posted : Thursday, May 4, 2017 12:11:16 AM
Registered User
Joined: 8/20/2012
Posts: 27

Hello Bruce,

I would like to compare price bars looking back for example 15 periods (eg. minutes) and highlight a  price bar that is 50% larger than the previous 15.

I would like to highlight that candle with a dot over top of it (not right on it).  

Is this possible? I have tried several formulas but I'm not even close.

 

Many thanks,

 

Mark

Bruce_L
Posted : Thursday, May 4, 2017 9:30:53 AM


Worden Trainer

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

If the bar needs to be at least 50% larger than the largest of the previous 15 bars, then you could use the following Boolean Formula in a Custom PCF % True Indicator set to the Dots Plot Style plotted in the same pane and scale as price.

(H + .01) / ABS(H > L AND H - L >= 1.5 * MAX(H1 - L1, 15))

If the bar just needs to be at least 50% larger than the average size of the previous 15 bars than you could change MAX to AVG.

(H + .01) / ABS(H > L AND H - L >= 1.5 * AVG(H1 - L1, 15))

If the bar needs to be at least 50% larger than the entire range of the previous 15 bars, then use the following Boolean Formula instead.

(H + .01) / ABS(H > L AND H - L >= MAXH15.1 - MINL15.1)

Note that the (H + .01) is what makes the dot plot $0.01 above the high. You can use whatever value you want in here (although it should be related to the price scale in some fashion or you won't see the dot).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
MCPP
Posted : Friday, May 12, 2017 2:11:24 PM
Registered User
Joined: 8/20/2012
Posts: 27

Thanks  for the reply Bruce, 

I've been working with the dot idea for a couple weeks and its not working as I hoped, so I want to change direction a little. (or a lot)

I have been using the volume indicator(s) that Telework was nice enought to share (see below link). My question is, can the same type of ratio indicators for volume be modified to reflect price bars? Same idea as the volume ratio bars. I would likely use the open an close prices. If so, can you help with a formula.

http://forums.worden.com/default.aspx?g=posts&t=65440

 

Thanks,

 

Mark

 

 

Bruce_L
Posted : Friday, May 12, 2017 2:48:41 PM


Worden Trainer

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

I suppose a similar base indicator could be written as follows. It compares the range of the body of the current 60 minute bar to the average range of the body for the same 60 minute bar over the previous 20 trading days. 

100 * ABS(C - O) / ((ABS(C7 - O7) + ABS(C14 - O14) + ABS(C21 - O21) + ABS(C28 - O28) + ABS(C35 - O35) + ABS(C42 - O42) + ABS(C49 - O49) + ABS(C56 - O56) + ABS(C63 - O63) + ABS(C70 - O70) + ABS(C77 - O77) + ABS(C84 - O84) + ABS(C91 - O91) + ABS(C98 - O98) + ABS(C105 - O105) + ABS(C112 - O112) + ABS(C119 - O119) + ABS(C126 - O126) + ABS(C133 - O133) + ABS(C140 - O140)) / 20)

If we were to use the same thresholds of 60%, 80%, 120% and 200% we would get the following Condition Formulas.

The names and percentages were designed for the size of volume bars and may or may not make sense when applied to the size of candle bodies.

Extreme Body (above 200%):

100 * ABS(C - O) / ((ABS(C7 - O7) + ABS(C14 - O14) + ABS(C21 - O21) + ABS(C28 - O28) + ABS(C35 - O35) + ABS(C42 - O42) + ABS(C49 - O49) + ABS(C56 - O56) + ABS(C63 - O63) + ABS(C70 - O70) + ABS(C77 - O77) + ABS(C84 - O84) + ABS(C91 - O91) + ABS(C98 - O98) + ABS(C105 - O105) + ABS(C112 - O112) + ABS(C119 - O119) + ABS(C126 - O126) + ABS(C133 - O133) + ABS(C140 - O140)) / 20) > 200

High Body (between 120% and 200%):

ABS(100 * ABS(C - O) / ((ABS(C7 - O7) + ABS(C14 - O14) + ABS(C21 - O21) + ABS(C28 - O28) + ABS(C35 - O35) + ABS(C42 - O42) + ABS(C49 - O49) + ABS(C56 - O56) + ABS(C63 - O63) + ABS(C70 - O70) + ABS(C77 - O77) + ABS(C84 - O84) + ABS(C91 - O91) + ABS(C98 - O98) + ABS(C105 - O105) + ABS(C112 - O112) + ABS(C119 - O119) + ABS(C126 - O126) + ABS(C133 - O133) + ABS(C140 - O140)) / 20) - 160) <= 40

Average Body (between 80% and 120%):

ABS(100 * ABS(C - O) / ((ABS(C7 - O7) + ABS(C14 - O14) + ABS(C21 - O21) + ABS(C28 - O28) + ABS(C35 - O35) + ABS(C42 - O42) + ABS(C49 - O49) + ABS(C56 - O56) + ABS(C63 - O63) + ABS(C70 - O70) + ABS(C77 - O77) + ABS(C84 - O84) + ABS(C91 - O91) + ABS(C98 - O98) + ABS(C105 - O105) + ABS(C112 - O112) + ABS(C119 - O119) + ABS(C126 - O126) + ABS(C133 - O133) + ABS(C140 - O140)) / 20) - 100) < 20

Light Body (between 60% and 80%):

ABS(100 * ABS(C - O) / ((ABS(C7 - O7) + ABS(C14 - O14) + ABS(C21 - O21) + ABS(C28 - O28) + ABS(C35 - O35) + ABS(C42 - O42) + ABS(C49 - O49) + ABS(C56 - O56) + ABS(C63 - O63) + ABS(C70 - O70) + ABS(C77 - O77) + ABS(C84 - O84) + ABS(C91 - O91) + ABS(C98 - O98) + ABS(C105 - O105) + ABS(C112 - O112) + ABS(C119 - O119) + ABS(C126 - O126) + ABS(C133 - O133) + ABS(C140 - O140)) / 20) - 70) <= 10

Dry-up Body (below 60%):

100 * ABS(C - O) / ((ABS(C7 - O7) + ABS(C14 - O14) + ABS(C21 - O21) + ABS(C28 - O28) + ABS(C35 - O35) + ABS(C42 - O42) + ABS(C49 - O49) + ABS(C56 - O56) + ABS(C63 - O63) + ABS(C70 - O70) + ABS(C77 - O77) + ABS(C84 - O84) + ABS(C91 - O91) + ABS(C98 - O98) + ABS(C105 - O105) + ABS(C112 - O112) + ABS(C119 - O119) + ABS(C126 - O126) + ABS(C133 - O133) + ABS(C140 - O140)) / 20) < 60

The first formula would be plotted as a Custom PCF Indicator if you wanted to plot the actual raw value.

The rest of the formula would be plotted as Custom PCF % True Indicators in the same pane and scale is each other (but probably not in the same pane and scale as the Custom PCF Indicator) with the Plot Style set to Histogram.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
MCPP
Posted : Friday, May 12, 2017 3:27:08 PM
Registered User
Joined: 8/20/2012
Posts: 27

Many thanks Bruce,

 

I'll work through this on the weekend.

You amaze me as to how you can put this together so quickly.

 

Cheers,

 

Mark

Bruce_L
Posted : Friday, May 12, 2017 3:31:23 PM


Worden Trainer

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

The above 200 and below 60 formulas are very straightforward.

The between 2 values formulas use a trick to make them shorter you will want to be understand if you want to adjust the formulas. In the bits at the end of the formulas:

- 160) <= 40
- 100) < 20
- 70) <= 10

The first number is (top of range + bottom of range) / 2 and the second number is (top of range - bottom of range) / 2.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
MCPP
Posted : Friday, May 12, 2017 4:24:30 PM
Registered User
Joined: 8/20/2012
Posts: 27

Thanks

Bruce_L
Posted : Friday, May 12, 2017 4:26:55 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.