NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 11-30-2007, 12:23 PM   #1
OnePutt
Junior Member
 
Join Date: Nov 2006
Location: , ,
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Default OnPositionUpdate Questions

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?
OnePutt is offline  
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 02:45 PM.