Check if a high was broken and if it was broken before

Forums ProRealTime English forum ProScreener support Check if a high was broken and if it was broken before

Viewing 4 posts - 1 through 4 (of 4 total)
  • #82576

    Hello!

    I made a simple screener showing me stocks which broke yesterday’s high. Let’s say I use this screener at 18:00 and I see some stocks. Some of them already broke yesterday’s high minutes or hours before. But I only want to see stocks which broke yesterday’s high the first time today. Is it possible to check if all previous candles today were below yesterday’s high?

    I thought about doing a loop and check if all highs were below yesterday’s high but maybe there is a more efficient way to do?

    This is my simple code so far:

    Any help is appreciated!

     

    #82581

    Just read something.. would this be correct? I can’t test it right now. Therefore I ask.

     

    #82624

    Seems ok to me. But you should add a test to verify the highest period is superior to 0, otherwise the screener will be stuck:

     

    1 user thanked author for this post.
    #82626

    Thanks a lot!

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

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