|
|
Closing a certain number of lots
#453739
08/10/15 14:55
08/10/15 14:55
|
Joined: Apr 2014
Posts: 482 Sydney, Australia
boatman
OP
Senior Member
|
OP
Senior Member
Joined: Apr 2014
Posts: 482
Sydney, Australia
|
I'm trying to get my script to partially close a trade, that is, to close only a certain number of lots. However, the code below closes all open lots. I used the printf statement to check my work and it confirms that the number (lotsOpen_y - targetLots_y) is less than the total lots open, so I presume there is something syntactically incorrect in my code. Just can't figure out what that might be. Both variables are type int. The NFA flag is not set.
if (lotsOpen_y > targetLots_y) {
exitLong(0,0,(lotsOpen_y - targetLots_y));
printf("\nclosing some long y: %d\n", lotsOpen_y - targetLots_y);
}
|
|
|
|