New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

MACD and Writing scans

can someone tell me: trying to find stocks where the MACD was roughly in the top quartile (top 1/4th ) 2 or 3 months ago (let's say 50 trading days ago, to make it simple) Then, NOW the MACD is between -0.50 and 0.00.

I have a feeling we are going to want to use ppo rather than MACD. That's fine. Also if not possible to use 'top one-fourth' then maybe just use the number 1. For some reason, it is not working for me. Probably Really easy for some of you Smarter than me in here...

Comments

  • lmkwinlmkwin ✭✭
    I'd recommend PPO but MACD is the same thing, except it's dollar or point values. So a stock like BRK/A has a default MACD



    BRK/B



    has lower values. But if you are looking at a Percentage or where the line/signal/histogram is you will be using a Min/Max function and looking for the relationship to the min/max

    This link will give you the nuts and bolts

    https://support.stockcharts.com/doku.php?id=scans:advanced_scan_syntax:min_max_scans

    When you select Max from the Technical Attributes dropdown By default, the scan clause looks like this:

    and [Max(253,close) > 99.9]

    This is asking for the Max Close value in the last 253 days to be greater than 99.9

    So you would change the 253 to your liking. And the Close to your liking MACD line or signal or hist (12,26,9) or whatever values you would like. This will produce the Max MACD value

    Then to find the ones where the current MACD value is in the top 20% you would use a multiplier of that value

    Max Macd * 0.8

    and then add the current macd to the equation. macd > max macd * 0.8

  • I'm not sure what set up you are looking for with this scan, price wise. It looks like you are looking for something in the middle of a leg, where the prior leg has finished changing direction (e.g.from down to up) but there is room left in the new leg (e.g. more upside) with less chance of drawdown than if you were trying to pick the absolute bottom (or top). With MACD/PPO, this would be where the MAs (EMAs, actually) are coming back together because prices are overlapping.

    The scan you are thinking of is actually pretty complicated - or it could be, depending on what you mean by quartile - do you mean just that area above 0, or do you mean between the lowest low below 0 and the highest high above 0? If you mean the second alternative, you get into negative number math, which can be confusing.

    I think you could approach the question differently with Fast Stochastics. Stochastics measures where the current price is in relation to the high and low over the period you specify. If it reads above 80, for instance, price is near the top of its range for the last 26 days (for instance). If it's below 20, its near the bottom.

    If it's crossing 50, then its near the middle of the range - and that more or less usually corresponds with lower MACD/PPO levels. Check it out:

    https://schrts.co/DbipkvBR

    So the scan would be:

    and [Fast Stoch %K(26,1) x 50] // crossing up

    and [50 x Fast Stoch %K(26,1) ] // crossing down

Sign In or Register to comment.