## New version 17 available now

Subscription & data-feed pricing Class schedule

Margin rates Stock & option commissions

 PCF sytax help Rate this Topic:
 Previous Topic · Next Topic Watch this topic · Print this topic ·
MosheSeb
 Posted : Saturday, January 13, 2018 3:45:46 PM
Gold Customer

Joined: 1/13/2018
Posts: 2

Hi,

I need your help in PCF syntax

I am trying to find out what is the syntax for the following parameters:

1. The opening price of today

2. The closing price of yesterday

3. The pivot price

4. The VWAP price of today's candle (bar) number 10 (in a 5 min chart)

5. The high price of today's candle (bar) number 10 (in a 5 min chart)

6. The high price of the current candle (bar) (in a 5 min chart)

7. The low price of today's candle (bar) number 9 (in a 5 min chart)

8. The current price of a stock

9. The daily ATR

10. The weekly ATR

11. The R3 price

Thanks Allot

Moshe Sebon.

Bruce_L
 Posted : Tuesday, January 16, 2018 11:49:52 AM

Worden Trainer

Joined: 10/7/2004
Posts: 61,564

QUOTE (MosheSeb)
The opening price of today

Make sure this is set to a daily time frame.

`O`

QUOTE (MosheSeb)
The closing price of yesterday

Make sure this is set to a daily time frame. Note that this is actually the close of one bar ago and this is based on if a new bar has started forming or not. So let's say it it is Wednesday before the more the market open. This would be Monday's close. It would not change until Tuesday's close until trading day started on Wednesday.

`C1`

QUOTE (MosheSeb)
The pivot price

This could mean a lot of different things. I am going to go with the value of the central pivot point (PP). You need to make sure the time frame is set to daily.

(H1 + L1 + C1) / 3

QUOTE (MosheSeb)
The VWAP price of today's candle (bar) number 10 (in a 5 min chart)

Well this formula will only be correct while the 10th bar of the trading day is forming. Once the 11th bar of the trading day starts forming, you would need a different formula. The time frame needs to be set to 5-minutes in order for it to match a 5-minute chart.

`SUM(V * (O + H + L + C) / 4, 10) / SUM(V, 10)`

QUOTE (MosheSeb)
The high price of today's candle (bar) number 10 (in a 5 min chart)

There is no way to specify the bar of the day. So during the 10th bar of the chart, the following formula would represent the high of the 10th bar of the chart.

`H`

But once the 11th bar starts forming, the formula would need to change to the following (both formulas need to use a 5-minute time frame).

`H1`

QUOTE (MosheSeb)
The high price of the current candle (bar) (in a 5 min chart)

This just:

`H`

Using a 5-minute time frame it would be the high of the current 5 minute bar. Using a daily time frame it would be the high of the trading day so far.

QUOTE (MosheSeb)
The low price of today's candle (bar) number 9 (in a 5 min chart)

There is no way to specify which bar of the day something is, only how many bars ago. So while the 9th bar is forming, this would be:

`L`

But while the 10th bar is forming, this would be:

`L1`

You need to use a 5-minute time frame for the formula if you want the formula to represent 5 minute bars.

QUOTE (MosheSeb)
The current price of a stock

This is just:

`C`

The time frame shouldn't matter.

QUOTE (MosheSeb)
The daily ATR

If you want the true range for the current trading day so far.

`ATR`

If you want the average true range over the most recent 14 days.

`ATR14`

Make sure the time frame is set to daily.

QUOTE (MosheSeb)
The weekly ATR

If you want the true range for the current trading week so far.

`ATR`

If you want the average true range over the most recent 14 weeks.

`ATR14`

Make sure the time frame is set to weekly.

QUOTE (MosheSeb)
The R3 price

One way to write the formula for R3 would be the following.

`H1 + 2 * ((H1 + L1 + C1) / 3 - L1)`

Make sure the time frame is set to daily.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

 Forum Jump Customer Training & Support - Ask a Trainer - TC2000 version 12/17 - Ask a Trainer - TC2000 version 7 - Ask a Trainer - StockFinder 5.0 - PCFs, EasyScan and Custom Indicators General Discussions - Stock and Market Talk - TC2000 version 12 or 17 - TC2000 version 7 - StockFinder 5.0 - RealCode for StockFinder 5.0 Tutorial Videos - TC2000 version 12 tutorial videos - TC2000 version 7 tutorial videos 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.