Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Email alerts
Collapse
X
-
Email alerts
Is it anyway possible to program a ninjascript to send an email once an order has been placed or a trade signal has been triggered?Tags: None
-
Great, thanks for that, is it possible to send the symbol and order price in the body of the email?
Comment
-
maninjapan,
You would just need to create a string that contains that information and then put it into that SendMail() command.
To get symbol name you could use Instrument.FullName
To get the order price you would just put in whatever price you submitted at.
string someString = Instrument.FullName + " " + someOrderPrice;
Then just pass in someString to SendMail().Josh P.NinjaTrader Customer Service
Comment
-
what would be correct format for the if statement. Im not sure how I would write the 'orderfilled' part..
if ('orderfilled')
sendmail();
ThanksLast edited by maninjapan; 10-13-2009, 03:55 PM.
Comment
-
Either check if your Market Position changed and thus the order put you in a trade - http://www.ninjatrader-support.com/H...tPosition.html
Or work with the IOrder object and the returned fill state - http://www.ninjatrader-support.com/H...V6/IOrder.html
Comment
-
feel like Im getting a bit out of my depth here, is the following at least part of what I need.....
if (order.OrderState == OrderState.Filled)
Comment
-
I know you said they can get complex, but I had a go anyway.... Im trying to follow my orders.
I guess I dont quite have it here though.... Am I even close with what I have here?
Code:protected override void OnOrderUpdate(IOrder order) { if (order.OrderState != OrderState.Filled) { Print("Order Limit Price @"+ order.LimitPrice); Print("Order Status "+order.Token); } }
Comment
-
maninjapan,
You would need to filter it to show you a specific order. Please see this reference: http://www.ninjatrader-support2.com/...ead.php?t=7499Josh P.NinjaTrader Customer Service
Comment
-
much appreciated Josh, extrapolating that to a workable Print command is out of my reach though.....
Comment
-
The idea is you need to assign an IOrder object to take on your entry/exit orders. Then in OnOrderUpdate() you need to check for that specific IOrder that you assigned earlier with the same if-statements as shown in the sample.
If all this is too advanced I suggest you not touching it as this area is complex.Josh P.NinjaTrader Customer Service
Comment
-
right, thats what I figured, which takes me back to square 1, trying to find out what is wrong with my not so complex breakout strategy.....
Comment
-
You could try this reference. It may help a bit: http://www.ninjatrader-support2.com/...ead.php?t=3223Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
599 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
344 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
558 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
557 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment