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 |

Identify stocks whose MACD 2.8.1 cross upper or lower Bollinger Band of that MACD Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
mbslomka
Posted : Wednesday, May 5, 2010 2:57:40 PM
Registered User
Joined: 2/2/2005
Posts: 20
I would like to collect lists of stocks whose MACD 2.8.1 crosses up over its lower Bollinger Band 17.8.3 or down below its upper Bollinger Band. I can do this with appropriate charting but this is time consuming. I have difficulty creating the PCFs to be able to screen list for such activity with an EASY SCAN.Can you [help me] create such PCFs. I would need one for the MACD 2.8.1 and one each for the upper and lower Bollinger Bands.Thank youmslomka [aka Bruce]
Bruce_L
Posted : Wednesday, May 5, 2010 3:16:05 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (mslomka)
I would like to collect lists of stocks whose MACD 2.8.1 crosses up over its lower Bollinger Band 17.8.3...

Please try using the following Personal Criteria Formula as an EasyScan Condition:

XAVGC2 - XAVGC8 > AVG(XAVGC2,17) - AVG(XAVGC8,17) - .8 * SQR(ABS((XAVGC2 - XAVGC8) ^ 2 + (XAVGC2.1 - XAVGC8.1) ^ 2 + (XAVGC2.2 - XAVGC8.2) ^ 2 + (XAVGC2.3 - XAVGC8.3) ^ 2 + (XAVGC2.4 - XAVGC8.4) ^ 2 + (XAVGC2.5 - XAVGC8.5) ^ 2 + (XAVGC2.6 - XAVGC8.6) ^ 2 + (XAVGC2.7 - XAVGC8.7) ^ 2 + (XAVGC2.8 - XAVGC8.8) ^ 2 + (XAVGC2.9 - XAVGC8.9) ^ 2 + (XAVGC2.10 - XAVGC8.10) ^ 2 + (XAVGC2.11 - XAVGC8.11) ^ 2 + (XAVGC2.12 - XAVGC8.12) ^ 2 + (XAVGC2.13 - XAVGC8.13) ^ 2 + (XAVGC2.14 - XAVGC8.14) ^ 2 + (XAVGC2.15 - XAVGC8.15) ^ 2 + (XAVGC2.16 - XAVGC8.16) ^ 2 - 17 * (AVG(XAVGC2,17) - AVG(XAVGC8,17)) ^ 2) / 16) AND XAVGC2.1 - XAVGC8.1 <= AVG(XAVGC2.1,17) - AVG(XAVGC8.1,17) - .8 * SQR(ABS((XAVGC2.1 - XAVGC8.1) ^ 2 + (XAVGC2.2 - XAVGC8.2) ^ 2 + (XAVGC2.3 - XAVGC8.3) ^ 2 + (XAVGC2.4 - XAVGC8.4) ^ 2 + (XAVGC2.5 - XAVGC8.5) ^ 2 + (XAVGC2.6 - XAVGC8.6) ^ 2 + (XAVGC2.7 - XAVGC8.7) ^ 2 + (XAVGC2.8 - XAVGC8.8) ^ 2 + (XAVGC2.9 - XAVGC8.9) ^ 2 + (XAVGC2.10 - XAVGC8.10) ^ 2 + (XAVGC2.11 - XAVGC8.11) ^ 2 + (XAVGC2.12 - XAVGC8.12) ^ 2 + (XAVGC2.13 - XAVGC8.13) ^ 2 + (XAVGC2.14 - XAVGC8.14) ^ 2 + (XAVGC2.15 - XAVGC8.15) ^ 2 + (XAVGC2.16 - XAVGC8.16) ^ 2 + (XAVGC2.17 - XAVGC8.17) ^ 2 - 17 * (AVG(XAVGC2.1,17) - AVG(XAVGC8.1,17)) ^ 2) / 16)

QUOTE (mslomka)
...or down below its upper Bollinger Band.

Please try using the following Personal Criteria Formula as an EasyScan Condition:

