50EMA Impulse and Follow Through Scan Method


Category:
0
0

Hi Pete

Hope all is well.

I was wondering if you could help with a scan that does the following:

1- A pivot point correction of the price bouncing at 50EMA trend line when Low crosses below the trend line

2- A “follow through” day (when open and close of the price is higher then the open and close of the pervious day) happens on the fourth to seventh day of the rally (i.e. from the pivot point), and accompanied by a daily volume increase by at least 20% above the stock’s average daily volume (scan to signal here)

A strategy can also be attached when a “buy”  signal is generated, and “sell” when the price has increased by 20% from the buy signal. For “stop loss” strategy when the stock price has dropped 8% below the “buy” point (close of that day).

This is a strategy that I have learnt from William J. O’nell book called “How to make money in stocks”. A great book which I recommend to all.

I have attached a page of the book that graphically explains the above.

Hope this is clear enough, but please let me know if I need to  elaborate further.

Many thanks for you help.

Regards

Ali

Marked as spam
Posted by (Questions: 6, Answers: 10)
Asked on July 19, 2018 2:27 am
390 views
0

Just a few things to clarify.

Is that a typo in the question title? Should that be “Impulse” instead of “Impuls”?

The 50 ema will require 200 bars to be properly computed. There are limits in the scan engine of Thinkorswim for historical data. This means that a 50 period ema can only be used on the daily time frame. The chart examples you gave are showing daily time frames. But I wanted to make sure to explain this up front.

You will need to clearly define how we measure a “…pivot point correction of the price…”

We can provide the scan, once you explain how we measure that pivot point correction. But a strategy that includes a stop loss and/or a profit target for exits is more complex than what we would provide for free in the Q&A forum.

( at July 19, 2018 8:47 am)
0

Hi Pete
Thanks for getting back.
1- There is a typo in the title. Sorry about that. It should be read Impulse
2- Daily volume is what I also have in mind.
2- Regarding the pivot correction, I was watching your video about Strat_PivotRev_TrailSqz and where you have created a pivotLowReversal, it should also work for this case I imagine. The only add will be for the low to be the lowest of all in a 90 days period when crossing the 50EMA (the pdf file I sent earlier showing it well)
3- please send me a private message and let me know how much would it cost to create the strategy

Hope this helps.

Regards

( at July 20, 2018 7:03 am)
0

Ok I will make the spelling correction but this will break the current link to this post. So be prepared for that. The url will be corrected as well as the title.

I will grab the code from that video and use that for the pivot low. Then add the other components.

If you would like to initiate a custom project for the strategy you can do so by filling out the contact form on our “about’ page. Just be sure to read through the details on that page so you understand our rates and other details: https://www.hahn-tech.com/about/

( at July 20, 2018 8:16 am)
0
Private answer

Having collected all the details required to complete this request. I have found the signal is extraordinarily rare. So rare, as to be virtually non-existent. I decided to try running the scan to look for valid signals having occurred in the previous 50 days. Nothing.

So I added an input named “lookBackPeriod” and used that in place of “lowest low in 90 days”. Then I used that input to test various values. When set to 20, I got plenty of results. When set to 45, I got 2 results. So you will want to experiment with this input to find one that works for TODAY’s market. That book you are reading is very old.

Final notes about using this scan. Daily time frame ONLY!!! Historical data limits in Thinkorswim’s scan engine makes this scan unusable for any other time frame! The line of code containing the scan signal is designed to look for signals having occurred in the previous 10 days: plot scan = Highest(followThroughUp, 10) > 0;

Just change the value from 10 to whatever number of days you want to look back for valid signals.

input length = 50;
input averageType = AverageType.EXPONENTIAL;
input lookBackPeriod = 45;
def ema = MovingAverage(averageType, close, length);
def pivotLow = close > ema and ((low[1] < ema[1] and low[2] > ema[2]) or (low[2] < ema[2] and low[3] > ema[3])) and low > low[1] and low[1] < low[2] and low[2] < low[3];
def pivotHigh = close < ema and ((high[1] > ema[1] and high[2] < ema[2]) or (high[2] > ema[2] and high[3] < ema[3])) and high < high[1] and high[1] > high[2] and high[2] > high[3];
def pivotLowReversal = (pivotLow and close > high[1] and low[1] < Lowest(low[2], lookBackPeriod)) or (pivotLow[1] and close > high[2] and low > low[2] and high[1] < high[2] and low[2] < Lowest(low[3], lookBackPeriod));
def pivotHighReversal = (pivotHigh and close < low[1] and high[1] > Highest(high[2], lookBackPeriod)) or (pivotHigh[2] and close < low[2] and high < high[2] and low[1] > low[2] and high[2] > Highest(high[3], lookBackPeriod));
def volumeIncrease = volume * 1.02 > Average(volume, 14);
def followThroughUp = volumeIncrease and Highest(pivotLowReversal, 7) > 0 and open > open[1] and close > open;
def followThroughDown = volumeIncrease and Highest(pivotHighReversal, 7) > 0 and open < open[1] and close < open;
# adjust value below from 10 to the number of days back you want to search
plot scan = Highest(followThroughUp, 10) > 0;
#plot scan = Highest(followThroughDown, 10) > 0;

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on July 20, 2018 9:53 am
0

Hi Pete
Many thanks for your help.
My observations so far:
1- The longest days period I can go back is 30 days, which if we take legends saying “80% of time stocks pull back between it’s second and sixth week out of the base” it might start to make sense!
2- With the set up that you have attached above, except run for 3 days period rather than 10, I get two stocks (DECK and ETE) from which ETE doesn’t follow the “20% volume increase rule” at the signal. The highest volume appears the day after.

Regards

( at July 20, 2018 7:00 pm)
0

If you are scanning for signals having occurred in the previous 3 days, ETE is most likely correct. There is no way for the scan to produce a signal unless the volume is 20% above it’s 14 day average.

You can use this code as a chart study to view the signals produced by the scan. Some formatting may be required because these comments sections don’t handle code statements very well.

declare lower;
input length = 50;
input averageType = AverageType.EXPONENTIAL;
input lookBackPeriod = 30;
def ema = MovingAverage(averageType, close, length);
def pivotLow = close > ema and ((low[1] < ema[1] and low[2] > ema[2]) or (low[2] < ema[2] and low[3] > ema[3])) and low > low[1] and low[1] < low[2] and low[2] < low[3]; def pivotHigh = close < ema and ((high[1] > ema[1] and high[2] < ema[2]) or (high[2] > ema[2] and high[3] < ema[3])) and high < high[1] and high[1] > high[2] and high[2] > high[3];
def pivotLowReversal = (pivotLow and close > high[1] and low[1] < Lowest(low[2], lookBackPeriod)) or (pivotLow[1] and close > high[2] and low > low[2] and high[1] < high[2] and low[2] < Lowest(low[3], lookBackPeriod)); def pivotHighReversal = (pivotHigh and close < low[1] and high[1] > Highest(high[2], lookBackPeriod)) or (pivotHigh[2] and close < low[2] and high < high[2] and low[1] > low[2] and high[2] > Highest(high[3], lookBackPeriod));
def volumeIncrease = volume * 1.02 > Average(volume, 14);
plot followThroughUp = volumeIncrease and Highest(pivotLowReversal, 7) > 0 and open > open[1] and close > open;
plot followThroughDown = volumeIncrease and Highest(pivotHighReversal, 7) > 0 and open < open[1] and close < open;

( at July 21, 2018 7:10 am)
0

Thanks Pete.

( at July 22, 2018 3:52 am)