Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
how to get an email when connection is lost?
Collapse
X
-
You can use OnConnectionStatus() and SendMail when reconnecting:
Cancelled orders can be tracked with IOrder: http://www.ninjatrader-support.com/H...de.html?IOrderTimNinjaTrader Customer Service
-
I was trying to get a handle on how to receive an email when an order was filled. I understand the SendMail() part, but I don't quite follow the order filled part.
Taking a part of my existing strategy
Is it as simple as the following?Code:// Condition set 1 if (DefaultInput[0] < ChandelierSAR(6, 4).Chandelier[0]) // && Time[0].DayOfWeek != DayOfWeek.Friday) { EnterLongStop(DefaultQuantity, ChandelierSAR(6, 4).Chandelier[0], ""); DrawDot("My dot" + CurrentBar, false, 0, ChandelierSAR(6, 4).Chandelier[0], Color.Blue); } // Condition set 2 if (DefaultInput[0] > ChandelierSAR(6, 4).Chandelier[0]) { ExitLongStop(ChandelierSAR(6, 4).Chandelier[0], "", ""); DrawDot("My dot" + CurrentBar, false, 0, ChandelierSAR(6, 4).Chandelier[0], Color.Blue); }
How can you distinguish between an entry fill and an exit fill?Code:protected override void OnOrderUpdate(IOrder order) { if (order.OrderState == OrderState.Filled) { SendMail("[email protected]", "[email protected]", "Orderfilled", "Position Stopped Out") } }
Comment
-
Hi RDPoS,
Not explicitly, as no specific order type is designated as an exit order.
You could check for position size with Market Position: http://www.ninjatrader.com/support/h...etposition.htmTimNinjaTrader Customer Service
Comment
-
Hi RDPoS,
You would need to check for each OrderState explicilty: http://www.ninjatrader.com/support/h...tml?iorder.htmTimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
117 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
166 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
85 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
130 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
88 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment