This is my first-ever post to this forum so please be indulgent. I scoured the NT reference and posts before posting this.
I have successfully developed and am using NT strategies in my daily trading. For the life of me, though, I don't know what the proper way is to handle the following scenario:
I am already holding n shares of equity X. At market open, I want to place a stop market order for these shares at price P. If the order fills, I use the proceeds from the sale to buy back as many shares of X as I can on market close.
I know how to do everything except express the original order. I can't use one of the Exit* methods because the initial purchase was done some time in the past from outside my strategy. Do I use EnterShort or one of its variants? I want a stop market order to be sent to the broker immediately on market open.
Here's a bigger-picture question: how am I supposed to deal with the logistics of running a strategy whose timeframe spans multiple weeks? It's obviously impractical to expect the strategy to continue uninterrupted during this time (especially since IB force logs me out once every 24h), but when you restart a strategy, it uses virtual buys and sells based on the historical bar data rather than the actual buys and sells that your strategy had generated on previous days.
Thanks in advance.

Comment