I'm confused, maybe someone can help me out.
instrument.getMinTradeAmount() – gives the start amount for an instrument
instrument.getTradeAmountIncrement() – gives the increment
For EURUSD that is 1000 and 1.
For XAUUSD that is 1 and 1
For XAGUSD that is 50 and 1.
For DEU.IDX that is 0.1 and 0.1
In Java however I have to give a value related to 1.000.000 for Forex.
engine.submitOrder("label", Instrument.EURUSD, OrderCommand.SELL,
0.001);
For EURUSD that is a minimum of 0.001 – the increment however is also 0.001, because 0.001001 gives an error. So increment is not 1 but 1000.
This gets stranger for Coffee or Silver or DEU.IDX.
In the settings things are also different and indices are not mentioned there.
QUESTION: how do I do this without testing for each and every instrument? There must be a logical and programmable way.