Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

condition linking 3 days in MACD histogram 12,26,9 Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
guizi
Posted : Wednesday, March 4, 2015 8:00:09 PM
Registered User
Joined: 8/28/2010
Posts: 17

Dear Bruce:

In MACD Histogram 12,26 ,9 --how to create the following conditions:

1-the day before yesterday is higher than yesterday,and yesterday is lower than today

2-the day before yesterday is lower than yesterday and yesterday is higher than today

Thank you so much indeed

Alex

Bruce_L
Posted : Thursday, March 5, 2015 9:58:46 AM


Worden Trainer

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

QUOTE (guizi)
1-the day before yesterday is higher than yesterday,and yesterday is lower than today

The "obvious" way to write this is as follows.

XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9) > XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9) AND XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9) < XAVGC12.2 - XAVGC26.2 - XAVG(XAVGC12.2,9) + XAVG(XAVGC26.2,9)

But it can be shorted significantly to the following.

119 * C + 765 * XAVGC12.1 > 65 * XAVGC26.1 + 819 * XAVGC9.1 AND 119 * C1 + 765 * XAVGC12.2 < 65 * XAVGC26.2 + 819 * XAVGC9.2

QUOTE (guizi)
2-the day before yesterday is lower than yesterday and yesterday is higher than today

The long but easy way.

XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9) < XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9) AND XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9) > XAVGC12.2 - XAVGC26.2 - XAVG(XAVGC12.2,9) + XAVG(XAVGC26.2,9)

The short but more difficult to write way.

119 * C + 765 * XAVGC12.1 < 5 * XAVGC26.1 + 819 * XAVGC9.1 AND 119 * C1 + 765 * XAVGC12.2 > 65 * XAVGC26.2 + 819 * XAVGC9.2

How to construct MACD related PCFs is explored in the Understanding MACD topic.

The math behind shortening the formulas is explored in the Cascades of Moving Averages topic.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
guizi
Posted : Friday, March 6, 2015 7:39:19 PM
Registered User
Joined: 8/28/2010
Posts: 17

Bruce thank you for the response.But I pasted the two long formulas in conditions PCF,and it returned formula error.

How to overcome it.

Alex

Bruce_L
Posted : Monday, March 9, 2015 10:26:12 AM


Worden Trainer

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

Try copying and pasting the Condition Formulas again (or just use the shorter formulas).

You can use ctrl-v to paste if there isn't an option to paste when right-clicking.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
guizi
Posted : Monday, March 9, 2015 3:46:29 PM
Registered User
Joined: 8/28/2010
Posts: 17

Bruce,thank you so much indeed, now it&acute;s working.

I&acute;d like to have the same 2 conditions before,  now applied to: Derivative Oscilator and  William&acute;s Acceleration/Deccelaretion

Warm regards

Alex

guizi
Posted : Monday, March 9, 2015 3:51:19 PM
Registered User
Joined: 8/28/2010
Posts: 17

Something went wrong.Sorry.

 

Bruce, thank you so much indeed, now it&acute;s  working.

I&acute;d like to have the same 2 conditions before listed,  now applied to: Derivative Oscilator and  William&acute;s Acceleration/Decceleration

Warm regards

Alex

guizi
Posted : Monday, March 9, 2015 3:59:03 PM
Registered User
Joined: 8/28/2010
Posts: 17

 

Something went wrong again.Sorry

Bruce,thank you so much indeed, now it&acute;s working.

I&acute;d like to have the same 2 conditions listed above, now applied to:Derivative Oscillator and William&acute;s Acceleration/Decceleration.

Warm regards

Alex

Bruce_L
Posted : Monday, March 9, 2015 4:32:07 PM


Worden Trainer

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

The first formula for William's Acceleration/Deceleration (not Accumulation/Distribution) could be written as follows.

(AVGH5 + AVGL5 - AVGH34 - AVGL34 - AVG(AVGH5,5) - AVG(AVGL5,5) + AVG(AVGH34,5) + AVG(AVGL34,5)) / 2 > (AVGH5.1 + AVGL5.1 - AVGH34.1 - AVGL34.1 - AVG(AVGH5.1,5) - AVG(AVGL5.1,5) + AVG(AVGH34.1,5) + AVG(AVGL34.1,5)) / 2 AND (AVGH5.1 + AVGL5.1 - AVGH34.1 - AVGL34.1 - AVG(AVGH5.1,5) - AVG(AVGL5.1,5) + AVG(AVGH34.1,5) + AVG(AVGL34.1,5)) / 2 < (AVGH5.2 + AVGL5.2 - AVGH34.2 - AVGL34.2 - AVG(AVGH5.2,5) - AVG(AVGL5.2,5) + AVG(AVGH34.2,5) + AVG(AVGL34.2,5)) / 2

The first formula for William's Acceleration/Deceleration (not Accumulation/Distribution) could be written as follows.

(AVGH5 + AVGL5 - AVGH34 - AVGL34 - AVG(AVGH5,5) - AVG(AVGL5,5) + AVG(AVGH34,5) + AVG(AVGL34,5)) / 2 < (AVGH5.1 + AVGL5.1 - AVGH34.1 - AVGL34.1 - AVG(AVGH5.1,5) - AVG(AVGL5.1,5) + AVG(AVGH34.1,5) + AVG(AVGL34.1,5)) / 2 AND (AVGH5.1 + AVGL5.1 - AVGH34.1 - AVGL34.1 - AVG(AVGH5.1,5) - AVG(AVGL5.1,5) + AVG(AVGH34.1,5) + AVG(AVGL34.1,5)) / 2 > (AVGH5.2 + AVGL5.2 - AVGH34.2 - AVGL34.2 - AVG(AVGH5.2,5) - AVG(AVGL5.2,5) + AVG(AVGH34.2,5) + AVG(AVGL34.2,5)) / 2

Similar formula for the derivative oscillator are too long and slow to be practical or post in the forums.

If you are just interested in conditions however, try adding a 2-period moving average the derivative oscillator. Then click on the derivative oscillator and select Create Scan Condition to create a condition for crossing up through or down through the moving average.

Create Conditions from Your Chart (5:25)



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