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 |

PCF HELP Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
dhirenshah
Posted : Sunday, July 16, 2017 2:48:46 AM
Registered User
Joined: 3/10/2012
Posts: 465

Bruce 

how to write custom formula for MACD indicator using  settings short as (MAXH9 + MINL9) / 2 

and for long as (MAXH26 + MINL26) / 2

I tried using V17 template  but keep getting error 

thanks 

Dhiren

 

bcochrane
Posted : Sunday, July 16, 2017 8:16:28 AM
Registered User
Joined: 9/17/2010
Posts: 484

MACD(9,26)

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

diceman
Posted : Sunday, July 16, 2017 9:16:23 AM
Registered User
Joined: 1/28/2005
Posts: 6,049

Try this:

 

(MAXH9 + MINL9) / 2 - (MAXH26 + MINL26) / 2

 

 

 

Thanks

 

 

dhirenshah
Posted : Sunday, July 16, 2017 2:00:55 PM
Registered User
Joined: 3/10/2012
Posts: 465

Diceman thanks it works , one more simple question can u pls compute 5 bar pivot high and low on the above formula ? as my parenthesis placement is bad and that  sometimes freezes my work 

 

 

Bcochrane thanks for your input

 

have a great Sunday 

 

cheers

bcochrane
Posted : Sunday, July 16, 2017 5:42:24 PM
Registered User
Joined: 9/17/2010
Posts: 484

Sorry if I misinterpreted your question.

Bruce_L
Posted : Monday, July 17, 2017 8:56:16 AM


Worden Trainer

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

Normally I would write the pivot high as follows.

MAX(MAXH9 + MINL9 - MAXH26 - MINL26, 5) < MAXH9.5 + MINL9.5 - MAXH26.5 - MINL26.5 AND MAXH9.5 + MINL9.5 - MAXH26.5 - MINL26.5 > MAX(MAXH9.6 + MINL9.6 - MAXH26.6 - MINL26.6, 5)

With the pivot low being the following.

MIN(MAXH9 + MINL9 - MAXH26 - MINL26, 5) > MAXH9.5 + MINL9.5 - MAXH26.5 - MINL26.5 AND MAXH9.5 + MINL9.5 - MAXH26.5 - MINL26.5 < MIN(MAXH9.6 + MINL9.6 - MAXH26.6 - MINL26.6, 5)

But the nature of the formula means that the highs and lows in the formula might be flat for a few bars instead of forming a V shape. So I would probably write the pivot high as follows.

MAXH9.5 + MINL9.5 - MAXH26.5 - MINL26.5 = MAX(MAXH9 + MINL9 - MAXH26 - MINL26, 11) AND MIN(MAXH9 + MINL9 - MAXH26 - MINL26, 5) < MAXH9.5 + MINL9.5 - MAXH26.5 - MINL26.5 AND MAXH9.5 + MINL9.5 - MAXH26.5 - MINL26.5 > MIN(MAXH9.6 + MINL9.6 - MAXH26.6 - MINL26.6, 5)

And the pivot low as follows.

MAXH9.5 + MINL9.5 - MAXH26.5 - MINL26.5 = MIN(MAXH9 + MINL9 - MAXH26 - MINL26, 11) AND MAX(MAXH9 + MINL9 - MAXH26 - MINL26, 5) > MAXH9.5 + MINL9.5 - MAXH26.5 - MINL26.5 AND MAXH9.5 + MINL9.5 - MAXH26.5 - MINL26.5 < MAX(MAXH9.6 + MINL9.6 - MAXH26.6 - MINL26.6, 5)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Monday, July 17, 2017 12:43:44 PM
Registered User
Joined: 3/10/2012
Posts: 465

Bruce thanks a lot for the formula 

however if i can please get a bit of tweaking from you, i m plotting the formula from diceman as histogram and i want custom pcf% showing histogram today is higher than it was yesterday,and yesterday was the lowest value at least for the 3 bars prior to that when histogram is below zero and want to sort in scan

and same for inverse where today is lower then it was yesterday and yesterday was the highest value for 3 bars prior to that when histogram is above zero and want to sort and scan 

 

thanks again 

 

and no worries Bcochrane ! Cheers

 

Bruce_L
Posted : Monday, July 17, 2017 12:51:43 PM


Worden Trainer

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

Ah, I thought you requested a 5 day pivot high and 5 day pivot low in the histogram. Please try the following Condition Formula for the low below zero version.

MAXH9 + MINL9 < MAXH26 + MINL26 AND MAXH9 + MINL9 - MAXH26 - MINL26 > MAXH9.1 + MINL9.1 - MAXH26.1 - MINL26.1 AND MAXH9.1 + MINL9.1 - MAXH26.1 - MINL26.1 = MIN(MAXH9.1 + MINL9.1 - MAXH26.1 - MINL26.1, 4)

With the inverse being the following.

MAXH9 + MINL9 > MAXH26 + MINL26 AND MAXH9 + MINL9 - MAXH26 - MINL26 < MAXH9.1 + MINL9.1 - MAXH26.1 - MINL26.1 AND MAXH9.1 + MINL9.1 - MAXH26.1 - MINL26.1 = MAX(MAXH9.1 + MINL9.1 - MAXH26.1 - MINL26.1, 4)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Monday, July 17, 2017 1:10:18 PM
Registered User
Joined: 3/10/2012
Posts: 465

Yes I wanted pivots earlier to see signal and divergence  but it was getting too cluttered , however the below zero formula works perfect,,,

thank you so much 

Bruce_L
Posted : Monday, July 17, 2017 1:12:40 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.