Registered User Joined: 4/14/2010 Posts: 12
|
Hi. I want to create a condition for situations where the MACD Histogram (12, 26, 9) has bottomed out after going below the zero line and is now rising. Is there a way to do that in a single condition? If not, I know I can create one condition where it is below the zero line. But how do I have it show that it is now rising? Thanks.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If you want to return true for all symbols where the Exponential MACD Histogram is both below zero and rising, you could use the following formula:
Understanding MACD
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9) < 0 AND XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9) > XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)
If you only want to return true for the first bar which is rising after it was falling, you would need to check that the MACD Histogram was actually falling during the previous bar as well:
XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9) < 0 AND 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)
It should be noted that the first formula could be reproduces as a Scan by just creating Conditions for the MACD Histogram being below zero and the MACD Histogram Moving Up and adding both Conditions to the same Scan. I cannot think of a way to reproduce the second Condition Formula by just clicking on the MACD Histogram and selecting Create Condition however.
Indicators, Sorting & Scanning
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 4/14/2010 Posts: 12
|
Cool! Thanks.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|