Weekly time MACD

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #198076 quote
    samd
    Participant
    New

    I was wondering how to screen for MACDLine crossing MACDSignal on the weekly timeframe that occurred on the week January 10th 2022.

    #198082 quote
    robertogozzi
    Moderator
    Master

    There you go:

    Timeframe(Weekly)
    Cond  = 0
    ML    = MACDline[12,26,9](close)
    MS    = MACDSignal[12,26,9](close)
    FOR i = 253 DOWNTO 0
       IF Date[i] = 20220116 THEN
          Cond = ML[i] CROSSES OVER MS[i]
          break
       ENDIF
    NEXT
    SCREENER[Cond]

    Beware that you MUST write the date the weekly bar closes, it is usually 6 days AFTER it opens (which is shown on your chart), but for some instruments/assets it’s 7 days AFTER the opening.
    You may add this simple indicator to your weekly chart to find out:

    RETURN Date AS "Closing Date"

    Be warned that screeners with IG have a 254-bar history (1024 with PRT’s Premium version) and that MACD uses EMAs to make calculations, which require more that twice the PERIODS used in Macd itself. So you won’t be able to use periods larger than 70-80 for any of your MACD periods(MACD[70,110,10] will fail).

    samd thanked this post
    #198095 quote
    samd
    Participant
    New

    Thanks, that worked

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Weekly time MACD


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
samd @samd Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by samd
3 years, 7 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 07/29/2022
Status: Active
Attachments: No files
Logo Logo
Loading...