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.
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.
Hello,
Thanks for the new “Gap Finder” tool mentioned above.
I have been trying to write a script to filter out trades in Back Tester and Scanning Manager as per follows -
remove trades that have an unfilled gaps below current price, originating(23/11/2021) within the last 30 - 120 days - as per attached diagram for FMG 25/3/2022 trade trigger date.
This trade could have been triggered by a close cross of a daily 30MA for example, but because of the gap originating on 23/11/2021 I would like this trade automatically filtered out.
I have tried several different scripts including below, but unable to formulate something that works as desired.
I understand why the below code doesn’t work as required but have no idea how to make it right.