Screener Struggles!!

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #131883 quote
    telboy
    Participant
    Junior

    Hi All

    Im still very new to all of this and very much finding my feet (still enjoying the learning process though) – I just cant get this basic stock screener to work

    I only want to return stocks where the MACD Line has crossed the MACD Signal line at some point over the past 5 days only AND all of my other conditions are also currently met TODAY.

    At the moment it seems to be returning stocks where the MACD Line is above the MACD Signal line irrespective of when the crossover actually occurred.

    //  screener code
    TIMEFRAME(daily)
    vol=Volume
    Mline=MACDline[12,26,9](close)
    Msignal=MACD[12,26,9](close)
    EMA10=ExponentialAverage[10](close)
    EMA20=ExponentialAverage[20](close)
    
    Test1 = summation[5](Mline CROSSES OVER Msignal)
    Test2 = (EMA10 > EMA20) AND (EMA10 > EMA10[1]) AND (EMA10 > EMA10[2]) AND (EMA20 > EMA20[1]) AND (EMA20 > EMA20[2])
    screener[test1 AND test2] SORT BY (vol)

    Really sorry if I have presented this in the wrong way or not been clear about my issues but I really appreciate any comments/thoughts/suggestions??

     

    Many thanks

    #131889 quote
    Vonasi
    Moderator
    Master

    Apology accepted but the few simple rules are not difficult to follow. Just read them and find the correct tools before posting so that we don’t have to waste time tidying up posts is all we ask.

    The forum rules are as follows. I have highlighted in bold the rule/rules that you have not followed:

    Post your topic in the correct forum.

    ProRealTime Platform Support          only platform related issues.
    ProOrder                                                only strategy topics.
    ProBuilder                                              only indicator topics.
    ProScreener                                           only screener topics
    General Discussion                               any other topics.
    Welcome New Members                      for new forum members to introduce themselves.

    Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.
    Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.
    Do not double post. Ask your question only once and only in one forum. All double posts will be deleted anyway so posting the same question multiple times will just be wasting your own time and will not get you an answer any quicker. Double posting just creates confusion in the forums.
    Be careful when quoting others in your posts. Only use the quote option when you need to highlight a particular bit of text that you are referring to or to highlight that you are replying to a particular member if there are several involved in a conversation. Do not include large amounts of code in your quotes. Just highlight the text you want to quote and then click on ‘Quote’.
    Give your topic a meaningful title. Describe your question or your subject in your title. Do not use meaningless titles such as ‘Coding Help Needed’.
    Do not include personal information such as email addresses or telephone numbers in your posts. If you would like to contact another forum member directly outside of the forums then contact the forums administrator via ‘Contact Us’ and they will pass your details on to the member that you wish to contact.
    Always be polite and courteous to others.
    Have fun.

    I have edited your post where required. Please ensure that your future posts meet these few simple forum rules. 🙂

    #131890 quote
    Vonasi
    Moderator
    Master

    I can’t see anything wrong. I would turn the screener into an indicator and then use GRAPH to show you what all the values are and then you might find the mistake. Have you found a stock where it should be true to test it on?

    I would have written line 9 as:

    Test1 = summation[5](Mline CROSSES OVER Msignal) >= 1

    …but my platform is not open at the moment to check if both lines return the same result.

    #131893 quote
    robertogozzi
    Moderator
    Master

    I think line 5 should read (v11.x)

    Msignal=MACDsignal[12,26,9](close)

    (v10.3):

    Msignal=ExponentialAverage[9](Mline)
    #131897 quote
    Vonasi
    Moderator
    Master

    Well spotted Roberto. Sometimes we need a v10.3 head and a v11 head!

    #132207 quote
    telboy
    Participant
    Junior

    Thank you both for your posts and help.

     

    Apologies about my original post – I could not find the insert PRT code button

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

Screener Struggles!!


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
telboy @telboy Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by telboy
5 years, 10 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 05/16/2020
Status: Active
Attachments: No files
Logo Logo
Loading...