I'm using daily bars.
How do I create a strategy that only lasts one day?
As an example, say an OOPS strategy
Where the day opens below the prior day
Buy the Open and sell at the close
OR Buy on stop at yesterdays low and sell on the close.
In the OnBarUpdate method, I have -
If (Open[+1]<Low[0])
EnterLongStop(DefaultQuantity, Low[0]+1, "LE");
This works and gets me in BUT how do I exit at the close of the day?
I've tried things like
ExitShortStop(Close[-1]);
But they don't work.
Thanks,
Neil.
Comment