Advanced Usage
Learn about advanced features available in CrossTrade Pro.
Last updated
Learn about advanced features available in CrossTrade Pro.
Last updated
CrossTrade often has to work around NinjaTrader 8's idiosyncrasies. Chief among them is NT8's inability to query execution data beyond the current session. Because of this, the way NT8 reports unrealized and realized Day P&L is nuanced.
If a position is carried over from a previous session, i.e., held from before 5 PM ET into the open of the new session at 6 PM ET, NT8 will consider any gains from that position as part of the day's unrealized P&L. However, as soon as that position is closed, NT8 will omit that profit or loss from the calculation, making it very difficult to track the true Session P&L.
For this reason, by default we require a clean session (session opens with no active positions) for Account Management Monitors to run properly.
If the session is determined to be "unclean," the Monitor is marked as "INACTIVE" and goes into a waiting state until the next session begins. This is done for safety, as we'll see in a minute.
As mentioned, if the session begins with one or more positions already open, the Session P&L will be tracked accordingly and the Session's P&L high watermark will be recorded appropriately.
The moment any of those positions is closed, however, regardless if it's by the XT Monitor automation or manually, NT8 will immediately disregard the P&L outcome of that position from its Session P&L calculation.
In the example below, a single MNQ position was open at the beginning of the session, carried over through the previous close. As you can see from the P&L graph, the Session P&L is reported and tracked correctly since the start of the session.
At 7:00 AM ET, I closed the position manually for approximately a $300 profit. Then, as you can clearly see in the highlight sections, NT8 disregards the Session P&L as a result of that position and the Profit/Loss drops to zero as if it never existed in the first place.
As long as the trader is aware that this will happen, disabling the Require Clean Session check can be a viable option if your strategy requires carrying positions overnight.
If you don't care about this safety mechanism and want to turn it off, simply click Edit on any Monitor and uncheck the "Require Clean Session" switch, then Save Changes.
Let's discuss a few reasons why traders might consider disabling the check for clean sessions and allow Monitors to run regardless.
The primary reason a trader might want to disable clean sessions is if he's intentionally carrying overnight risk and wants the XT Monitor to manage those positions for him.
The most cogent course of action here would be to let the Monitor handle position exits based on pre-defined P&L thresholds. Once those thresholds are hit and the Monitor's flatten action is triggered, the trader ceases trading for the day.
If the trader chooses to restart a Monitor in this scenario, he must be aware that the Profit/Loss value has now changed (perhaps dramatically) and should check it before continuing.
In some circumstances, prop firms have been known to alter/modify the execution history of prop accounts in such a way that it fools the Clean Session algorithm into thinking a position is open in the account when, in fact, no positions are open at all.
Failing the Clean Session check has most often been observed in S1* accounts. We have yet to determine why.
In this case, it may be prudent to disable the Clean Session requirement if you are certain the account will end the day flat, either through NinjaTrader Account Management End-of-Day Auto-Flattening or otherwise.