Gap Filter

Optuma Forums Optuma Scripting Gap Filter

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #66083
    Brad
    • Topics: 8
    • Replies: 16
    • Posts: 24

    Hello,

    I have being trying to write a script that will filter out stocks that have experienced a gap between a low of a day and the high of the day just prior to this day of greater than 15% within the last 10 days.

    A example of this would be for example sake CPH.asx that for whatever reason triggered on 18/6/2019, I would like to filter this trade out in a scan because of the huge approximately 20% gap up from 6/6/2019 high to 7/6/2019 low.

    I have tried many versions of script such as –

    h1=(LOW()-HIGH()[1])/HIGH()[1] < 0.10;
    TIMESINCESIGNAL( lh1 == 0 ) , <= 10;

    This works ok at 10% or less gap, but when I change < 0.10; to < 0.15 for < 15% gap, as per the attached screen shot from 24/6/2019 back in time all shows as a 1, I want it to drop to zero on 7/6/2019.

    What do I need to change to achieve this?

    Thanks for your help,

    Brad

    #66089
    Darren
    • Topics: 66
    • Replies: 680
    • Posts: 746

    Hi Brad,

    When using < 0.10 and 0.15 the formula is using cents, not a percentage.

    For a 10% gap above yesterday’s high use LOW() > (HIGH()[1]*1.1)

    Did you see this article about the new Gap Finder tool in Optuma 2?

    https://www.optuma.com/mind-the-gap/

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

Pin It on Pinterest