XAVGC2 - XAVGC8 < AVG(XAVGC2,17) - AVG(XAVGC8,17) + .8 * SQR(ABS((XAVGC2 - XAVGC8) ^ 2 + (XAVGC2.1 - XAVGC8.1) ^ 2 + (XAVGC2.2 - XAVGC8.2) ^ 2 + (XAVGC2.3 - XAVGC8.3) ^ 2 + (XAVGC2.4 - XAVGC8.4) ^ 2 + (XAVGC2.5 - XAVGC8.5) ^ 2 + (XAVGC2.6 - XAVGC8.6) ^ 2 + (XAVGC2.7 - XAVGC8.7) ^ 2 + (XAVGC2.8 - XAVGC8.8) ^ 2 + (XAVGC2.9 - XAVGC8.9) ^ 2 + (XAVGC2.10 - XAVGC8.10) ^ 2 + (XAVGC2.11 - XAVGC8.11) ^ 2 + (XAVGC2.12 - XAVGC8.12) ^ 2 + (XAVGC2.13 - XAVGC8.13) ^ 2 + (XAVGC2.14 - XAVGC8.14) ^ 2 + (XAVGC2.15 - XAVGC8.15) ^ 2 + (XAVGC2.16 - XAVGC8.16) ^ 2 - 17 * (AVG(XAVGC2,17) - AVG(XAVGC8,17)) ^ 2) / 16) AND XAVGC2.1 - XAVGC8.1 >= AVG(XAVGC2.1,17) - AVG(XAVGC8.1,17) + .8 * SQR(ABS((XAVGC2.1 - XAVGC8.1) ^ 2 + (XAVGC2.2 - XAVGC8.2) ^ 2 + (XAVGC2.3 - XAVGC8.3) ^ 2 + (XAVGC2.4 - XAVGC8.4) ^ 2 + (XAVGC2.5 - XAVGC8.5) ^ 2 + (XAVGC2.6 - XAVGC8.6) ^ 2 + (XAVGC2.7 - XAVGC8.7) ^ 2 + (XAVGC2.8 - XAVGC8.8) ^ 2 + (XAVGC2.9 - XAVGC8.9) ^ 2 + (XAVGC2.10 - XAVGC8.10) ^ 2 + (XAVGC2.11 - XAVGC8.11) ^ 2 + (XAVGC2.12 - XAVGC8.12) ^ 2 + (XAVGC2.13 - XAVGC8.13) ^ 2 + (XAVGC2.14 - XAVGC8.14) ^ 2 + (XAVGC2.15 - XAVGC8.15) ^ 2 + (XAVGC2.16 - XAVGC8.16) ^ 2 + (XAVGC2.17 - XAVGC8.17) ^ 2 - 17 * (AVG(XAVGC2.1,17) - AVG(XAVGC8.1,17)) ^ 2) / 16)

QUOTE (mslomka)
I would need one for the MACD 2.8.1...

XAVGC2 - XAVGC8

QUOTE (mslomka)
...and one each for the upper...

AVG(XAVGC2,17) - AVG(XAVGC8,17) + .8 * SQR(ABS((XAVGC2 - XAVGC8) ^ 2 + (XAVGC2.1 - XAVGC8.1) ^ 2 + (XAVGC2.2 - XAVGC8.2) ^ 2 + (XAVGC2.3 - XAVGC8.3) ^ 2 + (XAVGC2.4 - XAVGC8.4) ^ 2 + (XAVGC2.5 - XAVGC8.5) ^ 2 + (XAVGC2.6 - XAVGC8.6) ^ 2 + (XAVGC2.7 - XAVGC8.7) ^ 2 + (XAVGC2.8 - XAVGC8.8) ^ 2 + (XAVGC2.9 - XAVGC8.9) ^ 2 + (XAVGC2.10 - XAVGC8.10) ^ 2 + (XAVGC2.11 - XAVGC8.11) ^ 2 + (XAVGC2.12 - XAVGC8.12) ^ 2 + (XAVGC2.13 - XAVGC8.13) ^ 2 + (XAVGC2.14 - XAVGC8.14) ^ 2 + (XAVGC2.15 - XAVGC8.15) ^ 2 + (XAVGC2.16 - XAVGC8.16) ^ 2 - 17 * (AVG(XAVGC2,17) - AVG(XAVGC8,17)) ^ 2) / 16)

QUOTE (mslomka)
...and lower Bollinger Bands.

