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 |

8 EMA Trend Reversal PDF Topic Rating:
Previous Topic · Next Topic Watch this topic · Print this topic ·
SDGoodGuy
Posted : Wednesday, November 12, 2014 2:50:46 PM
Gold Customer Gold Customer

Joined: 10/7/2004
Posts: 16

Hello - I am trying to construct an 8-day EMA trend reversal PDF ... and I want each stock to me UP today ...  I am running for all stocks over $4 with an average 30 day volume of 250,000 ... I am trying to find stocks that are reacting to a "U shaped" 8 EMA line ... this is what I have .... perhaps my approach of calculating SLOPE of the 8 EMA line is not the best approach.  This is over the past 3 weeks.

(I am unable to CUT and PASTE PDF here for some reason)

 

The name of the PDF is "Tline Reversal - Worden" if you can look at it .. thanks.

 

 

 

Bruce_L
Posted : Thursday, November 13, 2014 9:07:30 AM


Worden Trainer

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

Your formula:

( (( XAVGc8.9 - xavgc8.12) / xavgc8.12 < -.03) AND (ABS(XAVGc8.5 -XAVGC8.8 ) / xavgc8.8 < .02) AND (( XAVGC - xavgc8) / xavgc8.4 > .03) ) and c > xavgc8

Appears like it is designed to check for the percent change in the 8-period exponential moving average between 12 and 9 bars ago being less than -3%, between 8 and 5 bars ago being less than 2% and between 4 bars ago and now being greater than 3% and price being above the moving average.

We can shorten this quite a bit (and correct the ( XAVGC - xavgc8) / xavgc8.4 > .03 term).

XAVGC8.9 / XAVGC8.12 < .97 AND XAVGC8.5 / XAVGC8.8 < 1.02 AND XAVGC8 / XAVGC8.4 > 1.03 AND C > XAVGC8

Switching to a linear regression slope expressed as a percentage probably isn't going to amke abig difference. These are pretty big moves which are fairly restrictive in their placements over relatively short periods of time.

I don't think the problem is necessarily the strategy, just the fact that the formula is so restrictive.

The following Condition Formula just checks for price being below the moving average 14 bars ago (to use 15 bars for 3 weeks instead of 13 bars as in your formula), above the moving average now with the moving average both 14 bars ago and now being at least 3% above the low of the moving average over the span.

C > XAVGC8 AND C14 < XAVGC8.14 AND XAVGC8 > 1.03 * MIN(XAVGC8,15) AND XAVGC8.14 > 1.03 * MIN(XAVGC8,15)

While it is probably overkill, the following includes all of these requirements while at the same time trying to quantify how smooth the curve is over the period. It returns a "% match" when true and 0 when false instead of returning true or false.

