Single position
Single position
08 Oct 2018, 12:16
Dear Panagiotis! Hi!
Let's suppose I know I only have one position opened. What would be the easiest way to address it?
Regards,
Sahsa
Replies
alexander.n.fedorov
08 Oct 2018, 12:22
if (Positions.FindAll (Instance).Count()=1)
{
ClosePositions(?)
}
@alexander.n.fedorov
alexander.n.fedorov
08 Oct 2018, 12:23
if (Positions.FindAll (Instance).Count()==1)
{
ClosePositions(?)
}
@alexander.n.fedorov
PanagiotisCharalampous
08 Oct 2018, 12:27
If you want to close that one position then try the following
ClosePosition(Positions.First(x => x.Label == Instance));
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 Oct 2018, 12:20
Hi Sasha,
It is not clear to me what is the problem you would like to address. Can you please explain?
Best Regards,
Panagiotis
@PanagiotisCharalampous