AVG(XAVGC2,17) - AVG(XAVGC8,17) - .8 * SQR(ABS((XAVGC2 - XAVGC8) ^ 2 + (XAVGC2.1 - XAVGC8.1) ^ 2 + (XAVGC2.2 - XAVGC8.2) ^ 2 + (XAVGC2.3 - XAVGC8.3) ^ 2 + (XAVGC2.4 - XAVGC8.4) ^ 2 + (XAVGC2.5 - XAVGC8.5) ^ 2 + (XAVGC2.6 - XAVGC8.6) ^ 2 + (XAVGC2.7 - XAVGC8.7) ^ 2 + (XAVGC2.8 - XAVGC8.8) ^ 2 + (XAVGC2.9 - XAVGC8.9) ^ 2 + (XAVGC2.10 - XAVGC8.10) ^ 2 + (XAVGC2.11 - XAVGC8.11) ^ 2 + (XAVGC2.12 - XAVGC8.12) ^ 2 + (XAVGC2.13 - XAVGC8.13) ^ 2 + (XAVGC2.14 - XAVGC8.14) ^ 2 + (XAVGC2.15 - XAVGC8.15) ^ 2 + (XAVGC2.16 - XAVGC8.16) ^ 2 - 17 * (AVG(XAVGC2,17) - AVG(XAVGC8,17)) ^ 2) / 16)

The above formulas ignore the .3 in the Bollinger Band as I have no idea what this setting means. You may wish to review the following:

Understanding MACD
Modelling Bollinger Bands (& Standard Deviation) in a TC PCF
How to create a Personal Criteria Forumula (PCF)
Using EasyScan to find stocks that meet your own criteria
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
mbslomka
Posted : Wednesday, May 5, 2010 10:11:32 PM
Registered User
Joined: 2/2/2005
Posts: 20
Thank you for all the PCFs and the work and advice that it implies!!!mslomka [aka Bruce]
mbslomka
Posted : Thursday, May 6, 2010 6:57:22 PM
Registered User
Joined: 2/2/2005
Posts: 20
Bruce LI created 4 PCFs from the four that you gave me by computer coping them into TC PCFs.The first one worked perfectly, identifying those stocks whose MACD 2, 8, were higher than the lower band of the MACD's lower Bolinger Band 8, 17, 3.The other 3 all identified different stock listings whose MACDs were below the corresponding upper BB and above the lower BB.None of them identified stocks which were below the lower BB. I will try the simple exercise of revising the opening of your first formula to make "xavgc2-xavgc8 >" read as "xavgc2.1-xavgc8.1 =>" and move each value shown in the rest of the formula. If it works I will include them both in my scan. Does this sound reasonable to you???I am still left with the remaining 3 formulas and how to scan for a cross down through the upper BB.Thanks for your comments and further direction.mslomka [aka Bruce]
Bruce_L
Posted : Friday, May 7, 2010 8:31:24 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (mslomka)
The first one worked perfectly, identifying those stocks whose MACD 2, 8, were higher than the lower band of the MACD's lower Bolinger Band 8, 17, 3.

Actually it identifies symbols where MACD 2, 8 crossed up through through its Lower Bollinger Band 17, 8 as requested. You appear to have switched the Bollinger Band settings in your most recent post for some unknown reason and the .3 listed is again ignored as it is absolutely meaningless).

If you just want symbols where the MACD is above Lower Bollinger Band, the formula would be shorter:

XAVGC2 - XAVGC8 > AVG(XAVGC2,17) - AVG(XAVGC8,17) - .8 * SQR(ABS((XAVGC2 - XAVGC8) ^ 2 + (XAVGC2.1 - XAVGC8.1) ^ 2 + (XAVGC2.2 - XAVGC8.2) ^ 2 + (XAVGC2.3 - XAVGC8.3) ^ 2 + (XAVGC2.4 - XAVGC8.4) ^ 2 + (XAVGC2.5 - XAVGC8.5) ^ 2 + (XAVGC2.6 - XAVGC8.6) ^ 2 + (XAVGC2.7 - XAVGC8.7) ^ 2 + (XAVGC2.8 - XAVGC8.8) ^ 2 + (XAVGC2.9 - XAVGC8.9) ^ 2 + (XAVGC2.10 - XAVGC8.10) ^ 2 + (XAVGC2.11 - XAVGC8.11) ^ 2 + (XAVGC2.12 - XAVGC8.12) ^ 2 + (XAVGC2.13 - XAVGC8.13) ^ 2 + (XAVGC2.14 - XAVGC8.14) ^ 2 + (XAVGC2.15 - XAVGC8.15) ^ 2 + (XAVGC2.16 - XAVGC8.16) ^ 2 - 17 * (AVG(XAVGC2,17) - AVG(XAVGC8,17)) ^ 2) / 16)