100 * (ABS((XAVGC8 - XAVGC8.1 > XAVGC8.1 - XAVGC8.2) + (XAVGC8.1 - XAVGC8.2 > XAVGC8.2 - XAVGC8.3) + (XAVGC8.2 - XAVGC8.3 > XAVGC8.3 - XAVGC8.4) + (XAVGC8.3 - XAVGC8.4 > XAVGC8.4 - XAVGC8.5) + (XAVGC8.4 - XAVGC8.5 > XAVGC8.5 - XAVGC8.6) + (XAVGC8.5 - XAVGC8.6 > XAVGC8.6 - XAVGC8.7) + (XAVGC8.6 - XAVGC8.7 > XAVGC8.7 - XAVGC8.8) + (XAVGC8.7 - XAVGC8.8 > XAVGC8.8 - XAVGC8.9) + (XAVGC8.8 - XAVGC8.9 > XAVGC8.9 - XAVGC8.10) + (XAVGC8.9 - XAVGC8.10 > XAVGC8.10 - XAVGC8.11) + (XAVGC8.10 - XAVGC8.11 > XAVGC8.11 - XAVGC8.12) + (XAVGC8.11 - XAVGC8.12 > XAVGC8.12 - XAVGC8.13) + (XAVGC8.12 - XAVGC8.13 > XAVGC8.13 - XAVGC8.14)) / 13 + ABS((XAVGC8 - XAVGC8.2 > XAVGC8.1 - XAVGC8.3) + (XAVGC8.1 - XAVGC8.3 > XAVGC8.2 - XAVGC8.4) + (XAVGC8.2 - XAVGC8.4 > XAVGC8.3 - XAVGC8.5) + (XAVGC8.3 - XAVGC8.5 > XAVGC8.4 - XAVGC8.6) + (XAVGC8.4 - XAVGC8.6 > XAVGC8.5 - XAVGC8.7) + (XAVGC8.5 - XAVGC8.7 > XAVGC8.6 - XAVGC8.8) + (XAVGC8.6 - XAVGC8.8 > XAVGC8.7 - XAVGC8.9) + (XAVGC8.7 - XAVGC8.9 > XAVGC8.8 - XAVGC8.10) + (XAVGC8.8 - XAVGC8.10 > XAVGC8.9 - XAVGC8.11) + (XAVGC8.9 - XAVGC8.11 > XAVGC8.10 - XAVGC8.12) + (XAVGC8.10 - XAVGC8.12 > XAVGC8.11 - XAVGC8.13) + (XAVGC8.11 - XAVGC8.13 > XAVGC8.12 - XAVGC8.14)) / 12 + ABS((XAVGC8 - XAVGC8.3 > XAVGC8.1 - XAVGC8.4) + (XAVGC8.1 - XAVGC8.4 > XAVGC8.2 - XAVGC8.5) + (XAVGC8.2 - XAVGC8.5 > XAVGC8.3 - XAVGC8.6) + (XAVGC8.3 - XAVGC8.6 > XAVGC8.4 - XAVGC8.7) + (XAVGC8.4 - XAVGC8.7 > XAVGC8.5 - XAVGC8.8) + (XAVGC8.5 - XAVGC8.8 > XAVGC8.6 - XAVGC8.9) + (XAVGC8.6 - XAVGC8.9 > XAVGC8.7 - XAVGC8.10) + (XAVGC8.7 - XAVGC8.10 > XAVGC8.8 - XAVGC8.11) + (XAVGC8.8 - XAVGC8.11 > XAVGC8.9 - XAVGC8.12) + (XAVGC8.9 - XAVGC8.12 > XAVGC8.10 - XAVGC8.13) + (XAVGC8.10 - XAVGC8.13 > XAVGC8.11 - XAVGC8.14)) / 11 + ABS((XAVGC8 - XAVGC8.4 > XAVGC8.1 - XAVGC8.5) + (XAVGC8.1 - XAVGC8.5 > XAVGC8.2 - XAVGC8.6) + (XAVGC8.2 - XAVGC8.6 > XAVGC8.3 - XAVGC8.7) + (XAVGC8.3 - XAVGC8.7 > XAVGC8.4 - XAVGC8.8) + (XAVGC8.4 - XAVGC8.8 > XAVGC8.5 - XAVGC8.9) + (XAVGC8.5 - XAVGC8.9 > XAVGC8.6 - XAVGC8.10) + (XAVGC8.6 - XAVGC8.10 > XAVGC8.7 - XAVGC8.11) + (XAVGC8.7 - XAVGC8.11 > XAVGC8.8 - XAVGC8.12) + (XAVGC8.8 - XAVGC8.12 > XAVGC8.9 - XAVGC8.13) + (XAVGC8.9 - XAVGC8.13 > XAVGC8.10 - XAVGC8.14)) / 10 + ABS((XAVGC8 - XAVGC8.5 > XAVGC8.1 - XAVGC8.6) + (XAVGC8.1 - XAVGC8.6 > XAVGC8.2 - XAVGC8.7) + (XAVGC8.2 - XAVGC8.7 > XAVGC8.3 - XAVGC8.8) + (XAVGC8.3 - XAVGC8.8 > XAVGC8.4 - XAVGC8.9) + (XAVGC8.4 - XAVGC8.9 > XAVGC8.5 - XAVGC8.10) + (XAVGC8.5 - XAVGC8.10 > XAVGC8.6 - XAVGC8.11) + (XAVGC8.6 - XAVGC8.11 > XAVGC8.7 - XAVGC8.12) + (XAVGC8.7 - XAVGC8.12 > XAVGC8.8 - XAVGC8.13) + (XAVGC8.8 - XAVGC8.13 > XAVGC8.9 - XAVGC8.14)) / 9 + ABS((XAVGC8 - XAVGC8.6 > XAVGC8.1 - XAVGC8.7) + (XAVGC8.1 - XAVGC8.7 > XAVGC8.2 - XAVGC8.8) + (XAVGC8.2 - XAVGC8.8 > XAVGC8.3 - XAVGC8.9) + (XAVGC8.3 - XAVGC8.9 > XAVGC8.4 - XAVGC8.10) + (XAVGC8.4 - XAVGC8.10 > XAVGC8.5 - XAVGC8.11) + (XAVGC8.5 - XAVGC8.11 > XAVGC8.6 - XAVGC8.12) + (XAVGC8.6 - XAVGC8.12 > XAVGC8.7 - XAVGC8.13) + (XAVGC8.7 - XAVGC8.13 > XAVGC8.8 - XAVGC8.14)) / 8 + ABS((XAVGC8 - XAVGC8.7 > XAVGC8.1 - XAVGC8.8) + (XAVGC8.1 - XAVGC8.8 > XAVGC8.2 - XAVGC8.9) + (XAVGC8.2 - XAVGC8.9 > XAVGC8.3 - XAVGC8.10) + (XAVGC8.3 - XAVGC8.10 > XAVGC8.4 - XAVGC8.11) + (XAVGC8.4 - XAVGC8.11 > XAVGC8.5 - XAVGC8.12) + (XAVGC8.5 - XAVGC8.12 > XAVGC8.6 - XAVGC8.13) + (XAVGC8.6 - XAVGC8.13 > XAVGC8.7 - XAVGC8.14)) / 7 + ABS((XAVGC8 - XAVGC8.8 > XAVGC8.1 - XAVGC8.9) + (XAVGC8.1 - XAVGC8.9 > XAVGC8.2 - XAVGC8.10) + (XAVGC8.2 - XAVGC8.10 > XAVGC8.3 - XAVGC8.11) + (XAVGC8.3 - XAVGC8.11 > XAVGC8.4 - XAVGC8.12) + (XAVGC8.4 - XAVGC8.12 > XAVGC8.5 - XAVGC8.13) + (XAVGC8.5 - XAVGC8.13 > XAVGC8.6 - XAVGC8.14)) / 6 + ABS((XAVGC8 - XAVGC8.9 > XAVGC8.1 - XAVGC8.10) + (XAVGC8.1 - XAVGC8.10 > XAVGC8.2 - XAVGC8.11) + (XAVGC8.2 - XAVGC8.11 > XAVGC8.3 - XAVGC8.12) + (XAVGC8.3 - XAVGC8.12 > XAVGC8.4 - XAVGC8.13) + (XAVGC8.4 - XAVGC8.13 > XAVGC8.5 - XAVGC8.14)) / 5 + ABS((XAVGC8 - XAVGC8.10 > XAVGC8.1 - XAVGC8.11) + (XAVGC8.1 - XAVGC8.11 > XAVGC8.2 - XAVGC8.12) + (XAVGC8.2 - XAVGC8.12 > XAVGC8.3 - XAVGC8.13) + (XAVGC8.3 - XAVGC8.13 > XAVGC8.4 - XAVGC8.14)) / 4 + ABS((XAVGC8 - XAVGC8.11 > XAVGC8.1 - XAVGC8.12) + (XAVGC8.1 - XAVGC8.12 > XAVGC8.2 - XAVGC8.13) + (XAVGC8.2 - XAVGC8.13 > XAVGC8.3 - XAVGC8.14)) / 3 + ABS((XAVGC8 - XAVGC8.12 > XAVGC8.1 - XAVGC8.13) + (XAVGC8.1 - XAVGC8.13 > XAVGC8.2 - XAVGC8.14)) / 2) / 12 * ABS(C > XAVGC8 AND C14 < XAVGC8.14 AND XAVGC8 > 1.03 * MIN(XAVGC8,15) AND XAVGC8.14 > 1.03 * MIN(XAVGC8,15))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
SDGoodGuy
Posted : Thursday, November 13, 2014 10:37:50 AM
Gold Customer Gold Customer

