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 |

MID MONTH Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
diceman
Posted : Tuesday, August 15, 2017 2:34:42 PM
Registered User
Joined: 1/28/2005
Posts: 6,049

Can a PCF be made to calculate the middle price of last month?

As of today July/2017 Monthly (H+L)/2.

Using date code it would not update as the days change.

 

I dont want to plot it but would like to test against it.

 

For future months it would require updating the date PCFs.

 

 

Thanks

 

 

Bruce_L
Posted : Tuesday, August 15, 2017 2:36:19 PM


Worden Trainer

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

The middle price of last month using a monthly time frame would be the following.

(H1 + L1) / 2

There really isn't a way to do this using a daily time frame that would automatically update.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
diceman
Posted : Wednesday, August 16, 2017 9:02:54 AM
Registered User
Joined: 1/28/2005
Posts: 6,049

This appears to work:

(GREATEST(
H.'7/03/17',
H.'7/05/17',
H.'7/06/17',
H.'7/07/17',
H.'7/10/17',
H.'7/11/17',
H.'7/12/17',
H.'7/13/17',
H.'7/14/17',
H.'7/17/17',
H.'7/18/17',
H.'7/19/17',
H.'7/20/17',
H.'7/21/17',
H.'7/24/17',
H.'7/25/17',
H.'7/26/17',
H.'7/27/17',
H.'7/28/17',
H.'7/31/17')+
LEAST(
L.'7/03/17',
L.'7/05/17',
L.'7/06/17',
L.'7/07/17',
L.'7/10/17',
L.'7/11/17',
L.'7/12/17',
L.'7/13/17',
L.'7/14/17',
L.'7/17/17',
L.'7/18/17',
L.'7/19/17',
L.'7/20/17',
L.'7/21/17',
L.'7/24/17',
L.'7/25/17',
L.'7/26/17',
L.'7/27/17',
L.'7/28/17',
L.'7/31/17'))/2

 

A little cumbersome but not too bad.

It plots and I can test against it.

Has a vertical look because its easier edit in a word document.

Bruce_L
Posted : Wednesday, August 16, 2017 9:17:52 AM


Worden Trainer

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

Yes, but it has the fault you seemed to want to avoid. Having to change the formula all the time. If you are willing to do that, you can shorten the formula quite a bit.

(MAXH20.'7/31/2017' + MINL20.'7/31/2017') / 2



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
diceman
Posted : Wednesday, August 16, 2017 9:55:23 AM
Registered User
Joined: 1/28/2005
Posts: 6,049

Thats what I was looking for.

I knew it would need to be updated each month.

 

When I mentioned update I was thinking of a range

like:

MAXH21.10 (whatever is needed to cover that trading day)

on the next trading day you make it:

MAXH21.11 and so on updating each day.

 

I was hoping date codes (like your PCF) would make it monthly updating vs daily.

 

Thanks

 

 

Bruce_L
Posted : Wednesday, August 16, 2017 9:56:37 AM


Worden Trainer

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

Just make sure you count the number of trading days in the month before writing the formula.



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