QUOTE (mslomka)
The other 3 all identified different stock listings whose MACDs were below the corresponding upper BB and above the lower BB.

Seriously, none of the five PCFs given do this.

The first formula is for the Exponential MACD 2,8 crossing up through its Lower Bollinger Band 17,8 and the second formula is for the Exponential MACD 2,8 crossing down through its upper Bollinger Band.

The third, fourth and fifth formulas don't "identify" anything as they are not Boolean (True or False). The third formula returns the actual Value of the Exponential MACD 2,8, the fourth formula returns the actual Value of the Upper Bollinger Band 17,8 of the Exponential MaCD 2,8 and the the fifth formula returns the actual Value of the Lower Bollinger Band 17,8 of the Exponential MaCD 2,8

A formula for Exponential MACD 2,8 being between its Upper and Lower Bollinger Bands 17,8 would be:

ABS(XAVGC2 - XAVGC8 - AVG(XAVGC2,17) + AVG(XAVGC8,17)) < .8 * SQR(ABS((XAVGC2 - XAVGC8) ^ 2 + (XAVGC2.1 - XAVGC8.1) ^ 2 + (XAVGC2.2 - XAVGC8.2) ^ 2 + (XAVGC2.3 - XAVGC8.3) ^ 2 + (XAVGC2.4 - XAVGC8.4) ^ 2 + (XAVGC2.5 - XAVGC8.5) ^ 2 + (XAVGC2.6 - XAVGC8.6) ^ 2 + (XAVGC2.7 - XAVGC8.7) ^ 2 + (XAVGC2.8 - XAVGC8.8) ^ 2 + (XAVGC2.9 - XAVGC8.9) ^ 2 + (XAVGC2.10 - XAVGC8.10) ^ 2 + (XAVGC2.11 - XAVGC8.11) ^ 2 + (XAVGC2.12 - XAVGC8.12) ^ 2 + (XAVGC2.13 - XAVGC8.13) ^ 2 + (XAVGC2.14 - XAVGC8.14) ^ 2 + (XAVGC2.15 - XAVGC8.15) ^ 2 + (XAVGC2.16 - XAVGC8.16) ^ 2 - 17 * (AVG(XAVGC2,17) - AVG(XAVGC8,17)) ^ 2) / 16)

QUOTE (mslomka)
None of them identified stocks which were below the lower BB.

You didn't ask for this. A formula for Exponential MACD 2,8 being below its Lower Bollinger Band 17,8 would be:

XAVGC2 - XAVGC8 < AVG(XAVGC2,17) - AVG(XAVGC8,17) - .8 * SQR(ABS((XAVGC2 - XAVGC8) ^ 2 + (XAVGC2.1 - XAVGC8.1) ^ 2 + (XAVGC2.2 - XAVGC8.2) ^ 2 + (XAVGC2.3 - XAVGC8.3) ^ 2 + (XAVGC2.4 - XAVGC8.4) ^ 2 + (XAVGC2.5 - XAVGC8.5) ^ 2 + (XAVGC2.6 - XAVGC8.6) ^ 2 + (XAVGC2.7 - XAVGC8.7) ^ 2 + (XAVGC2.8 - XAVGC8.8) ^ 2 + (XAVGC2.9 - XAVGC8.9) ^ 2 + (XAVGC2.10 - XAVGC8.10) ^ 2 + (XAVGC2.11 - XAVGC8.11) ^ 2 + (XAVGC2.12 - XAVGC8.12) ^ 2 + (XAVGC2.13 - XAVGC8.13) ^ 2 + (XAVGC2.14 - XAVGC8.14) ^ 2 + (XAVGC2.15 - XAVGC8.15) ^ 2 + (XAVGC2.16 - XAVGC8.16) ^ 2 - 17 * (AVG(XAVGC2,17) - AVG(XAVGC8,17)) ^ 2) / 16)

