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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
72 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
39 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
63 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
63 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment