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 line Divergence on weekly charts

Does anyone know how to scan for MACD Line divergence (Price makes a new high but Macd Line does not) on weekly charts.
thank you

Comments

  • dhall6938dhall6938
    edited March 2022
    Im no expert but and I'm not sure if I am allowed to do this but...[Weekly MACD Line(12,26,9) < 1 Week ago MACD Line(12,26,9)] and [Close > 1 week ago High]
  • Don't know if it matters to you but some of the weekly indicators will update during the day and sometimes they will not. Sometimes, they won't update until after the close. It took me years to figure out that quirk. I want immediate updates during the day so the way I dealt with it is that I figured a daily approximation of the weekly and that is what I use for my weekly MACD.
  • markdmarkd mod
    edited March 2022
    You could try choosing a look back period ("?" in the code below) and then test that today's close is the max for that period and MACD Line is less than the max for that period.

    and [weekly close = weekly max(?, weekly close)]
    and [weekly MACD LIne(12,26,9) < weekly max(?, weekly MACD Line(12,26,9)]

    I don't use MACD so I'm not sure what a good value for "?" would be. Also, I don't know how often this condition occurs or whether its meaningful. You would have to test that out.

    It might also be interesting to test for the opposite condition, if it occurs - MACD line is at max and close is less than its max.
  • I tried with 12 and get red x error on third and last line

    [type is stock]
    and [weekly close = weekly max(12, weekly close)]
    and [weekly MACD Line(12,26,9) < weekly max(12, weekly MACD Line(12,26,9)]
  • lmkwinlmkwin ✭✭
    edited March 2022
    put an extra ) after the max(12, weekly MACD Line(12,26,9)
    max(12, weekly MACD Line(12,26,9))


    for every ( there must be a corresponding ) and for every [ there must be a corresponding ].

    in the Max requirement there are 2 ( and 1 ).
  • lmkwin is right. Sorry - my fault. Just wrote it freehand - I didn't test it on the workbench.
  • I don't use the advanced editor but the red x error usually will tell you what is wrong. You may have to click on the X. This one probably said something about an "unable to parse weekly MACD Line(12,26,9)" or "an integer expected". When you see those, it's usually a ( ) not matching issue.

  • @markd & @Imkwin,Thank you, Both of you are always
    extremely helpful
Sign In or Register to comment.