I have a strategy that goes both long and short. I've added a PowerPack condition for "Bars since Exit > 5" to both the Long entry and Short entry. Unfortunately, it doesn't seem to work quite as expected. Claude claims the bug is this:
QUOTE:
it uses the raw variable name _lastEnExBar instead of the template placeholder <_lastEnExBar>
Rename
Claude nailed it! I'm fixing it for the next release cycle.
That looks like a good call by Claude, but it should only be a problem if you're using the rule more than once. Is that the case?
He indicated he's using it twice, Long and Short. I'm implementing the fix.
I have an issue with building block's "bars since entry/exit". The condition is completely ignored, the results don't change no matter what value I use (equal to 0 / 1 / 2 / -1).
I wanted to use it in a "Sell at Close" block with "Same Bar" checked.
Werner
I wanted to use it in a "Sell at Close" block with "Same Bar" checked.
Werner
It won't work in conjunction with a same-bar market close exit, because the same-bar logic executes at a point in time where there is no active position, so the condition code falls through and the same-bar market close executes on the entry bar.
The solution here is to uncheck same-bar exit. I'm not sure why you'd want a same-bar market close exit when you're also using the Days Since Entry Condition anyway?
The solution here is to uncheck same-bar exit. I'm not sure why you'd want a same-bar market close exit when you're also using the Days Since Entry Condition anyway?
Your Response
Post
Edit Post
Login is required