MyPositionSize = ...(some calculation, result possibly zero, meaning no trade):
EnterLongLimit(0, true, MyPositionSize, MyLimitPrice, "MySigName");
This is screwy behavior if the function is designed this way. A quantiy of zero should mean zero (ie no trade), not a quantiy of 1.
The work around is obvious, ie place the function within a conditional, ie
if (PositionSize != 0)
EnterLongLimit(...);
but I think the right thing to do is fix the function itself.
Comment