Advanced Usage
Learn about advanced features available in CrossTrade Pro
Last updated
Learn about advanced features available in CrossTrade Pro
Last updated
When creating or editing a Monitor, if you choose to include unrealized profit/loss in the P&L calculation (on by default), you gain the ability to enable Unrealized Mode.
Unrealized Mode is a special setting that 1) bases all management decisions on the total unrealized P&L of all open positions in the account, and 2) prevents the Monitor from shutting off when triggered, which effectively allows you to run a Monitor continuously throughout the trading day.
This mode is compatible with Profit/Loss Thresholds, Minimum Profit Drawdown, and Trailing Drawdown based on P&L.
When Unrealized Mode is enabled, a new unrealized P&L "shadow" line will be visible on the Session Profit/Loss graph after you click on an account in the Account Management list. The unrealized shadow line is now the trigger line responsible for flatten actions or drawdown activation, whereas the solid blue line shows the overall session profit/loss.
Normally, when not in Unrealized Mode, the solid blue profit/loss line acts as the trigger line for the day's entire performance and does not reset. If Unrealized Mode is disabled, once a monitor is triggered and stopped it remains stopped for the rest of the session.
As you would expect, Unrealized Mode tracks the unrealized high watermark to determine whether or not stopping criteria has been met or drawdown minimums have been reached. What makes this mode special, however, is the Monitor does not get "stopped" and will remain active even after a flattening action occurs.
When a Monitor triggers a flattening event in Unrealized Mode, the high watermark of the unrealized P&L get reset to zero (can be seen in the image above). This allows the Monitor to reset with fresh tracking the moment a new position is opened.
Similarly, even if a flatten action is not triggered by the Monitor but the account is flattened and the position count returns to zero, so too will the unrealized profit/loss tracking. Any time the account goes flat, for whatever reason, tracking is reset.
There are several settings requirements that must be in place before Unrealized Mode can be used. Don't worry, the UI will yell at you if something is misconfigured.
First, all enabled Position Management actions must be set to flatten the account. A Monitor can't "Do nothing" when a Profit/Loss threshold is met. The account must be flattened so the unrealized tracking metrics can be zeroed, as discussed above.
Second, both Minimum Profit and Trailing Drawdown types are compatible with Unrealized Mode. However, Trailing Drawdown cannot be based on Net Liq and must be set to use Session P&L (i.e., unrealized profit/loss).
This precaution is necessary because otherwise, once triggered, the Monitor would continue triggering endlessly since it is never shut down in this mode.
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 or otherwise.