Screener for market phases
03/10/2017 at 11:38 AM #28074
For years I divide the market in 4 phases. Phase 1: A sideways (ranging) market around the lowest price. Phase 2: A bullish trending market. Phase 3: A sideways (ranging) market around the highest price. And phase 4:A bearish trending market. Any market is always in one of the phases.
The idea for a ProScreener is to use a (favorite) Moving Average to divide a market in the Phases. (1: The MA is flat around the bottom of the chart. 2: The price broke out the range to the upside and the MA is pointing to the north. 3:The MA is flat around the top of the chart. 4:The price broke out the range to the downside and the MA is pointing to the southth).
Can anyone taking up the challenge to translate this idea, or inventing a better one, to a ProScreener code?
1 user thanked author for this post.04/07/2017 at 2:32 PM #31386
Hi Marcel, interesting idea and concept. I can help for sure. Please just let me know how do you want to proceed.
How do you identify yourself these different kind of market phases? You can add screenshots to illustrate your idea, many thanks.04/07/2017 at 3:47 PM #31392
Sounds good and aligns with Stage Analysis in Stan Weinstein’s book … link below to ‘Stage Summary’ in pdf and the book on Amazon (I’ve read then skimmed again a few times!).
Ill be interested in this if we can get this going, the pdf may help with the rationale?
GraHal04/09/2017 at 3:58 PM #31515
Well, we need definitions.
I suggest using using the highest and lowest close or ma value as a base for determining the top and bottom of the chart. Upper third is top, lower third is bottom.
To determine if the MA is rising we could use MA>MA  and MA>MA . A few more steps could help to determine if the MA is actually moving up.
For a range we could simply check if the MA is inside it’s 20 day high low range.
@marcel, Grahal: Any other suggestions?04/09/2017 at 7:10 PM #31532
@derek, nice study of the market phases.
Another way would include correlation coefficient between a straight linear regression and the moving average. If the correlation is superior to 80% for X periods and its slope is “flat”, then we are in ranging phase, etc. for the other phases. It would need more study though, just a rough Sunday evening idea 🙂04/10/2017 at 7:37 AM #31552
I would suggest the smoothest MA as possible. After all, is it about the big picture. I included a screenshot (DAX daily) of the way I identify the phases by hand. When doubt I use a higher timeframe to confirm the phase. The problem seems to be the randomness of the phase size. My knowledge about programming a screener is to limited, but 1+1+1 together makes 3, so please let’s continuing this study!04/10/2017 at 8:33 PM #3167204/11/2017 at 7:53 AM #3168604/18/2017 at 9:56 AM #32399
Well, it’s always easier to stop these phases on chart history 🙂 For me, the phases you defined on your example are not quiet easy to spot and I must admit I don’t understand them well! 🙂 Maybe we could restart from the beginning with your first post definitions of the 4 phases:
- Phase 1: A sideways (ranging) market around the lowest price.
- Phase 2: A bullish trending market.
- Phase 3: A sideways (ranging) market around the highest price.
- Phase 4:A bearish trending market. Any market is always in one of the phases.
I think the phases 2 and 4 are the easier to identify. The ranging ones are a bit challenging because we need to define the “lowest” and “highest” prices, I think a lookback period of X weeks should do the trick? Maybe we need other examples Marcel! Thank you.04/18/2017 at 3:29 PM #32489
You pinpointed it exactly.
Phases 2 and 4 are not the problem.
Is it a strange Idea to use a moving average enveloppe over the high/low with a certain %deviation over a certain amount of periods to create a kind of a flat range for phases 1 and 3?04/19/2017 at 9:36 AM #3255204/19/2017 at 1:57 PM #32606
Yes, thanks a lot. This is a pretty good visualisation of my idea. If we can put this and the phases Nicolas described into one strategy, I think we have a solid base to tweak it from further. I only have experience with the 4 phases on the daily and weekly timeframe. I think a larger timeframe, a higher MA and a tweaked % will smooth out ‘the bands’ even more.04/19/2017 at 2:16 PM #32608
I use Stages all the time in my manual trading and often look for a breakout / breakdown after a period of flatness; this can often be dramatic … longer the base, higher into space (is the breakout). mmm I think that’s the expression! 🙂
It works at all time frames, I manual trade using the 1 minute and even 6 seconds and it happens / works on short timeframes also.
I’m keen to get a strategy coded up that is based on Stage Analysis … it’s easy to look at a Chart and see it all but not easy to code it.
You any good at coding? 🙂
It’s a pity we can’t form into Teams of some sort as there are thousands of users of this site but not much collaboration between members? If anything happened to Nicolas and / or the few who do help with coding problems then we’d be sinking fast??
GraHal04/20/2017 at 12:02 AM #32676
USD/JPY is still ranging but creeping up (attached), I reckon it might breakout tonight / tomorrow.
All we need to do is code up what we see … as a trial!? 🙂
MA % Deviation could be circa 0.3% for attached?
GraHal04/20/2017 at 7:32 AM #32680
I agree with your breakout to come. The problem is that I am new to coding after about 15 years experience in trading manualy and my English language is too poor to translate the coding manual. The way I see is the only way to get this strategy working is to form a team. We do allright till now right?
Greetings from Holland,