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 |

Custom PCF Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
tradersadvocate
Posted : Tuesday, May 7, 2013 7:59:04 PM
Registered User
Joined: 4/25/2012
Posts: 5

Hi,

Is there a way to create a custom PCF that calculates the greater of either (High of today - High of yesterday) or (Low of yesterday - Low of today)?

If so, is there also a way to create an EMA of the calculated data?

Thanks.

Bruce_L
Posted : Wednesday, May 8, 2013 8:57:21 AM


Worden Trainer

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

The following formula should work for the original Indicator Formula requested:

(H - H1 + L1 - L + ABS(H - H1 - L1 + L)) / 2

The exponential moving average of the first for terms of the formula can be calculated fairly easily using XAVG, but the ABS(H - H1 - L1 + L) term would need to be expanded manually. The period of the exponential moving average would be required to create the formula.

You would probably be better off using the Indicator Formula as the Formula in a Custom PCF Indicator with the Average Type set to Exponential and the Period set as desired.

Min Max PCFs
Cascades of Moving Averages



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tradersadvocate
Posted : Wednesday, May 8, 2013 11:13:12 AM
Registered User
Joined: 4/25/2012
Posts: 5

Thanks for the quick reply Bruce,

From what I can see, it seems as though there will be an averaging operation at the end of the formula (/2). The only thing I want the indicator to do is see the High of today - High of yesterday to equal 4 and the Low of yesterday - Low of today to be 1, hypothetically, and have the indicator plot the greater amount, 4. After say a ten day period of plotted numbers, I just want a 10EMA of the plotted numbers.

 

The plotted numbers would be set as a historgram and the EMA would be plotted to scale with the histogram. It would basically look like Volume plotted with an EMA, histrogram bars either above to show greater than normal activity or below, showing disinterest.

 

Any suggestions for this request would be much appreciated.

Bruce_L
Posted : Wednesday, May 8, 2013 12:03:11 PM


Worden Trainer

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

QUOTE (tradersadvocate)
The only thing I want the indicator to do is see the High of today - High of yesterday to equal 4 and the Low of yesterday - Low of today to be 1, hypothetically, and have the indicator plot the greater amount, 4.

The formula given in my original response already does this.

QUOTE (tradersadvocate)
After say a ten day period of plotted numbers, I just want a 10EMA of the plotted numbers.

As stated in my original response, this can be done by using the Indicator Formula given as the Formula in a Custom PCF Indicator with the Average Type set to Expononteial and the Period set to 10.

Since we now have a period, we could also create an Indicator Formula for this, but it is not easily adjustable like the Custom PCF Indicator method.

(XAVGH10 - XAVGH10.1 + XAVGL10.1 - XAVGL10 + .1819803 * (ABS(H - H1 - L1 + L) + 9 / 11 * (ABS(H1 - H2 - L2 + L1) + 9 / 11 * (ABS(H2 - H3 - L3 + L2) + 9 / 11 * (ABS(H3 - H4 - L4 + L3) + 9 / 11 * (ABS(H4 - H5 - L5 + L4) + 9 / 11 * (ABS(H5 - H6 - L6 + L5) + 9 / 11 * (ABS(H6 - H7 - L7 + L6) + 9 / 11 * (ABS(H7 - H8 - L8 + L7) + 9 / 11 * (ABS(H8 - H9 - L9 + L8) + 9 / 11 * (ABS(H9 - H10 - L10 + L9) + 9 / 11 * (ABS(H10 - H11 - L11 + L10) + 9 / 11 * (ABS(H11 - H12 - L12 + L11) + 9 / 11 * (ABS(H12 - H13 - L13 + L12) + 9 / 11 * (ABS(H13 - H14 - L14 + L13) + 9 / 11 * (ABS(H14 - H15 - L15 + L14) + 9 / 11 * (ABS(H15 - H16 - L16 + L15) + 9 / 11 * (ABS(H16 - H17 - L17 + L16) + 9 / 11 * (ABS(H17 - H18 - L18 + L17) + 9 / 11 * (ABS(H18 - H19 - L19 + L18) + 9 / 11 * (ABS(H19 - H20 - L20 + L19) + 9 / 11 * (ABS(H20 - H21 - L21 + L20) + 9 / 11 * (ABS(H21 - H22 - L22 + L21) + 9 / 11 * (ABS(H22 - H23 - L23 + L22) + 9 / 11 * (ABS(H23 - H24 - L24 + L23) + 9 / 11 * (ABS(H24 - H25 - L25 + L24) + 9 / 11 * (ABS(H25 - H26 - L26 + L25) + 9 / 11 * (ABS(H26 - H27 - L27 + L26) + 9 / 11 * (ABS(H27 - H28 - L28 + L27) + 9 / 11 * (ABS(H28 - H29 - L29 + L28) + 9 / 11 * (ABS(H29 - H30 - L30 + L29) + 9 / 11 * (ABS(H30 - H31 - L31 + L30) + 9 / 11 * (ABS(H31 - H32 - L32 + L31) + 9 / 11 * (ABS(H32 - H33 - L33 + L32) + 9 / 11 * (ABS(H33 - H34 - L34 + L33) + 9 / 11 * (ABS(H34 - H35 - L35 + L34))))))))))))))))))))))))))))))))))))) / 2

QUOTE (tradersadvocate)
The plotted numbers would be set as a historgram and the EMA would be plotted to scale with the histogram. It would basically look like Volume plotted with an EMA, histrogram bars either above to show greater than normal activity or below, showing disinterest.

If I'm understanding correctly (which is not guaranteed), plot the original formula as a Custom PCF Indicator with the Plot Style set to Histogram (Period set to 1 with the Average Type not mattering at all). Then add an Exponential Moving Average to Custom PCF Indicator.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tradersadvocate
Posted : Friday, May 10, 2013 10:25:10 AM
Registered User
Joined: 4/25/2012
Posts: 5

My mistake, indicator works as suggested. Thanks for the help Bruce.

Bruce_L
Posted : Friday, May 10, 2013 10:28:48 AM


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.