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.

Weekly MACD scan syntax?

What should the syntax be for creating a weekly scan of MACD?

Best Answer

  • gordgord admin
    Answer ✓
    You just have to specify that each parameter is based on weekly data.

    Here's the Bullish MACD Crossover scan inserted into the scan engine from the predefined scans dropdown menu.

    [type = stock] AND [Daily SMA(20,Daily Volume) > 40000]
    and [today's macd line(12,26,9) < 0] and [macd line(12,26,9) >= macd signal(12,26,9)] and [yesterday's macd line(12,26,9) < yesterday's macd signal(12,26,9)] and [2 days ago macd line(12,26,9) < 2 days ago macd signal(12,26,9)] and [3 days ago macd line(12,26,9) < 3 days ago macd signal(12,26,9)] and [3 days ago macd hist(12,26,9) < 3 days ago macd signal(12,26,9) * 0.25]

    I like to split the scan into separate criteria lines just so its easier to follow.

    [type = stock] AND [Daily SMA(20,Daily Volume) > 40000]
    and [today's macd line(12,26,9) < 0]
    and [macd line(12,26,9) >= macd signal(12,26,9)]
    and [yesterday's macd line(12,26,9) < yesterday's macd signal(12,26,9)]
    and [2 days ago macd line(12,26,9) < 2 days ago macd signal(12,26,9)]
    and [3 days ago macd line(12,26,9) < 3 days ago macd signal(12,26,9)]
    and [3 days ago macd hist(12,26,9) < 3 days ago macd signal(12,26,9) * 0.25]

    Now just change all the references from Daily to Weekly, note the default is "daily" so in some cases it won't be shown and you will have to add the weekly identifier, as in line 3 above.

    [type = stock] AND [Weekly SMA(20, Weekly Volume) > 200000]
    and [today's Weekly macd line(12,26,9) < 0]
    and [Weekly macd line(12,26,9) >= Weekly macd signal(12,26,9)]
    and [1 week ago Weekly macd line(12,26,9) < 1 week ago Weekly macd signal(12,26,9)]
    and [2 week ago Weekly macd line(12,26,9) < 2 week ago Weekly macd signal(12,26,9)]
    and [3 week ago Weekly macd line(12,26,9) < 3 week ago Weekly macd signal(12,26,9)]
    and [3 week ago Weekly macd hist(12,26,9) < 3 week ago Weekly macd signal(12,26,9) * 0.25]

    Note: Weekly scans are best run after the close of the week and before trading starts the next week. If you run a weekly scan during the week it will be an intra-week scan and although price maybe in line, the volume will be off. IE running the scan on Monday will only show 1/5th of the total weekly volume, so beware when using any indicators that use volume.

Answers

Sign In or Register to comment.