Possible to do calculations on Screener Results

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

    Hi All,

    Is it possible to do various calculations on results returned by screener?

    So for example, if I have a custom list to scan which contains the 30 Dax Index stocks, and I want to check simply the number of stocks that are up today and the number that are down today. I use something like:

    yesterdayClose = Dclose(1)
    priceCurrent = close
    SCREENER(priceCurrent > yesterdayClose)

    If I run the screener say at 9am and there are 10 stocks higher than yesterday and 20 stocks lower than yesterday, this screen should return a list of the 10 stocks that are higher today. Now is there a way to get this value in the code, so can I somehow get the value that 10 are up and 20 down somehow in the screener code? Is this possible?

    Any help is greatly appreciated.

    Thanks

    #90385 quote
    NicolasNicolas
    Keymaster
    Legend

    No because the screener returns individual test and can’t be compared to any other result produced before or after.

    I think you might have made a mistake in your code? condition of a screener must be in brackets, the sorting criteria is in parenthesis, so actually the screener should return all stocks but sorting them with a “1” for up stocks and a “0” for down ones.

    yesterdayClose = Dclose(1)
    priceCurrent = close
    SCREENER[priceCurrent > yesterdayClose]
    #90399 quote
    bhav63bhav63
    Participant
    New

    Hi Nicolas,

    Thank you for getting back to me. Much appreciated.

    I had a feeling that what I was trying to do could not be done via the screener. You are absolutely correct about the parentheses in the code, it was my mistake. I am very new to prorealcode.

    Is there any way to achieve what I’m trying to do? Perhaps code it as an indicator – is it possible to create the indicator and reference each of the 30 stocks in the code, get the closing values and perform the calculation that way?

    Many thanks.

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Possible to do calculations on Screener Results


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
bhav63 @bhav63 Participant
Summary

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

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 02/01/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...