This article explains how Riskanto's guard against opposite positions works: which accounts it watches together, how to switch it on, what counts as the same market, what it refuses, and what you see if opposite positions (one account long and another short of the same market, a cross-account hedge) appear anyway.
Short answer
With the guard on, Riskanto refuses, before it is sent, any new order that would open or add to one side of a market while another account of the same set holds, has an order working on, or is entering the other side. Closing orders always work. The guard is off by default and is switched on per set of accounts, in the account's rules window, tab Opposite positions.
Which accounts form a set
- A set is the accounts of one connection. The Sim accounts of a connection are a set of their own, shown as <connection> (Sim accounts).
- All Playback accounts form one set, shown as Playback.
- The switch belongs to the set, not to one account: it acts on every account of the set, On or Off, hidden or not. It does not depend on the account's own On switch.
- Two connections are two sets, even if they are yours.
- An account whose connection has not been read yet is in no set; the tab says so until it is.
How to switch it on
- In NinjaTrader's Control Center, open New > Riskanto.
- Right-click any account of the set and choose Rules for <account>...
- Open the last tab, Opposite positions.
- Under Refuse opposite positions, choose On. The tab shows Not saved yet: Save switches it on.
- Click Save. Save applies it at once to every account of the set, not only to the one you opened, even while that account is On or locked. The tab lists the accounts it covers.
If switching it on would cancel working orders or close positions that are already opposite, Riskanto lists them first and asks Go ahead? before it changes anything.
The automatic close option
In the same tab, the card Close the side that came later is Off by default. Choose a number of seconds instead (from 2 to 60; 5 when you first turn it on) and click Save. The label reads Closed at market after.
- It acts only while the guard is on.
- When opposite positions are found anyway, the side that came later is closed at market after the seconds chosen. Its working orders on that instrument are cancelled too. The side held first is never touched.
- If both sides appeared at the same moment, the smaller one is closed.
- The close waits while another Riskanto close is working on that account (a lock, the trading hours, the max loss per trade). Riskanto tries up to 3 times.
What counts as the same market
Riskanto compares markets, not single contracts: any expiry of a future, plus its mini and micro contracts. NQ and MNQ, ES and MES, CL, MCL and QM, GC and MGC are each one market. Only the side counts, not the size: 1 MNQ long in one account and 5 NQ short in another are opposite. Any other instrument, such as a stock, is a market of its own.
What is refused and what still works
- Refused: a new order that opens or adds to one side while another account of the set holds, works or is entering the other side; also an order opposite this account's own position in another contract or expiry of the same market.
- Refused whole: a reversal (one order that closes and opens the other way).
- Cancelled: a working order that would now open the other side, an order resting at the broker found at connect or at switch-on, and an order placed outside NinjaTrader that would open the other side.
- Still works: closing orders, cancelling, entries on the same side as the other accounts, other sets, and every account while the guard is off. An OCO entry is not refused because of another account's OCO entry, and a protective stop or target passes right after its own entry fills.
Each refusal message is explained in Riskanto: order refused, an account holds the other side.
If opposite positions are found anyway
Positions made outside NinjaTrader, before the guard was on, or by a fill that slipped through can still end up opposite. When they stand, Riskanto tells you once:
- The account's Status shows Opposite to <account> (<asset>), or Both sides of <asset> when one account holds both.
- A message window titled Opposite positions in <asset> lists each account's side and says New entries that add to either side are refused; closing orders still work. Found at Riskanto's start-up, there is no message window, only the Status and the Activity panel.
- NinjaTrader's Alerts window gets a line starting Opposite positions in <asset>:, and the Activity panel gets Opposite positions found, then Opposite positions ended.
- With the close option on: <account>: opposite position closed. If the 3 tries fail: <account>: opposite position NOT closed, with The position is still open. Close it by hand.
Committed and Strict accounts
If any account of the set is Committed or Strict and is On or locked, switching the guard Off, switching the close Off or raising the seconds does not apply today: it waits for the next trading day's open, and the tab shows when. Switching on, adding the close or fewer seconds apply at once. See A pending rule change in Riskanto and How to commit to your daily loss limit in Riskanto.
A help, not a compliance guarantee
If your prop firm has a hedging rule, the guard can help you avoid long and short positions at the same time across your accounts, but no rule in Riskanto, this guard included, makes your trading compliant with a prop firm's, broker's or exchange's rules.
Comments
0 comments
Article is closed for comments.