Stock Screener on VWAP and Price
- This topic has 5 replies, 3 voices, and was last updated 4 years ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
Similar topics:
Forums › ProRealTime English forum › ProScreener support › Stock Screener on VWAP and Price
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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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!
AVERAGE is missing:
It should be:
1 |
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.
Hi @robertogozzi , Unfortunately the code still does not work. I have tried also this conditions, but with the same result.
1 2 |
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.
@Nicolas, I am sorry. Next time i will address my post properly.
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?
Find exclusive trading pro-tools on