I have a section of code that once in a position checks a condition from an indicator in a different time frame.
It says
if(blah blah)
ExitLong("longtrade");
The problem is, this exits the position at the next traded tick. This is unrealistic. I need it to exit at the close of the last bar +1. So if (blah blah) is a 1 min bar, and it closes, giving the indicator the data it needs to check the condition, then I want to exit at that price plus one tick against me, in order to simulate always taking the market price.
I've read for hours on this forum and been able to answer all my questions, except for this one. So I just want to know how can I do this?
Thanks in advance,
Wayne
Comment