Stock Screener on VWAP and Price
Forums › ProRealTime English forum › ProScreener support › Stock Screener on VWAP and Price
- This topic has 5 replies, 3 voices, and was last updated 4 years ago by robertogozzi.
-
-
02/24/2020 at 12:37 PM #120297
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:
Screener on VWAP and price12345678910111213141516171819vw = volume*closevwsum = SUMMATION[20](vw)volsum = SUMMATION[20](volume)VWAP = vwsum/volsumPriceCond = 0IF close >= 5 AND close <= 25 THENPriceCond = 1ENDIFC1 = PriceCondC2 = average crosses over VWAPC3 = average crosses under VWAP//or://C2 = Open < VWAP and Close > VWAP//C3 = Open > VWAP and Close < VWAPscreener [(C1 and C2) or (C1 and C3)]Any suggestion is welcome!
02/24/2020 at 12:47 PM #120299AVERAGE is missing:
- periods
- data series on which it should make calculations.
It should be:
1average[Periods](XYZ) crosses over VWAPPERIODS 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.
1 user thanked author for this post.
02/24/2020 at 3:30 PM #12030902/24/2020 at 3:50 PM #120318Hi @robertogozzi , Unfortunately the code still does not work. I have tried also this conditions, but with the same result.
12C2 = Open < VWAP and Close > VWAPC3 = Open > VWAP and Close < VWAPIs 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.
02/24/2020 at 3:51 PM #120319@Nicolas, I am sorry. Next time i will address my post properly.
02/24/2020 at 5:02 PM #120327The 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?
-
AuthorPosts
Find exclusive trading pro-tools on