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
|
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
|
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
|
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
|
Registered User Joined: 8/28/2010 Posts: 17
|
Bruce,thank you so much indeed, now it´s working.
I´d like to have the same 2 conditions before, now applied to: Derivative Oscilator and William´s Acceleration/Deccelaretion
Warm regards
Alex
|
Registered User Joined: 8/28/2010 Posts: 17
|
Something went wrong.Sorry.
Bruce, thank you so much indeed, now it´s working.
I´d like to have the same 2 conditions before listed, now applied to: Derivative Oscilator and William´s Acceleration/Decceleration
Warm regards
Alex
|
Registered User Joined: 8/28/2010 Posts: 17
|
Something went wrong again.Sorry
Bruce,thank you so much indeed, now it´s working.
I´d like to have the same 2 conditions listed above, now applied to:Derivative Oscillator and William´s Acceleration/Decceleration.
Warm regards
Alex
|
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
|