From indicator to screener – screener misses stocks

Forums ProRealTime English forum ProScreener support From indicator to screener – screener misses stocks

Currently, there are 0 users and 1 guest visiting this topic.
View all attachments
Viewing 12 posts - 1 through 12 (of 12 total)
  • #174370 Report

    I had an idea for an indicator and somehow with the help of reading on this forum and using copy paste I was able to create an indicator that does what I want. I have no previous knowledge of coding.

    The indicator identifies a stock that has had a run up without any major pullbacks. When the stock pulls back to an average price the indicator plots a line of the highest high over the the last 33 days. When price takes out that high or when the indicator identifies the start of a new run up the line goes to zero.

    Anyway, I guess something is off with how I coded this indicator because I am not able to get pro screener to find all the stocks where this line is plotted. It finds a few of them – but it misses the majority. I would be very grateful if someone could take a look and see what could be wrong that causes the screener to miss so many stocks…

    Thank you, Gustav

    Attachments:
    #174379 Report

    Screeners have only 254 bars of data history, so you should check this isn’t the case; when it calculates the HIGHEST and LOWEST I suggest that you use:

    Furthermore, ONCE may lead to issues in ProScreener, it’s advisable not to use it. Instead of using

    use

    1 user thanked author for this post.
    #174381 Report

    Thank you Roberto for the quick response. I will try this!

    #174389 Report

    I tried to change it but I must be doing something wrong because the problem persists. The screener is still just finding less than half of the stocks it should. This is what the code looks like now: Im using prt 11.1

     

     

    #174594 Report

    I am still looking for help with this. Is there anyone that can see what I am doing wrong?

    #174606 Report

    You wrote “The screener is still just finding less than half of the stocks it should“, how many results were returned?

     

    1 user thanked author for this post.
    #174618 Report

    If we take DAX30 for example then the screener finds 7 stocks. If I instead search the DAX30 manually with the indicator I find 20 stocks.

    Thank you Roberto for taking the time to look at this once more.

     

    #174623 Report

    I can’t detect any issue. I am returned several signals, but I can’t know how many they should have been.
    I suggest that you hit Ctrl+M to ask PRT for assistance.

    You may shorten you code by replacing lines 3 to 43 with:

    but this won’t affect results.

    1 user thanked author for this post.
    #174624 Report

    I might have found a glitch.
    As you can see from the attached pic, the first IF is

    not

    Attachments:
    1 user thanked author for this post.
    #174639 Report

    Thank you again Roberto for your improvements to the code. The problem with missing stocks when screening is unfortunately still present. I have contacted PRT-support to see if they can help.

    This is what the screener code looks like now.

    #174640 Report
    #174645 Report

    Ok, I see.

    We would appreciate it if you would like to share any answers you can get.

    Thank you 🙂

     

Viewing 12 posts - 1 through 12 (of 12 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login