StockFetcher Forums · General Discussion · Combining Trend Following and Mean Reversion in a Scan- Need Help Coding<< >>Post Follow-up
smartguy
47 posts
msg #148559
Ignore smartguy
7/17/2019 3:14:34 PM

I'm sure this is a relatively simple scan to put together but I am a coding illiterate so I'm asking for help. Here is what I want to accomplish, the first part even I can do but perhaps someone can put together a clean version.
1. Close is greater then 5 and less then 75 and
2. 10 day Ave daily volume greater then 500,000 and
3. 20MA above the 50MA and 50MA above 200MA and
(that's the easy part)
4. close is less then most recent pivot point high for 3 (maybe 4 or more would work better) OR MORE days. This means it could be down 3 days, 4 days, 5 days etc. as long as its below recent pivot high and the moving averages are still stacked and sloped in an uptrend. This is the part I don't know how to code i.e. 3 or more days below the recent pivot point high while still having the 20ma above the 50MA and 20MA and 50MA above the 200MA.

1,2,3 comprise the trend following portion. 4 is the mean reversion portion. Basically its just scanning for 3 or more days of pullback in an uptrend.
I also want to add a column to the scan showing distance of current price from recent pivot point high so that I can sort for largest difference in current price from the recent pivot high while still meeting the Trend Following portion of the scan. The assumption is the deeper the pullback while still in uptrend offers the best candidates to buy.
My plan is to use this scan to identify stocks that meet this requirement each night after close, then use a breakout indicator on a 30 Minute (or different time increment) chart to trigger the buy the next day, and focus on the stocks with the biggest difference of current price from pivot high. That is the reason for adding that column to the scan. Can anyone help me with this? Any and all suggestions are welcome and appreciated.

StockFetcher Forums · General Discussion · Combining Trend Following and Mean Reversion in a Scan- Need Help Coding<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.