Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void updatePortfolio(Contract contract, double position, double marketPrice, double marketValue, double averageCost, double unrealizedPNL, double realizedPNL, String accountName) {
- DecimalFormat df = new DecimalFormat("0.0000"); // TODO get digit according
- df.setDecimalSeparatorAlwaysShown(true);
- String formatedPosition = df.format(position);
- formatedPosition = formatedPosition.replace(",", ".");
- System.out.println("contract = " + contract.localSymbol() + ", contract.description() = " + contract.description() + ", unrealizedPNL = " + unrealizedPNL + ", formatedPosition = " + formatedPosition);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement