I want to use Positions[0].MarketPosition as an argument in a method and then in the method, compare it to an integer value.
I'm trying to see if there is a certain number (for example 2) of contracts open. I figured Positions[0].MarketPosition would be an integer (positive for long, negative for short, 0 for flat). That didn't work.
I'm doing something like this in the method:
public bool Symbol1Done(int cons1, int position)
{
if (OrderType == 1 && cons1 == position)
{
Symbol1Filled = true;
return (true);
}
else
{
return (false);
}
}
What is the type and how do I compare it to an integer?
Thank you!
Folls

Comment