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
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); }
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 ageeholdings, 05-01-2024, 05:22 AM
|
6 responses
42 views
0 likes
|
Last Post
by ageeholdings
Today, 08:37 PM
|
||
Started by tony_28217, Today, 07:04 PM
|
0 responses
8 views
0 likes
|
Last Post
by tony_28217
Today, 07:04 PM
|
||
Started by flybuzz, Today, 10:33 AM
|
1 response
9 views
0 likes
|
Last Post
by flybuzz
Today, 06:59 PM
|
||
Started by spencerp92, 10-10-2023, 09:56 AM
|
4 responses
308 views
0 likes
|
Last Post
by flybuzz
Today, 06:45 PM
|
||
Started by samish18, Yesterday, 10:13 AM
|
1 response
26 views
0 likes
|
Last Post Today, 06:15 PM |
Comment