View Single Post
Old 02-13-2018, 12:48 PM   #2
NinjaTrader_Jesse
NinjaTrader Customer Service
 
NinjaTrader_Jesse's Avatar
 
Join Date: Mar 2014
Location: Denver, CO
Posts: 4,803
Thanks: 30
Thanked 1,219 times in 1,140 posts
Default

Hello,

Thank you for the post.

Using the Positions collections specifically I don't believe this would be possible. The Position object does not contain the executions that created that position.

Using the executions collection you could get the Name and other information of the execution to calculate a position from the various executions.

Code:
foreach(NinjaTrader.Cbi.Execution execution in account.Executions)
{
	Print(execution.Name);
}

I look forward to being of further assistance.
NinjaTrader_Jesse is offline  
Reply With Quote