![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Nov 2006
Location: , ,
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
When I use OnPositionUpdate I notice this method is driven twice for each event when using "live data". Historical data it is only driven once. The properties of the two events are identical so it would seem that the second one is a duplicate. I am running a 1-min ES using Zen-Fire and the strategy is SampleOnOrderUpdate where I added a PRINT statement to the OnPositionUpdate method to print all the properties.
Also, why isn't the "time" of the position change included as a property in OnPositionUpdate just like OnOrderUpdate and OnExecution? And last, is there any practical reason to use OnPositionUpdate since OnExecution always precedes it? Or is it possible to access Position.MarketPosition from OnExecution and not be returned the correct Market Position? |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| General MA questions | scjohn | Market Analyzer | 9 | 04-04-2011 08:14 AM |
| 2 Questions | mazachan | Strategy Development | 3 | 09-07-2007 08:21 AM |
| COM interface questions. | scjohn | Automated Trading | 1 | 05-17-2007 01:49 PM |
| A few NT6 questions | miked11 | Charting | 2 | 01-14-2007 10:28 AM |
| Few questions | MAX | General Programming | 8 | 11-16-2006 06:53 AM |