Skip to content

Commit

Permalink
Remove unnecessary ObservableList
Browse files Browse the repository at this point in the history
  • Loading branch information
chimp1984 committed Jan 9, 2021
1 parent ec75216 commit 4e44426
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,10 @@ CandleData getCandleData(long tick, Set<TradeStatistics3> set, long averageUsdPr
Collections.sort(tradePrices);

List<TradeStatistics3> list = new ArrayList<>(set);
ObservableList<TradeStatistics3> obsList = FXCollections.observableArrayList(list);
obsList.sort(Comparator.comparingLong(TradeStatistics3::getDateAsLong));
if (obsList.size() > 0) {
open = obsList.get(0).getTradePrice().getValue();
close = obsList.get(obsList.size() - 1).getTradePrice().getValue();
list.sort(Comparator.comparingLong(TradeStatistics3::getDateAsLong));
if (list.size() > 0) {
open = list.get(0).getTradePrice().getValue();
close = list.get(list.size() - 1).getTradePrice().getValue();
}

long averagePrice;
Expand Down

0 comments on commit 4e44426

Please sign in to comment.