Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Platinum Customer
Joined: 1/23/2006 Posts: 26
|
Greetings. Would like to write an easyscan where ...the current(weekly,daily & hourly) bar of the MACD-Histogram (12,26,9),(exponential) is higher(greater) than the prior bar. Any help would be appreciated. Thank You.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
We're going to start with a slightly less obvious formula than I would normally use for the difference between the current daily Exponential MACD Histogram (12,26,9) and its previous value:
(1904 * C + 12240 * XAVGC12.1 - 1040 * XAVGC26.1 - 13104 * XAVGC9.1) / 29835
Since we only care if the slope is increasing, we can eliminate the denominator and simplify the factors in the numerator somewhat to get the following Daily formula for an increasing Histogram:
119 * C + 765 * XAVGC12.1 - 65 * XAVGC26.1 - 819 * XAVGC9.1 > 0
I'm using this format because it only has three Exponential Moving Averages that need to be expanded to get the Weekly version:
119 * C + 117.797991844221 * (C5 + 11 / 13 * (C10 + 11 / 13 * (C15 + 11 / 13 * (C20 + 11 / 13 * (C25 + 11 / 13 * (C30 + 11 / 13 * (C35 + 11 / 13 * (C40 + 11 / 13 * (C45 + 11 / 13 * (C50 + 11 / 13 * (C55 + 11 / 13 * (C60 + 11 / 13 * (C65 + 11 / 13 * (C70 + 11 / 13 * (C75 + 11 / 13 * (C80 + 11 / 13 * (C85 + 11 / 13 * (C90 + 11 / 13 * (C95 + 11 / 13 * (C100 + 11 / 13 * (C105 + 11 / 13 * (C110 + 11 / 13 * (C115 + 11 / 13 * (C120 + 11 / 13 * (C125 + 11 / 13 * (C130 + 11 / 13 * (C135 + 11 / 13 * (C140 + 11 / 13 * (C145 + 11 / 13 * (C150 + 11 / 13 * (C155 + 11 / 13 * (C160 + 11 / 13 * (C165 + 11 / 13 * (C170 + 11 / 13 * (C175 + 11 / 13 * (C180 + 11 / 13 * (C185 + 11 / 13 * (C190 + 11 / 13 * (C195 + 11 / 13 * (C200 + 11 / 13 * (C205 + 11 / 13 * (C210)))))))))))))))))))))))))))))))))))))))))) - 4.81954488991197 * (C5 + 25 / 27 * (C10 + 25 / 27 * (C15 + 25 / 27 * (C20 + 25 / 27 * (C25 + 25 / 27 * (C30 + 25 / 27 * (C35 + 25 / 27 * (C40 + 25 / 27 * (C45 + 25 / 27 * (C50 + 25 / 27 * (C55 + 25 / 27 * (C60 + 25 / 27 * (C65 + 25 / 27 * (C70 + 25 / 27 * (C75 + 25 / 27 * (C80 + 25 / 27 * (C85 + 25 / 27 * (C90 + 25 / 27 * (C95 + 25 / 27 * (C100 + 25 / 27 * (C105 + 25 / 27 * (C110 + 25 / 27 * (C115 + 25 / 27 * (C120 + 25 / 27 * (C125 + 25 / 27 * (C130 + 25 / 27 * (C135 + 25 / 27 * (C140 + 25 / 27 * (C145 + 25 / 27 * (C150 + 25 / 27 * (C155 + 25 / 27 * (C160 + 25 / 27 * (C165 + 25 / 27 * (C170 + 25 / 27 * (C175 + 25 / 27 * (C180 + 25 / 27 * (C185 + 25 / 27 * (C190 + 25 / 27 * (C195 + 25 / 27 * (C200 + 25 / 27 * (C205 + 25 / 27 * (C210 + 25 / 27 * (C215 + 25 / 27 * (C220 + 25 / 27 * (C225 + 25 / 27 * (C230 + 25 / 27 * (C235 + 25 / 27 * (C240 + 25 / 27 * (C245 + 25 / 27 * (C250 + 25 / 27 * (C255 + 25 / 27 * (C260 + 25 / 27 * (C265 + 25 / 27 * (C270 + 25 / 27 * (C275 + 25 / 27 * (C280 + 25 / 27 * (C285 + 25 / 27 * (C290 + 25 / 27 * (C295 + 25 / 27 * (C300 + 25 / 27 * (C305 + 25 / 27 * (C310 + 25 / 27 * (C315 + 25 / 27 * (C320 + 25 / 27 * (C325 + 25 / 27 * (C330 + 25 / 27 * (C335 + 25 / 27 * (C340 + 25 / 27 * (C345 + 25 / 27 * (C350 + 25 / 27 * (C355 + 25 / 27 * (C360 + 25 / 27 * (C365 + 25 / 27 * (C370 + 25 / 27 * (C375 + 25 / 27 * (C380 + 25 / 27 * (C385 + 25 / 27 * (C390 + 25 / 27 * (C395 + 25 / 27 * (C400 + 25 / 27 * (C405 + 25 / 27 * (C410 + 25 / 27 * (C415 + 25 / 27 * (C420 + 25 / 27 * (C425 + 25 / 27 * (C430 + 25 / 27 * (C435 + 25 / 27 * (C440 + 25 / 27 * (C445 + 25 / 27 * (C450)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) - 163.962380476583 * (C5 + .8 * (C10 + .8 * (C15 + .8 * (C20 + .8 * (C25 + .8 * (C30 + .8 * (C35 + .8 * (C40 + .8 * (C45 + .8 * (C50 + .8 * (C55 + .8 * (C60 + .8 * (C65 + .8 * (C70 + .8 * (C75 + .8 * (C80 + .8 * (C85 + .8 * (C90 + .8 * (C95 + .8 * (C100 + .8 * (C105 + .8 * (C110 + .8 * (C115 + .8 * (C120 + .8 * (C125 + .8 * (C130 + .8 * (C135 + .8 * (C140 + .8 * (C145 + .8 * (C150 + .8 * (C155))))))))))))))))))))))))))))))) > 0
Use the last two formulas as EasyScan Conditions to find symbols where the Daily and Weekly Histograms are both increasing.
Personal Criteria Formulas can't be written for intra-day values, but you could use the Daily formula in a Custom Percent True on an Hourly Chart and sort using Real Time Indicator Sorting. If you sort the EasyScan based on the above, any symbol returning True for the Custom Percent True will be True for all three conditions. You may wish to review the following:
How to create a Personal Criteria Forumula (PCF) Using EasyScan to find stocks that meet your own criteria Visually Backtesting Specific Symbols Real time indicator sorting (available at the Platinum level) Cascades of Moving Averages Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
Bruce
I was wondering what would be the pros and cons of taking the daily version and adapting it to weekly numbers:
daily:
119 * C + 765 * XAVGC12.1 - 65 * XAVGC26.1 - 819 * XAVGC9.1 > 0
convert to:
119 * C + 765 * XAVGC60.5 - 65 * XAVGC130.5 - 819 * XAVGC45.5 > 0
Assuming I have even done this correctly. Is there a way to explain what this is calculating vs. your third equation?
Thanks diceman
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
A weekly chart only exposes every 5th daily close. Your version will use every daily close, Bruce's uses only every 5th daily close (like the chart).
- Craig Here to Help!
|
|
Platinum Customer
Joined: 1/23/2006 Posts: 26
|
Thanks for ALL of your help.!!!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome. Our pleasure.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |