The API says:
getOriginalAmount()
Returns original constant amount of the order. The value is set on
order submit and cannot be changed later.
https://www.dukascopy.com/client/javado ... alAmount--But when I test this I get the following result:
20:22:06 checking order jf1aatqo5, state = FILLED, order.getOriginalAmount() = 1.0E-6, order.getAmount() = 1.0E-6, order.getRequestedAmount() = 1.0E-6
20:22:06 checking order jf1aatqo5, state = OPENED, order.getOriginalAmount() = 0.0, order.getAmount() = 1.0E-6, order.getRequestedAmount() = 1.0E-6
20:22:05 checking order jf1aatqo5, state = OPENED, order.getOriginalAmount() = 0.0, order.getAmount() = 1.0E-6, order.getRequestedAmount() = 1.0E-6
20:22:05 checking order jf1aatqo5, state = CREATED, order.getOriginalAmount() = 0.0, order.getAmount() = 0.0, order.getRequestedAmount() = 0.0
read from bottom up.
I simply added this to the onMessage function:
public void onMessage(IMessage message) throws JFException {
IOrder order = message.getOrder();
if (order == null) return;
console.getOut().println("checking order "+order.getLabel()+", state = "+order.getState()+", order.getOriginalAmount() = "+order.getOriginalAmount()+", order.getAmount() = "+order.getAmount()+", order.getRequestedAmount() = "+order.getRequestedAmount());
}
Why is getOriginalAmount set on a fill only?