Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Real time error handling
Collapse
X
-
Real time error handling
Is real time error handling supposed to work on playback? I ask because I was running my strategy on playback and an error came up but it didn't close the position and the it stayed open until close of session. I have real time error handling set to the default so it should close all positions upon receiving an error.Tags: None
-
Hello, thanks for writing in. Real Time Error handling will work in the playback connection. In order for an error to cause the strategy to trigger the real time order handling, it must throw one of the error codes:
If no actual error code is thrown, it will not run the real-time order handling setting.Code:ErrorCode.LoginExpired ErrorCode.LogOnFailed ErrorCode.NoError ErrorCode.OrderRejected ErrorCode.OrderRejectedByRisk ErrorCode.Panic ErrorCode.UnableToCancelOrder ErrorCode.UnableToChangeOrder ErrorCode.UnableToSubmitOrder ErrorCode.UserAbort
Could you provide more details on what you are seeing in the user interface when this happens? Can you share the error message?
-
Hi, thank you for posting this. The answer to this was answered in the past here, see post #7:
Hello, I am detecting abnormal behaviors in a strategy, and I would like to resolve a question: if the RealTimeErrorHandling property is set to StopCancelClose and an exception occurs in the code (for example of type NullReferenceException) what should happen? I assume that pending orders (Accepted, Working) are automatically
The position will not be closed by a run time error in your code. The strategy is placing a buy stop market order below the market, this can be fixed by ensuring that the price you are using is > GetCurrentAsk();
Comment
-
I looked at post Visitor Messages in the link you sent but does that mean it's still being implemented to where the order doesn't come back as an error if this happens? I have these orders set under the 'stops and target' section in strategy builder so I'm assuming the stop orders are market orders.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
44 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
124 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
65 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|
Comment