Code Monkey home page Code Monkey logo

Comments (15)

eugeneglova avatar eugeneglova commented on June 26, 2024

from binance-trading-bot.

eugeneglova avatar eugeneglova commented on June 26, 2024

@henesseye

  1. Improvement
    Reduce to Init value
    It would be desirable to have the possibility to execute a reduction to the initial value of the order. Example:
    Long Entry 18500, Size 0.1
    Limit Orders 18200, 18000 with 0.1
    Current position 0.3 with Average Entry 182333.33
    A reduction will sell 0.2 at 182335 (+0.1% due to fees). This reduces the position to the init value of 0.1 at an entry price of 18233. This improves the initial position

what about additional 2 input fields for take profit orders section like
where to place first TP order [0.1%]
size of reduce position [70%] (if 0 no order will be set and it will be use regular TP grid)

so it could be set for different position sizes based on number of limit orders
in your example it will be
tp grid:
[0.3] [1] [5] [0] [0]
[0.25] [1] [5] [0] [0]
[0.15] [1] [5] [0.1] [67]

so when position size will be 0.3 (0.1 + 0.1 + 0.1) it will set first take profit order 0.1% with 67% of pos (0.201) and other 33% will be used 0.15 - 1% regular TP grid so it will use 5 orders TP grid and 1 for reduction

or if you have other vision on this feature please let me know
because I don't think it's required for small size positions

from binance-trading-bot.

henesseye avatar henesseye commented on June 26, 2024

@henesseye

  1. Improvement
    Reduce to Init value
    It would be desirable to have the possibility to execute a reduction to the initial value of the order. Example:
    Long Entry 18500, Size 0.1
    Limit Orders 18200, 18000 with 0.1
    Current position 0.3 with Average Entry 182333.33
    A reduction will sell 0.2 at 182335 (+0.1% due to fees). This reduces the position to the init value of 0.1 at an entry price of 18233. This improves the initial position

what about additional 2 input fields for take profit orders section like
where to place first TP order [0.1%]
size of reduce position [70%] (if 0 no order will be set and it will be use regular TP grid)

so it could be set for different position sizes based on number of limit orders
in your example it will be
tp grid:
[0.3] [1] [5] [0] [0]
[0.25] [1] [5] [0] [0]
[0.15] [1] [5] [0.1] [67]

so when position size will be 0.3 (0.1 + 0.1 + 0.1) it will set first take profit order 0.1% with 67% of pos (0.201) and other 33% will be used 0.15 - 1% regular TP grid so it will use 5 orders TP grid and 1 for reduction

or if you have other vision on this feature please let me know
because I don't think it's required for small size positions

hi, thanks for your reply

I just installed the fix and the reset of the orders are now working. no more market buys/sells. great!
That should work for reducing the position as you mentioned.
but i would try to set the reduce flag on the limit orders entry grid and not on the TP grid. let's say, i set 4 Limit Orders on the entry grid. For example, as soon as order nr. 4 is triggered, it would set a TP Limit order nearly the entry price and reduce the position size to the entered value. i usually set it manually to the entry value or DCA Level 1.
image

from binance-trading-bot.

eugeneglova avatar eugeneglova commented on June 26, 2024

ok, I will try to make it in price grid so you know better where it will be triggered
I see you use almost classic martingale 1 2 2 2 2 2

from binance-trading-bot.

henesseye avatar henesseye commented on June 26, 2024

ok, I will try to make it in price grid so you know better where it will be triggered
I see you use almost classic martingale 1 2 2 2 2 2

yeah, with more dca levels, i use dynamic dca.
i try to calculate the new position size so that the new average price is e.g. 0.3% away from the current price. Therefore the position size for the next DCA order has to be adjusted dynamically as well.
But your tool runs really smooth without any delays. nice one

from binance-trading-bot.

eugeneglova avatar eugeneglova commented on June 26, 2024

btw before bot I created a tool to build orders and calculate profit for DCA
https://eugeneglova.github.io/dca/
however a lot of data which I understand only :-))))

from binance-trading-bot.

eugeneglova avatar eugeneglova commented on June 26, 2024

it will be something like this
so you can use DCA level or percentage and provide where to place TP order for it using percentage or points
image

from binance-trading-bot.

henesseye avatar henesseye commented on June 26, 2024

it will be something like this
so you can use DCA level or percentage and provide where to place TP order for it using percentage or points
image

that looks very good. i'm curious to try out the feature. do i understand it correctly. the third column "reduce at", stands for the distance to the entry price? So at 0.1% a Limit-Sell order is placed above the Entry if I want to reduce the Long-Trade to DCA1 level for example

from binance-trading-bot.

eugeneglova avatar eugeneglova commented on June 26, 2024

@henesseye yes, reduce at will be the distance where you want to place your take profit order with amount of reduce to
so if [0.1%] and [1] and position size is 4 for example and your entry amount is 1 it will add new limit sell order with size 3 and usual take profit order for size 1 (rest of position) at distance from take profit settings. I will add tooltips
image

from binance-trading-bot.

eugeneglova avatar eugeneglova commented on June 26, 2024

https://github.com/eugeneglova/binance-trading-bot/releases/tag/v1.1.11
done

from binance-trading-bot.

henesseye avatar henesseye commented on June 26, 2024

Hi Eugen
Thank you very much for your work. Looks good.
Something caught my eye.
After a Reduce, the existing DCA orders would have to be adjusted. Because by the Reduce to e.g. DCA level 1 the DCA orders would have to be recalculated and set again from this position size. Otherwise the old orders will remain with the wrong position size. Therefore the DCAing must start again from the new level. Here is an example

image

from binance-trading-bot.

eugeneglova avatar eugeneglova commented on June 26, 2024

so based on your screen I think it will work like this
entry pos size 0.003

  1. dca order 0.003: pos size 0.006
  2. dca order 0.003: pos size 0.009
  3. dca order 0.003: pos size 0.012
  4. dca order 0.006: pos size 0.018 and it sets tp order to 0.05% with value of 0.018-0.003=0.015 and rest 0.003 will be second tp order

once order 0.015 filled so position size updated to 0.003 bot will adjust dca limit orders to add 0.003 at 0.08% distance etc
doesn't it work like this for you? I think it should, I will double check as my bot running for many pairs and I started using this feature too

from binance-trading-bot.

henesseye avatar henesseye commented on June 26, 2024

Yes, that's exactly how it should work. with a reduce, the calculation of the dca levels starts again from this level. But this is unfortunately not the case.
Currently, however, the old orders remain, so in this case those (No. 5 / 6) with the value 3x / 2x.
I had to intervene manually. Would be good if you could check this again. otherwise really good work man

from binance-trading-bot.

eugeneglova avatar eugeneglova commented on June 26, 2024

you can always cancel orders and restart pair, but I will double check

from binance-trading-bot.

eugeneglova avatar eugeneglova commented on June 26, 2024

I run ADA long with this settings, I had position size 23 and first TP was 15 and other 8 was 2 2 2 and 2 and next limit order was 24 and 47, after I got TP filled I see it adjusted the grid so now next order is 15 and distance 2.64%

image
image
image

from binance-trading-bot.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.