UPetit / python-binance-profit

Script to submit a buy order followed by an automatic sell OCO order
MIT License
47 stars 15 forks source link

[Feature Request] #24

Open jeet2k123 opened 3 years ago

jeet2k123 commented 3 years ago

for OCO order can we specify

  1. --target with a price value.
  2. --stoploss-price to define precise price value.
  3. --quantity-percent to specify how much percentage to go for OCO order.
UPetit commented 3 years ago

Hello @jeet2k123! Thank you for your suggestion. I'll comment each one of your points:

  1. What you're calling "target" is the selling price of your order if I'm not mistaken. We decided to work with percentages for the OCO sell order because this is usually how people define their exit point for a given trade. As using a raw price can be tricky because of the calculations. The script is actually calculating the selling price automatically based on the --profit (in %) parameter automatically.
  2. Same as above, the stop loss price (or stop limit price) is calculated thanks to the --loss (in %) parameter. The script is calculating the stop limit price for you automatically. However what might miss in the script is the "stop price" (= the trigger). At the moment for the OCO sell order: stop price = stop limit price. This enhancement is mentioned here: #3 .
  3. Indeed the percentage of the wallet to spend would be easier than providing the quantity, I agree :) This is also something that has been suggested many times but I haven't worked on it yet: #6 .

Thank you

jeet2k123 commented 3 years ago
  1. Correct target means selling price. I do a lot of support/resistance calculations and come with some price values for it. I want to include that value as the target instead of having a percentage of the entry price.
  2. Same as above
  3. Yes. To be more specific, selling an hodl coin I want to define the quantity.