Disallow trading for the day if opening gap is unfilled after x bars
Author: topcat77
Creation Date: 11/17/2010 6:39 PM
profile picture

topcat77

#1
This strategy trades off 5 minute bars. It should be disallowed from trading for the day if the first bar of the day gaps down from the last bar of the previous day and that gap is not filled within the first 5 bars . So, to be specific, this condition occurs if the highest-high for the first 5 bars of the day is lower than the low of the final 5 minute bar of the previous day. I have trawled through the "gap down" references in WL and cannot find an example of code that I can modify. Please could I ask for help with this

CODE:
Please log in to see this code.


Thanks
profile picture

Cone

#2
Here's the piece you're missing. You just have to incorporate the boolean in the entry logic -

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

Cone

#3
Here's another, probably more accurate take on it -
CODE:
Please log in to see this code.
profile picture

topcat77

#4
Brilliant
Thanks
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).