Stock that have gapped down and then went down for 3 more intraday bars
Author: akar
Creation Date: 11/17/2018 1:09 AM
profile picture

akar

#1
I'm trying to buy stocks that have gapped down and then went down for 3 more bars in a intraday basis. The first two conditions, find the gaps. However, if I include condition 3 and cond4 no trades are executed. What is the correct way to approach this. I can alternatively use time but would like to use the barnumber

CODE:
Please log in to see this code.


Thanks
akar
profile picture

Eugene

#2
Here's how. The code is self-documenting:

CODE:
Please log in to see this code.
profile picture

akar

#3
Eugene, thanks for the code.

profile picture

Eugene

#4
You're welcome. Thinking of it some more, you might want to make it more adaptive to the changing parameter with...

CODE:
Please log in to see this code.


So the resulting code is:

CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).