Excluded Middle

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #48663 quote
    ameame
    Participant
    New

    Hi

    I’m executing this screener against European Indices (daily), but the problem appears with other lists too.

    left=highest[20](high[240])   // highest high over one month a year ago
    middle=highest[220](high[20]) // highest high during period 1 month to 11 months ago
    z=(middle <= left)
    //z=(middle >= left)
    SCREENER[z](z as "yes")

    So, I get no results, but even if I comment line 3 and uncomment line 4, I still get no results.  This doesn’t make sense to me – has anyone got any ideas what I’m missing?

    Thanks

    #48666 quote
    DespairDespair
    Blocked
    Master

    I don’t know what you want to do but I know that your code does not do what you write in the comments. I think you have to switch the numbers in the [] brackets for your middle variable.

    What are the conditions you want to screen for?

    #48683 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Line 1 scans for the highest price 240 to 260 bars before.

    Line 2 scans for the highest price 20 to 240 bars before and it should be <= that in line 1.

    Is that correct?

    Despair is right, what do you want to do? Maybe a plain text explanation is clearer than code!

    #48711 quote
    NicolasNicolas
    Keymaster
    Legend

    Proscreener has a limit of 254 bars of data, try to limit your periods lookback at lines 1 and 2 and it should be ok.

    ame thanked this post
    #48748 quote
    ameame
    Participant
    New

    Thanks everyone for all your responses – robertogozzi described exactly what I was trying to do and I think Nicolas has identified the issue – I will try the same on weekly bars to see if the proscreener limitation disappears for the same period.

    #48766 quote
    NicolasNicolas
    Keymaster
    Legend

    The 254 bars limit exist on all timeframes.

    #48771 quote
    ameame
    Participant
    New

    Yes, I understand, but I’ll be looking over the same date period, so much fewer bars. I’ll post whatever I find. Thank you.

    #48796 quote
    ameame
    Participant
    New

    Thanks very much, that worked exactly as I was hoping. Are prorealtime/proscreener limitations like this documented anywhere?

    #48851 quote
    ameame
    Participant
    New

    Hi again, unfortunately some confusion remains! So, I thought I’d risk another post.

    I think there must be something more to it than just the 254 bar limit – see the code below, a much simpler calculation, which uses only 60 bars of daily data.  The idea is to find stocks that have hit new highs today but not yesterday.

    //new high that wasn't a new high yesterday
    ha=highest[60](high[1])
    hb=highest[60](high[2])
    z = (high>ha) and (high[1]<hb)
    SCREENER[z](z as "yes")

    When I run this against “Shares – US Wall St.”, I get many matches, but some of them I believe are in error e.g. “Hawaiian Electric Industries Inc.” – today’s and yesterday’s highs are much lower than the high over the last 60 days so the high>ha isn’t true.

    #49193 quote
    ameame
    Participant
    New

    It looks like the problem has been fixed behind the scenes – running the code today, there are no erroneous matches at all.  Thank you to somebody!

Viewing 10 posts - 1 through 10 (of 10 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

Excluded Middle


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
ame @ame Participant
Summary

This topic contains 9 replies,
has 4 voices, and was last updated by ameame
8 years, 11 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 10/08/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...