gap up/down screener

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #149282 quote
    ossebosse
    Participant
    Junior

    Greetings!

    Im using this gap screener to get access the daily gap ups/downs, and trade them 30 minutes after the market opens. Therefore I need the list of stocks sorted between 0-100 %, in that way where 0 is the most prioritized. “Priority”in the code below gives how many % the close is from either the low or high (whichever of the two has the shortest distance) of the 09:00 – 09:30 candlestick.

    It doesnt work as intended, some stocks sometimes show priority=0 when the high != close for example. Can you see my mistake?

    Thank you

     

    Timeframe(daily)
    
    Filter = (open>high[1]) or (open<low[1])
    
    timeframe(30 minutes)
    
    if time => 090000 and time < 093000 then
    
    priority = 100 * min((ABS(high-close)/close),(ABS(close-low)/close))
    
    endif
    
    
    SCREENER[ filter ](priority as "priority")
    #149306 quote
    robertogozzi
    Moderator
    Master

    Because between 9 and 9:30 you only select priority, not the filter which is on a daily TF.
    Try this one:

    Timeframe(daily)
    Filter = (open>high[1]) or (open<low[1])
    timeframe(30 minutes)
    TimeOK = 0
    if time => 090000 and time < 093000 then
       TimeOK = 1
       priority = 100 * min((ABS(high-close)/close),(ABS(close-low)/close))
    endif
    SCREENER[ Filter AND TimeOK ](priority as "priority")
    ossebosse thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

gap up/down screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
ossebosse @ossebosse Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
5 years, 4 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 11/02/2020
Status: Active
Attachments: No files
Logo Logo
Loading...