Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

A scan about testing VWAP for a while Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
edge13
Posted : Thursday, July 27, 2017 5:34:02 PM
Registered User
Joined: 6/1/2017
Posts: 14

Hi,

I'm wonder how to write a PCF about scanning the stocks whose prices testing VWAP after 15mins of opening (means after 9:45am EST) or, a scan for the stocks whose prices are aways above the VWAP after 9:45am, It's a period not a specific time. BTW, I'm using 5mins frame.

Thanks in advance!

Bruce_L
Posted : Friday, July 28, 2017 9:59:02 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I really do not know of a way to do this which would not involve writing a different formula for each 5 minute bar throughout the trading day (so you would need to know the current time of day and then use the formula based on that time).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
edge13
Posted : Sunday, July 30, 2017 12:56:18 PM
Registered User
Joined: 6/1/2017
Posts: 14

Hi Bruce,

Thank you for your response!

I don't very understand, can you show me how to write the formula, please?

Cheers!

Bruce_L
Posted : Monday, July 31, 2017 10:20:41 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Let us take price being constantly above the VWAP after 9:45 AM ET in a 5 minute time frame as an example. Between 9:45 and 9:50 AM ET, the formula would be the following.

L > AVG((O + H + L + C) * V, 4) / 4 / AVGV4

But between 9:50 and 9:55 AM ET, you would need to change the formula to the following.

L > AVG((O + H + L + C) * V, 5) / 4 / AVGV5 AND L1 > AVG((O1 + H1 + L1 + C1) * V1, 4) / 4 / AVGV4.1

And between 9:55 and 10:00 AM ET, the formula would need to be even longer.

L > AVG((O + H + L + C) * V, 6) / 4 / AVGV6 AND L1 > AVG((O1 + H1 + L1 + C1) * V1, 5) / 4 / AVGV5.1 AND L2 > AVG((O2 + H2 + L2 + C2) * V2, 4) / 4 / AVGV4.2

Every time a new bar starts forming, you need a different (and longer) formula. It really isn't something which is practical to try and implement as a formula.

It is a bit easier to do by adding a 1 period simple moving average to price set to use the low instead of the clase. You can then click on this and select Create Scan Condition to create a condition for the value being above the VWAP.

But the only reason this is easier is that you don't have an ever expanding formula to deal with. You would still need to create an EasyScan Condition based on the conidtion so you could set it to be true a different number of bars in a row for each new 5 minute bar of the trading day.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
edge13
Posted : Tuesday, August 1, 2017 10:51:01 AM
Registered User
Joined: 6/1/2017
Posts: 14

Hi Bruce,

Thank you for your elabrate!

I made a new scan with

L > AVG((O + H + L + C) * V, 4) / 4 / AVGV4

But there are many prices below VWAP in the outcome, why is that?

StockGuy
Posted : Tuesday, August 1, 2017 11:00:26 AM

Administration

Joined: 9/30/2004
Posts: 9,187

That forumula is only valid from 945am to 9:50am.  See Bruce's post above.

Bruce_L
Posted : Tuesday, August 1, 2017 11:00:36 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The formula required for the plain VWAP indicator changes at each and every bar. That formula only works between 9:45 and 9:50 AM ET on a 5 minute chart and your screen shot clearly shows the time as 10:47:48 AM ET instead.

If you are just going to use L > AVG((O + H + L + C) * V, 4) / 4 / AVGV4 all day long, then you would need to a Moving VWAP with the period set to 4 instead of using the plain VWAP indicator.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.