thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Exit price last trade
Collapse
X
-
Tags: None
-
Hello mdatalogic,
Thanks for the post. To get the exact execution price, you need to structure your orders as IOrder and can then expose properties about it. This reference sample is good for to show how to use IOrder and advanced handlers:
The OnOrderUpdate() and OnExecution() methods are reserved for experienced programmers. Instead of using Set() methods to submit stop-loss and profit target orders, you can submit and update them manually through the use of IOrder and IExecution objects in the OnOrderUpdate() and OnExecution() methods. The OnOrderUpdate()
A simple implementation without using IOrders could be made using the built in BarsSinceExit() method to reference bar values for the exit bar.
double closeValueAtExit = Close[BarsSinceExit()];
You could also work with the Trade collection as well:
Last edited by NinjaTrader_RyanM1; 03-01-2012, 01:31 PM.Ryan M.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
20 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
120 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
174 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
92 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
134 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
Comment