NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 01-29-2009, 07:46 AM   #1
uptick
Junior Member
 
Join Date: Apr 2005
Location: , ,
Posts: 15
Thanks: 0
Thanked 0 times in 0 posts
Default AvgEntryPrice() question

I just need to verify something:

The Average Entry Price for a specific product is reset every time a position is closed (flattened)? In other words, when I retrieve the AvgEntryPrice, I'm not getting the average entry price over the entire day (session), correct?

For example, if I open a position in stock XYZ in the moring, buy 100 shares at $10, and then close (flatten) the XYZ position, my AvgEntryPrice for that trade equals 10. If in the afternoon I open a new position in XYZ and buy at a price of $20, my AvgEntryPrice should be 20, not 15 ((10+20)/2). Is that correct? So there is no carry over of entry prices?

I'm pretty sure that is how it works, but I need to double check.


Thanks for your help.
uptick is offline  
Reply With Quote
Old 01-29-2009, 08:23 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

It resets for every new position.
NinjaTrader_Josh is offline  
Reply With Quote
Reply

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


All times are GMT -6. The time now is 05:37 AM.