How to modify orderlots (lots) in pending order

 

Hi all,

Is it possible to modify orderlots (lots) in pending order ?

eg: to reduce my pending order from 10 lots to 5 lots.

sorry for my english, thanks.

 

Kabayan, your English looks ok!

.

use OrderClose(...,nnLotsWantClosed,...)

1. your original OrderSend(..., xxLots,...) is completely closed.

2. System then creates NEW market order with NEW ticket# for the remaining unclosed lots - being xx-nn Lots

.

btw, IF you are 'interested' in the newly created order that will be listed in TradePool, you must have a magic# attached to the original 'all lot' OrderSend(...,allLots.eg:10,... magic#,...)

Why? Is only totally reliable method to find this newly created remaining lots order. Some may use comment field - some have seen comment field dissappear in new order. Is your choice!

.

Assuming use magic# then a search through TradePool list looking for this magic# will allow you to get the order's ticket#

.

Also... there is issue of error handling. ie, how do you actually 'know' the ClientTerminal received the new remaining lots order details?

line down, server down, ..., waiting ClientTerminal eventually timesout, whatever. Error docs hint at many potential pits can fall into surrounding order management.

locating the order in pool can answer so many questions

.

hth

 

Thank's fbj for your quick answer.

OrderClose(), why it's never cross in my mind. It's simple than close and open new order again.

Our example is to decrease the lots, how about if we want to increase the lots ?. eg: 5 lots to 10 lots.

Is there any easy way like OrderClose() ?

Is TradePool mean Account History ?

Thank's

Reason: