Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Order rejected under Managed approach
Collapse
X
-
Hi Super Chelsea ! :-)
Thanks a lot for your complete answer; I know my questions might sound kind of obvious but I'd like to eliminate any doubt about the operational routine by knowing this or create a snippet.
As always, all the best for you,
Regards
-
Hello pstrusi,
The methods in NinjaTrader are event driven. OnBarUpdate() cannot run unless there is tick data received. (You may notice that when a price feed stops at the end of a session, the new bar does not form until the first tick is received at the open of the new session. If a tick is not received, the previous session's bar does not close and the new bar does not open.)
This means that OnBarUpdate(), OnMarketData(), and OnMarketDepth() do not trigger unless there are ticks being received to drive these events.
A loss of order feed will cause the connection status to change. This will pause the strategy until the order feed is reconnected. If too many disconnects are received within x minutes (4 restarts in 5 minutes by default, but this can be changed in Tools -> Options... -> Strategies -> NinjaScript), then the strategy is disabled.
If your strategy sends out an order just before the order feed is lost, the strategy would not be able to continue until it receives a message back from the brokerage that the order was accepted or rejected. Until then the order is stuck and no further orders will be allowed until a message is received back for that order.
All said, your strategy cannot work unless both the data feed and order feed are connected as the lack of data prevents the methods from triggering, and the lack of order routing causes the strategy to wait for messages to be received from the brokerage before continuing.
Leave a comment:
-
Thanks for your response, now I have some new doubts:
1.
Evaluating this condition: OnConnectionStatus(ConnectionStatus orderStatus, ConnectionStatus priceStatus) Might the Strategy run and send orders ( somehow ) if any of priceStatus / orderStatus are not actually fully connected ?
2.
If any of priceStatus / orderStatus is not fully connected, can I be sure that the Strategy is automatically fully suspended until possible recovery?
3.
Is there a way to prevent OnBarUpdate runs when OnConnectionStatus is NOT fully connected ? or is this an automatic function that ninjaTrader takes care?
Thanks a lotLast edited by pstrusi; 07-07-2015, 03:33 AM.
Leave a comment:
-
Hello pstrusi,
By default, RealtimeErrorHandling is set to StopStrategyCancelOrdersClosePosition. As long as this is not changed, the rejected order will cause the strategy to be disabled.
The order will not be resubmitted, the strategy will be disabled.Last edited by NinjaTrader_ChelseaB; 07-07-2015, 07:25 AM.
Leave a comment:
-
Order rejected under Managed approach
Hi Ninjas,
I'm clearing certain theoretical details before going totally "live" with a new Strategy.
My Strategy use Managed Approach for orders, and all orders will be submitted as "Market orders". So, let's suppose that we have this situation:
I have no connection issues, my strategy is running and it sends over a new order, but somehow that order is rejected by my broker's server, so my question:
After that event, how does NinjaTrader react ?
Will it continue to send the order?
Will my Strategy disable itself?
Please, I'd like to know exactly howt NinjaTrader acts in order to make sure that my Strategy can "handle" this rare event.
ThanksTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Cameronpanek1, Today, 09:43 PM
|
0 responses
9 views
0 likes
|
Last Post
![]() |
||
Started by roykesler16, Today, 09:12 PM
|
0 responses
4 views
0 likes
|
Last Post
![]()
by roykesler16
Today, 09:12 PM
|
||
Started by iantriestrading, 04-19-2025, 10:23 AM
|
3 responses
56 views
0 likes
|
Last Post
![]() |
||
Started by raysinred, Yesterday, 02:05 PM
|
2 responses
20 views
0 likes
|
Last Post
![]()
by raysinred
Today, 06:48 PM
|
||
Started by fredfred123, 09-29-2017, 05:16 AM
|
5 responses
809 views
0 likes
|
Last Post
![]() |
Leave a comment: