How to close order at a given price

Moderator: admin

How to close order at a given price

Postby bharanimani » Thu Oct 13, 2016 12:28 pm

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.
bharanimani
 
Posts: 12
Joined: Wed Oct 05, 2016 12:59 pm

Re: How to close order at a given price

Postby Apprentice » Tue Oct 18, 2016 8:34 am

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.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 12 guests