I have been playing with those functions and from my results, I understand they behave like this, but I'm not exactly sure, since I have not been able to read their exact behaviour in the documentation (https://ninjatrader.com/support/help...entershort.htm , https://ninjatrader.com/support/help...nterlong.htm):
- If there are no positions, they will simply open the desired position.
- If there are other positions of the opposite side (for example, we call EnterLong(50) when having a SHORT position of 200), the current positions will be closed and then the LONG position itself will be opened. Therefore, we end up with a position of LONG with quantity 50. This strikes me as a bit odd. I would expect my position in that case to be SHORT 150 in that case.
- If there are other positions of the same side, the specified quantity is simply added to the position. So if we have a position of LONG 50, and call EnterLong(200), we end up with a LONG position of 50.
Are my assumptions correct? Where can I read more about them, or even other possible ways to handle the position for a specific instrument?
Best regards.
Comment