Hi everyone,
I’m looking for a NinjaTrader 8 add‑on or method that enforces a fixed contract size that cannot be changed during the trading day — for example, exactly 2 contracts only.
The goal is absolute enforcement:
- The contract size should be permanently locked once the day starts.
- I should not be able to manually edit or override it from the Chart Trader, Order Entry, ATM, or account settings.
- Ideally, the restriction stays in place until end‑of‑day reset (e.g., session close or rollover).
I’ve tested RiskMaster and some other risk management scripts, but they can still be modified if you adjust parameters or reopen the settings panel. I’m looking for something even stricter — a “no‑override, no‑permission” rule to enforce daily discipline.
If anyone knows of a third‑party solution?
1 Like
Since you want absolute enforcement, you won’t find a simple add-on that does this 100% without being code-based. The way to strictly enforce a fixed contract size is to hard-code the risk logic into the strategy itself.
Here’s the trick, tell your Strategy to only allow a trade if the intended size is exactly what you want:
Define the fixed size as a Strategy input parameter (FixedContractSize = 2;).
Enforce on Order Submit: In your OnBarUpdate(), before placing any order, check the current position size (Position.Quantity). Crucially, you also need to intercept the Order submission itself using OnOrderUpdate(). If the user somehow tries to manually submit an order or change a position size that doesn’t match the hardcoded FixedContractSize, the strategy should immediately cancel the order and send a notification.
End-of-Day Reset: Use SessionIterator or check the time against the session close. If the session has closed, you can allow a brief window for manual intervention/resetting the strategy, but otherwise, the lock stays on until the next session starts.
If you need a custom-built solution that handles the strict Session logic and advanced order interception to achieve absolute execution mastery, I specialize in that level of Strategy optimization and can help you develop it
Just think of the mortgage payment, that usually suffices to put a halt to egregious behavior… sometimes.
1 Like