Coding assistance with screener

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #235689 quote
    Peterphe
    Participant
    Junior

    Ive created this screener.

    c1 = (((close - close[1])/close[1]) * 100) > 3.7 and volume>volume[1] and average[10](volume) > 200000
    
    c2 = range[1]/close[1]*100 < 2
    
    c = c2 and c1
    
    SCREENER(c as "test")
    
    
    

    In short it searches for a candle with range less then 2% the day before and a 4% increase of price the day/close, and some volume criteras.

    Could someone help me figure out why it didnt triggered here, but instead got triggered here? See pic.

    graph-pic.jpg graph-pic.jpg
    #235695 quote
    Peterphe
    Participant
    Junior

    Never mind. The problem seems to be that i dont have real time data on NYSE stocks.

    Now I need help how to to delete my post/thread instead 🙂

    #235714 quote
    robertogozzi
    Moderator
    Master

    In addition your code DOES NOT trigger anything, as it simply returns ALL scanned instruments since you used C as a criterion, not as a condition.

    Replace the last line by:

    SCREENER[c](c as "test")
    Peterphe thanked this post
    #235983 quote
    Peterphe
    Participant
    Junior

    I’m still having problems with my code Robert. Do you have minute to assist me on this? 🙂

    I want to screen for a small price move yesterday (yesterday’s high – yesterday’s open = ±3%) and a bigger move today (>5% move). This screener gives me a few good cases, but it also gives me a couple that are completely wrong. The wrong cases had a downward price move of more than 6% yesterday.

    This time I know the screener has access to real time data.

     

    c1 = (((close - close[1])/close[1]) * 100) > 5 and volume>volume[1] and average[10](volume) > 200000
    
    c2 = abs((((high[1] - open[1])/open[1]) * 100)) < 3
    
    
    SCREENER[c1 and c2]
    #235987 quote
    JS
    Participant
    Senior

    Hi,
    For yesterday’s rise, you first have to determine if it is a rise (Close[1]>Open[1]) and then you have to specify an interval between which the price should end… For example: Price rising>2.5% and Price rising<3.5%...

    c1=Close[1]>Open[1] and (High[1]-Open[1])/Open[1]*100>2.5 and (High[1]-Open[1])/Open[1]*100<3.5
    c2=(Close-Close[1])/Close[1]*100>5
    
    Screener[c1 and c2](((Close-Close[1])/Close[1]*100) as "Big Step%")
    robertogozzi thanked this post
    #236022 quote
    Peterphe
    Participant
    Junior
    c1=Close[1]>Open[1] and (High[1]-Open[1])/Open[1]*100>2.5 and (High[1]-Open[1])/Open[1]*100<3.5

    Thanks for your reply. Though Im pretty sure this is not what i want to scan for.

    To me it doesnt matter if yesterdays move is up or down. I simply want to know if yesterdays move was a tight candle/narrow candle. And todays move is big/wide spread candle. See picture.

     

    c2 = abs((((high[1] - open[1])/open[1]) * 100)) < 3

    To my understanding c2 in my code above should give me:

    absolute value of ( ( yesterdays high – yesterdays low ) in percent )   < 3 percent

    But its only accurate in 50 or 60% of the cases. Why its not completely accurate I dont understand.

    Narrow-candle.jpg Narrow-candle.jpg
    #236034 quote
    robertogozzi
    Moderator
    Master

    As to c1, 5% is really high on DAX (roughly 900 pips in a day), it may work with stocks, instead.

    Also average[10](volume) > 200000 is a quite high value.

    Peterphe thanked this post
    #236035 quote
    JS
    Participant
    Senior

    Instead of using a “Range” relative to the “Open” of the candle, you might want to compare the “Range” between them, for example:

    C1=Range/Range[1] > 3

    The Range of the current candle must be at least 3x larger than the “Range” of the previous candle…

    c1=Range/Range[1]>3
    c2=(Close-Close[1])/Close[1]*100>5
    
    Screener[c1 and c2](((Close-Close[1])/Close[1]*100) as "Big Step%")
    
    robertogozzi and Peterphe thanked this post
    Scherm­afbeelding-2024-08-01-om-19.05.54.png Scherm­afbeelding-2024-08-01-om-19.05.54.png
    #236114 quote
    Peterphe
    Participant
    Junior
    Im not trading DAX with this. Im trading smaller nastaq stocks. Sorry guys, its like im having dyslexia when Im writing code. This line should of course be c2 = abs((((close[1] open[1])/open[1]) * 100)) < 3. NOT c2 = abs((((high[1] open[1])/open[1]) * 100)) < 3. Now I hope it will work just fine.   Regarding Range, I dont think it will suit screeners for small stocks. My impression is that small stocks Range is almost never tight, instead the stocks are pretty much allways trading to their ATR%, which is often around 5% or higher. Though close and open can still create narrow candles/”tight candle”. So when I want to find a stock were buyers and sellers havnt pushed to price in any direction yesterday, and a big move today/current day, I think absolute value ( close-open/open*100) will suit my purpose better.
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.

Coding assistance with screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Peterphe @peterphe Participant
Summary

This topic contains 8 replies,
has 3 voices, and was last updated by Peterphe
1 year, 7 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 07/23/2024
Status: Active
Attachments: 3 files
Logo Logo
Loading...