Crypto-Copy-Trader icon indicating copy to clipboard operation
Crypto-Copy-Trader copied to clipboard

How to set custom ratio?

Open reachtarunhere opened this issue 3 years ago • 3 comments

Hi! I understand the default ratio is according to the balance of accounts. I would like to override this and set ratio myself. If this feature is not available can you please point me to the parts of code where the ratio is decided so I can try modifying it.

Thanks a lot!

reachtarunhere avatar Feb 22 '21 10:02 reachtarunhere

Hi. This feature is not available.

  • Exchenge.get_part() - used by the master to determine what percentage of the balance was used to create an order.
  • Exchenge.calc_quantity_from_part() - used by the slave to calculate the specific value of the order amount for sending by each slave. (I recommend doing your case here)

mokolotron avatar Feb 22 '21 18:02 mokolotron

Thanks for the prompt reply. Can you clarify what order.quantityPart means here:

    quantity = self.calc_quantity_from_part(order.symbol, order.quantityPart, order.price, order.side)

is it the amount of coin bought by the master or fraction of the coin bought compared to available balance in master?

reachtarunhere avatar Feb 25 '21 08:02 reachtarunhere

Yes it's a fraction of the coin bought compared to available balance in master.

mokolotron avatar Feb 25 '21 10:02 mokolotron