Stock Screener on VWAP and Price

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #120297 quote
    Marcel van Vliet
    Participant
    Veteran

    Hi, I have tried to build a stock screener which is able to scan for stocks which are priced between 5 and 25 euro (condition 1) and are CROSSING THE VWAP line (condition 2)

    The first condition is no problem but the second condition (both examples) seems not to work. What am I doing wrong here?

    This is to where I came so far:

    vw = volume*close
    vwsum = SUMMATION[20](vw)
    volsum = SUMMATION[20](volume)
    VWAP = vwsum/volsum
    
    PriceCond = 0
    IF close >= 5 AND close <= 25 THEN
    PriceCond = 1
    ENDIF
    
    C1 = PriceCond
    C2 = average crosses over VWAP
    C3 = average crosses under VWAP
    
    //or:
    //C2 = Open < VWAP and Close > VWAP
    //C3 = Open > VWAP and Close < VWAP
    
    screener [(C1 and C2) or (C1 and C3)]
    

    Any suggestion is welcome!

    #120299 quote
    robertogozzi
    Moderator
    Master

    AVERAGE is missing:

    • periods
    • data series on which it should make calculations.

    It should be:

    average[Periods](XYZ) crosses over VWAP

    PERIODS can be whatever integer number you like > 0 (5, 10, 20, 100,…), XYZ can be CLOSE, VOLUME, VWAP or any other data series of your interest.

    Marcel van Vliet thanked this post
    #120309 quote
    Nicolas
    Keymaster
    Master

    And please, post in the screener forum if your question is related to screener.. 🙄

    #120318 quote
    Marcel van Vliet
    Participant
    Veteran

    Hi @robertogozzi , Unfortunately the code still does not work. I have tried also this conditions, but with the same result.

    C2 = Open < VWAP and Close > VWAP
    C3 = Open > VWAP and Close < VWAP

    Is there a coding rule available with the result of a candlestick crosses over a moving average or in this case the VWAP?

    It must be simple to implement such a simple coding rule in a screener, but somehow I cannot get this done.

    #120319 quote
    Marcel van Vliet
    Participant
    Veteran

    @Nicolas, I am sorry. Next time i will address my post properly.

    #120327 quote
    robertogozzi
    Moderator
    Master

    The logical error is in lines 1-4, say you are working with DAX at 13,000, and that volume is 10,000;

    1. you multiply 13,000 by 10,000 and you get 130 million

    2.you sum that value 20 times and you get 2.6 billion

    3. you sum Volume 20 times and get 200,000

    4. you assign VWAP 13,000 (2.6 billion divided by 200,000), so VWAP is simply the starting price, all those calculations cancel one another

    How can any price be > or < to itself?

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

Stock Screener on VWAP and Price


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by robertogozzi
6 years ago.

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