Skip to content

Commit

Permalink
Merge pull request #570 from Drakkar-Software/dev
Browse files Browse the repository at this point in the history
master merge
  • Loading branch information
GuillaumeDSM authored Sep 13, 2021
2 parents 51ae6ac + d2b58b4 commit 9b1f6ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ $(document).ready(function() {

$("#symbolSelect").select2({
closeOnSelect: false,
placeholder: "Symbol",
maximumSelectionLength: 5
placeholder: "Symbol"
});

init_data_collector_status_websocket();
Expand Down
10 changes: 4 additions & 6 deletions Trading/Mode/dip_analyser_trading_mode/dip_analyser_trading.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,17 +336,15 @@ def _ensure_orders_size(sell_base, sell_max, quantity, sell_orders_count,

@staticmethod
def orders_too_small(min_quantity, min_cost, min_price, sell_price, sell_vol):
return (min_price is not None and sell_price < min_price) or \
(min_quantity is not None and sell_vol < min_quantity) or \
(min_cost is not None and sell_price * sell_vol < min_cost) or \
(min_price is None and min_quantity is None and min_cost is None)
return (min_price and sell_price < min_price) or \
(min_quantity and sell_vol < min_quantity) or \
(min_cost and sell_price * sell_vol < min_cost)

@staticmethod
def orders_too_large(max_quantity, max_cost, max_price, sell_price, sell_vol):
return (max_price and sell_price > max_price) or \
(max_quantity and sell_vol > max_quantity) or \
(max_cost and sell_price * sell_vol > max_cost) or \
(max_price is None and max_quantity is None and max_cost is None)
(max_cost and sell_price * sell_vol > max_cost)


class DipAnalyserTradingModeProducer(trading_modes.AbstractTradingModeProducer):
Expand Down

0 comments on commit 9b1f6ec

Please sign in to comment.