Page 1 of 1

How to close order at a given price

PostPosted: Thu Oct 13, 2016 12:28 pm
by bharanimani
I see how to close a position at market, is there a way to close a position at a given price. I see to create a order with "O" type will create position for a given price. I want the same for closing the position.

Re: How to close order at a given price

PostPosted: Tue Oct 18, 2016 8:34 am
by Apprentice
You can use this approach.
Create loops of all open positions.
Check individual position open price.
If position open price is in given range close position.