Scanning for 21 day highs with 5 day increasing OBV

Hi Everyone,

I got this code off you some time ago but I'm concerned that it's not working correctly / the way I need it to. Mostly due to missed opportunities. Example of which is VRX. I use this scan everyday however it didn't pick it up on the 18/9/18 nor subsequent days after. This is just an example, I've had many others.

Code is below:

V1 = OBV() ; V2 = ROC(V1, BARS=5) > 25 ; R1 = HIGH() CrossesAbove HIGHESTHIGH(BARS=21) ; R2 = TIMESINCESIGNAL(V2) <= 6 ; R3 = CLOSE() <= 2 ; R1 and R2 and R3

Thanks in advance. Dave.

Hi David,

When a scan / script isn’t working as i expect it to, the first thing i do is break it down to its individual criteria using Show Views. When i do this to your script, it appears the R2 criteria is the one failing to trigger.

The R2 criteria of your script is looking for a 25% or greater rate of change on the On Balance Volume within the last 6 days.

When I apply these indicators to a chart of VRX, this criteria is not being met, so the script is producing the correct results in this situation.

Ex2

If what you are looking for is different, you will need to modify your script.