lib/bitex_bot/models/sell_closing_flow.rb
# Scale price adding price variation.
# Scale quantity taken new price.
#
# @return [Array[BigDecimal, BigDecimal]]
Scale price adding price variation.
Scale quantity taken new price.
Scale price adding price variation . Scale quantity taken new price .
def next_quantity_and_price
      next_price = desired_price + price_variation
      next_quantity = ((quantity * desired_price) - close_positions.sum(:amount)) / next_price
      [next_quantity, next_price]
    end
def next_quantity_and_price next_price = desired_price + price_variation next_quantity = ( ( quantity * desired_price ) - close_positions . sum ( :amount ) ) / next_price [ next_quantity , next_price ] end
Scale price adding price variation.
Scale price adding price variation .
None
Array[BigDecimal, BigDecimal