No, the Exit is not attempting to scale out of the market. It's intended to serve as a reverse to my prior position and the Exit is submitted on one and the same price level, that's why I'm using the calculation (Position.Quantity * 2). The strange thing is that my Prints are showing the correct value of 4 with this calculation, in a scenario where my position size is 2. But adding that same calculation to my Exit doesn't seem to give me a value of 4, and instead returns me a value of 2.
A few days ago I did not check for Null when submitting "ASL1", the Exit order, and what would happen is that the strategy would submit 2 contacts first, and then another 2 contracts on the second price movement (Calculation set to .OnPriceChange), instead of submitting all 4 contracts at once. Then I added the "ASL1 == null" in my If statement, and now it seems like the strategy is no longer submitting the second 2 contracts that would make up the total of 4 that I am trying to get.
I haven't had a chance yet to test different setups the markets are still open and I have other strategies running that are preventing me from trying the Simulated Data Feed where I can purposely trigger the scenario to see different outcomes depending on different factors in my script.
Comment