Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. @Override
  2. public void updatePortfolio(Contract contract, double position, double marketPrice, double marketValue, double averageCost, double unrealizedPNL, double realizedPNL, String accountName) {
  3. DecimalFormat df = new DecimalFormat("0.0000"); // TODO get digit according
  4. df.setDecimalSeparatorAlwaysShown(true);
  5. String formatedPosition = df.format(position);
  6. formatedPosition = formatedPosition.replace(",", ".");
  7.  
  8. System.out.println("contract = " + contract.localSymbol() + ", contract.description() = " + contract.description() + ", unrealizedPNL = " + unrealizedPNL + ", formatedPosition = " + formatedPosition);
  9.  
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement