I am looking for some help on implementing my exit strategy. I am only using this in back-testing purposes and I do have access to historical data. This is on intra-day strategy. Basically, I enter the market on my signals with 3 orders of equal amount of shares, say 100 each of GOOG, for a total of 300. What I want to do, is the following:
- Set a stop loss on the whole position of $X, if I get stopped out, I exit with everything.
- When the market moves in my direction, and I reach my first arbitrary profit target, I exit with order (100 shares). Now I have some real profits and some unrealized.
- Now what I want to do is set a stop loss on the rest of the position (200 shares) with a break even on the whole position (basically my stop is my entry price), then trailstop until I get stopped out.
What I am struggling with is the SetStopLoss eliminates my ability to use SetTrailStop afterwards, as per documentation. What would be the best way to do this easily in my code?
Thank you in advance!
Comment