|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
Order Management |
kiwitraderkl
|
Post subject: Order Management |
Post rating: 0
|
Posted: Tue 31 Jul, 2012, 01:48
|
|
User rating: 0
Joined: Fri 25 Nov, 2011, 02:49 Posts: 17 Location: Malaysia,
|
I have this standard bit of code in my strategy
[code]// PLACE ORDER if (buySign) { if (order == null || !order.isLong()) { closeOrder(order,0); order = submitOrder(OrderCommand.BUY, instrument); isPratillyClosed = false; }
} else if (sellSign) { if (order == null || order.isLong() ) { closeOrder(order,0); order = submitOrder(OrderCommand.SELL, instrument); isPratillyClosed = false; }
Is it possible to have so it only closes a Long/Short and open a Short/Long if the trade is in Negative pips . If trade is positive pip ignore close open opposite
Thanks
|
|
|
|
 |
API Support
|
Post subject: Re: Order Management |
Post rating: 0
|
Posted: Tue 31 Jul, 2012, 07:27
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|