VWAP and EMA9 crossover
Forums › ProRealTime English forum › ProScreener support › VWAP and EMA9 crossover
- This topic has 23 replies, 3 voices, and was last updated 5 years ago by Jomina.
Tagged: vwap
-
-
06/14/2019 at 3:41 AM #100609
Hi there everyone,
I’m new (totally) to coding, some am looking for some assistance coding the following screen:
Flag a stock when the following conditions are met in the first 15 mins after a stock starts to trade:
1 – stock opens higher than previous day’s close
2 – EMA9 cuts through the VWAP (from below)
3 – at least 75% of the 1 minute bars that precede the EMA9 cutting through VWAP are green
4 – there is at least $2,000 worth of stock to be purchased at the next available price.
I’ve included a chart below that demonstrates what I’m trying to screen for.
Any assistance to help this coding newbie is much appreciated.
06/14/2019 at 7:46 AM #100613Sorry but the picture is too small to see something 🙁
3/ The bar is 100% green or 100% red, not 75%? Do you mean the size of the body comparing to its whole range (from High to Low)?
4/ This is not possible to know that through ProScreener
06/14/2019 at 8:39 AM #10062306/14/2019 at 10:44 AM #100637Hi Nicolas, thanks for helping.
I’ve attached two .PNG files which should help. One of the whole day (Wednesday). The other of the first 30 (or so) minutes. You can blow these up if needed.
Blue line is the VWAP. Mustard line is 9EMA. Pink is 31SMA. Yellow is 20EMA
On the issue with the bars, you’ll see that there are five bars before the 9EMA cuts through the VWAP from the bottom.
Four of these are green. One red. That is, 80% of the total number of 1 min candles, before the x-over, are green. That’s one of the criteria for filtering.
So, if there were two green candles and one was red (i.e. 50%, it would filter this stock out). If there were three candles and one was red (i,e. only 66.6% are green, it would filter this stock out). If there was one green candle before the x-over (i.e. 100%), it would filter the stock in.
Hope this helps.
Best, JOMINA.
06/14/2019 at 1:16 PM #10064806/15/2019 at 3:33 PM #10075706/15/2019 at 3:52 PM #100758Should work correctly, I had difficulties to make it run on a 1-min TF (no results), but good on a 5-min one. Maybe because the market is closed..
12345678910111213141516171819timeframe(daily)cdaily = open>close[1]timeframe(default)d = max(1, intradaybarindex)VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)ema9=exponentialaverage[9](close)bullcross=ema9 crosses over vwapif bullcross thensum=summation[d](close>open)ratio=sum/dcdefault=ratio>0.75endifscreener[cdaily and cdefault] (sum)This is a nice setup, how do you enter the market after that detection? What is the name of the platform of your screenshots? (never see it before..).
06/16/2019 at 1:51 AM #100775Hi Nicolas,
Thanks for your assistance. Really appreciate it. You’re fantastic.
Is there anyway to backtest this on multiple stocks at the same time?
Re entering the market, I’m looking to enter on the first or second pullback. I’ll come back with a request to help code that and add some other filters – just want to be clear in my own mind what they are first!
06/16/2019 at 2:45 AM #100776Hi Nicolas,
Just ran the screener on Friday’s results. A couple of things I’m hoping you can assist with:
1 – I’ve done a random check of the output and there doesn’t seem to be a filter for the timeframe within which the 9EMA/VWAP cross needs to happen. I would like the scanner to only pick-up those that occur in the first 15 mins of the stock trading. You’ll see (in the first attachment) the scanner has picked up a stock where the cross has happened at 10.33am.
2 – I played around with the section of the coding that deals with percentage of 1min bars that need to be green to qualify. I ran the screener having set the % to 20%, and then ran it again, having set it to 90%. The results are identical to each other. See pictures 2 and 3. I would have thought that the number of stocks that would qualify, would reduce as the % increases.
Can you help with these two issues please? Many thanks Nicolas.
Best, JOMINA
06/16/2019 at 7:08 AM #100780Hi Nicholas,
Can you also add the following additional filters to the code (such that the screener only picks up stocks where all the criteria are met):
1 – market cap of stock is between $500m and $2B (Australian dollars)
2 – price of each share is greater than $2
3 – volume traded is at least 1.5 time the previous day’s volume.
Also, when will v.11 be available to access directly.
06/17/2019 at 1:49 AM #100825Hi Nicolas,
I ran the screener this morning. Unless I’m missing something, another anomaly has popped up. The screener seems to be identifying stocks where a cross hasn’t actually happened. I’ve attached a screenshot of the first handful of stocks that were identified and as many graphs as i could attach. You’ll see that they’ve popped up without the EMA9 having intersected VWAP. On DickerData, where the cross has occurred, its occurred the wrong way (VWAP has crossed down through EMA9, rather than EMA9 crossing up through VWAP).
06/17/2019 at 8:15 AM #100842don’t know why but can’t seem to get results on a 1-minute timeframe … Not so much results in 5-minute one, but they were good.
If you have an example of a stock you know is not returned by the screener, please tell me and I’ll try to figure out why.
I added the filters you requested.
1234567891011121314151617181920212223timeframe(daily)cdaily = open>close[1] and volume>1.5*volume[1]timeframe(default)d = max(1, intradaybarindex)VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)ema9=exponentialaverage[9](close)bullcross=ema9 crosses over vwap and intradaybarindex<=15if bullcross thensum=summation[d](close>open)ratio=sum/dendifgreen=ratio>0.75//filtercapitalization=volume*close>500000 and volume*close<2000000minprice=close>2//final cutcdefault = green and capitalization and minpricescreener[cdaily and cdefault] (sum)06/17/2019 at 8:22 AM #10084406/17/2019 at 11:39 AM #100875Hi Nicolas, the % green ration filter doesn’t appear to be having any impact on the results at all (which is critical).
An alternative is to replace the concept of the “vwap/ema cross” with that of an “MFI cross”. That is, we’d buy stocks that cross the 85 Money Flow Index level (on a 1 min basis) at the point at which they come back below 50MFI and start to pivot. Picture attached below.
So the screener would identify stocks if all the following conditions are met:
- in the first 15 mins of that stock trading
- the stock opens higher than the previous day
- the volume of stock traded is 1.5% time the previous day
- the market capitalisation of the stock is between 500m and 2B
- the minimise share price is $2
- the Money Flow Index of the stock rises above 85 (on a 1min daily chart)
- the MFI index then falls below 50MFI
- the MFI then starts to pivot back-up (see picture)
That might be an easier way to deal with this. Can you assist?
06/17/2019 at 12:51 PM #100881Nic, here’s an example of a stock that met all the conditions for the EMA/VWAP cross, but didn’t get picked up (it was a good one too).
There are a number of others too.
Despite my earlier comment, it would be good to nut out the ema/vwap cross and get that working first before adopting the MFI option.
Sorry to flip/flop.
-
AuthorPosts