QUOTE (mslomka)
I will try the simple exercise of revising the opening of your first formula to make "xavgc2-xavgc8 >" read as "xavgc2.1-xavgc8.1 =>" and move each value shown in the rest of the formula.

The second half (the part after the AND) of the first two formulas already have this exercise done for you as they are crossover formulas containing comparisons for both the current and previous Bars.

The actual previous Value of Exponential MACD 2,8 could be written as:

XAVGC2.1 - XAVGC8.1

The actual previous Value of Upper Bollinger Band 17,8 of Exponential MACD 2,8 could be written as:

AVG(XAVGC2.1,17) - AVG(XAVGC8.1,17) + .8 * SQR(ABS((XAVGC2.1 - XAVGC8.1) ^ 2 + (XAVGC2.2 - XAVGC8.2) ^ 2 + (XAVGC2.3 - XAVGC8.3) ^ 2 + (XAVGC2.4 - XAVGC8.4) ^ 2 + (XAVGC2.5 - XAVGC8.5) ^ 2 + (XAVGC2.6 - XAVGC8.6) ^ 2 + (XAVGC2.7 - XAVGC8.7) ^ 2 + (XAVGC2.8 - XAVGC8.8) ^ 2 + (XAVGC2.9 - XAVGC8.9) ^ 2 + (XAVGC2.10 - XAVGC8.10) ^ 2 + (XAVGC2.11 - XAVGC8.11) ^ 2 + (XAVGC2.12 - XAVGC8.12) ^ 2 + (XAVGC2.13 - XAVGC8.13) ^ 2 + (XAVGC2.14 - XAVGC8.14) ^ 2 + (XAVGC2.15 - XAVGC8.15) ^ 2 + (XAVGC2.16 - XAVGC8.16) ^ 2 + (XAVGC2.17 - XAVGC8.17) ^ 2 - 17 * (AVG(XAVGC2.1,17) - AVG(XAVGC8.1,17)) ^ 2) / 16)

The actual previous Value of Lower Bollinger Band 17,8 of Exponential MACD 2,8 could be written as:

AVG(XAVGC2.1,17) - AVG(XAVGC8.1,17) - .8 * SQR(ABS((XAVGC2.1 - XAVGC8.1) ^ 2 + (XAVGC2.2 - XAVGC8.2) ^ 2 + (XAVGC2.3 - XAVGC8.3) ^ 2 + (XAVGC2.4 - XAVGC8.4) ^ 2 + (XAVGC2.5 - XAVGC8.5) ^ 2 + (XAVGC2.6 - XAVGC8.6) ^ 2 + (XAVGC2.7 - XAVGC8.7) ^ 2 + (XAVGC2.8 - XAVGC8.8) ^ 2 + (XAVGC2.9 - XAVGC8.9) ^ 2 + (XAVGC2.10 - XAVGC8.10) ^ 2 + (XAVGC2.11 - XAVGC8.11) ^ 2 + (XAVGC2.12 - XAVGC8.12) ^ 2 + (XAVGC2.13 - XAVGC8.13) ^ 2 + (XAVGC2.14 - XAVGC8.14) ^ 2 + (XAVGC2.15 - XAVGC8.15) ^ 2 + (XAVGC2.16 - XAVGC8.16) ^ 2 + (XAVGC2.17 - XAVGC8.17) ^ 2 - 17 * (AVG(XAVGC2.1,17) - AVG(XAVGC8.1,17)) ^ 2) / 16)

QUOTE (mslomka)
I am still left with the remaining 3 formulas...

As stated, the last three formulas just return the actual current Values of the three lines involved in the comparisons.

QUOTE (mslomka)
...and how to scan for a cross down through the upper BB.

The second formula given in my original response already does return True when Exponential MACD 2,8 crosses down through its Upper Bollinger Band 17,8.

QUOTE (mslomka)
...Bolinger Band 8, 17, 3...

This makes me wonder if you are actually asking the questions you intend to ask as it switches the order of the first two Bollinger Band settings from the original question and includes this third, completely meaningless .3 setting for your Bollinger Bands (the original question also included this third setting).

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