wiglu 4 posts msg #127428 - Ignore wiglu modified |
2/25/2016 5:55:36 PM
I am trying to identify stocks that are bouncing from the bottom of a moving average envelope to the top of the moving average envelope and back again multiple times.
Why? Because I want to go long, then short, then long, then short the stock, etc. So I'm trying to find stocks that are swinging from the bottom to the top multiple times.
What I have developed so far is:
price between 2 and 15
average daily volume greater than 200000
set{x, count(high above upper sma Envelope(10,5),200)}
set{y, count(low below lower sma Envelope(10,5),200)}
set{z, x+y}
add column z
draw ma(10)
draw sma envelope(10,5)
Problem
The problem with the above code is that it does not look for price swings between the bottom and top of the simple moving average . It just counts the number of times that a stock is higher than the upper sma Envelope or when it is lower than the lower sma Envelope. What can I use to help me identify swings between the two the two extremes. Then I should have more opportunities to go long and short the stock.
Here are some of my thoughts:
Perhaps keeping ADX(14) below 30 in order to stop the stock from starting a trend.
Or using another average (or indicator) of some sort and counting how many times it crosses the sma Envelope top and bottom boundaries?
Can you think of any ways I could do this? (I need to identify the stocks with the most opportunities to go long/short.)
Thanks very much
Peter
PS. I absolutely need to keep using the sma envelopes as I am using an entry method to go long/short that identifies when Price crosses the sma envelope boundaries and then forms upward and downward daily reversals.
|
four 5,087 posts msg #127430 - Ignore four modified |
2/26/2016 1:10:51 AM
does this help?
|
wiglu 4 posts msg #127431 - Ignore wiglu modified |
2/26/2016 11:36:20 AM
Thanks Four,
It certainly helps to identify swings at a quick glance. And that is good. I'm sure I'll use this idea in future!
However, it doesn't do 2 things that I am looking for:
1. Screening out the stocks that only have a low number of swings.
2. Picking the stocks that would provide the largest % gains across the sma envelope. I.e. You can have a stock swinging between 10 to 12 and back again. Or you can have a stock swinging between 10 to 18 and back again. If each has the same number of swings, theoretically, the one swinging between 10 to 18 is the one I want to identify. (That's why I was thinking some other indicator might be able to used for this, perhaps if it was lagged?)
|
andrewsproule 2 posts msg #127629 - Ignore andrewsproule |
3/17/2016 1:47:43 AM
Hello.
Instead of ;
set{x, count(high above upper sma Envelope(10,5),200)}
set{y, count(low below lower sma Envelope(10,5),200)}
Try;
set{x, count(CROSS above upper sma Envelope(10,5),200)}
set{y, count(CROSS below lower sma Envelope(10,5),200)}
add column X
Add colum Y
This will measure the crosses of the MA evelopes boundries as opossed to time spent outside of them. In fact i would keep measure of time outside of the boundries. A smaller time outside the boundaries with a high number of crosses will be what you are looking to trade.
|