Help to calculate current open position based on label and symbol

Created at 16 May 2017, 11:50
FR

fredrik

Joined 02.05.2017

Help to calculate current open position based on label and symbol
16 May 2017, 11:50


Hi,

currently I have:

var openPositions = 5;

if (Positions.Count < openPositions)
{
 // code...
}

trying:

var symbolPositions = Positions.Find("Orion", Symbol);
var openPositions = 5;

if (sympolPositions < openPositions)
{
 // code...
}

and I also tried symbolPositions.Count

error:

Error CS0019: Operator '<' cannot be applied to operands of type 'cAlgo.API.Position' and 'int'

Please advice!


@fredrik
Replies

... Deleted by UFO ...