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 Adam Klaus, Yesterday, 08:21 PM
|
1 response
8 views
0 likes
|
Last Post Today, 07:18 AM | ||
Started by proptradingshop, Yesterday, 05:07 PM
|
1 response
13 views
0 likes
|
Last Post Today, 07:16 AM | ||
Started by Enkidu, Yesterday, 06:40 AM
|
9 responses
36 views
0 likes
|
Last Post
by Enkidu
Yesterday, 01:11 PM
|
||
Started by kezyclaire, 12-01-2023, 09:37 AM
|
3 responses
151 views
0 likes
|
Last Post Today, 07:03 AM | ||
Started by volIQ, Yesterday, 04:28 PM
|
1 response
13 views
0 likes
|
Last Post Today, 06:55 AM |
Comment