Joined: 10/7/2004
Posts: 16

Thank you for the advanced (indicator) formula .. how do I use productively to find stocks whose Tline is in a trend reversal?

Bruce_L
Posted : Thursday, November 13, 2014 10:50:50 AM


Worden Trainer

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

I'd start by just trying the shorter formula.

C > XAVGC8 AND C14 < XAVGC8.14 AND XAVGC8 > 1.03 * MIN(XAVGC8,15) AND XAVGC8.14 > 1.03 * MIN(XAVGC8,15)

The percentages along with start and end bars are fairly adjustable. The 1.03s in the formula represent 3%. The bars ago parameters are 14 (one less than the overall period of 15).

The longer formula incorporates this formula instide an ABS() function at the very end.

The longer formula is designed more to be used as a sort. It returns a value or a percent match to the desired shape (which should in generally be parabolic as it chocks for the slope of each segment over the fifteen bars to be higher than the previous segment.

That said, if the higher values do in fact look more like what you want than the lower values, you could set an arbitrary cutoff. For example if you like stuff above 70 but not the stuff below 70, you could add a > 70 to the end to turn it into a Condition Formula which returns true or false.

The longer formula is not easily adjustable. You could adjust the percentages by adjusting the part in the ABS() at the very end, but not the start and end dates. You would need to make significant modifications to the early part of the formula to change the start and end dates.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
SDGoodGuy
Posted : Thursday, November 13, 2014 11:02:46 AM
Gold Customer Gold Customer

Joined: 10/7/2004
Posts: 16

What I am looking for is simply a "U shaped" reversal on the 8 EMA .. trying to find bottoms and reversals ... on stocks that have been trending down and have reversed over the past 3 weeks or so ...my scan doesn't work ... simple chart (QUIK) ...  from early October to late October ... "U" shaped Tline trend reversal  (Tline = 8 EMA)

Bruce_L
Posted : Thursday, November 13, 2014 11:12:29 AM


Worden Trainer

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

Have you tried the formulas? If so and you don't like the results, what specifically about the results don't you like?



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
diceman
Posted : Thursday, November 13, 2014 11:46:45 AM
Registered User
Joined: 1/28/2005
Posts: 6,049

SDGoodGuy

What about something like this:

 

XAVGC8>XAVGC13ANDXAVGC8.2>XAVGC13.2ANDXAVGC8.3<XAVGC13.3ANDXAVGC8.6<XAVGC13.6
 

 

 

Thanks

 

daytradingpwr
Posted : Friday, July 3, 2015 1:30:34 AM
Registered User
Joined: 6/15/2015
Posts: 21

Hey Bruce,

Happy ID weekend.

Wondering if you can help me with an 8 ema price cross pcf.

So what I want is a formula that will detect a stock's price crossing over the 8 ema, adjustable to 3 and 5 min charts. Also, make it such that the entire body of the candle must be above the ema (tails/shadows not counting).

So, as a streaming scan, stocks will pop up when the price + body of new candle closes above the 8 ema. As soon as that candle ends, It will populate on my streaming list.

Appreciate it.

Bruce_L
Posted : Friday, July 3, 2015 8:14:57 AM


Worden Trainer

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

Please try the following Condition Formula (you can set the time frame of the Condition Formula as desired).

O1 > XAVGC8.1 AND C1 > XAVGC8.1 AND (O2 <= XAVGC8.2 OR C2 <= XAVGC8.2)

It checks for both the entire body to be above the moving average at the end of the previous bar and for at least part of the body to be below the moving average at the end of the bar before that.



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