psemdel / py-trading-bot

Trading-bot in python using django, vertorbt lib and interactive-brokers
MIT License
141 stars 34 forks source link

who owns which strategy #26

Closed ben1628 closed 1 year ago

ben1628 commented 1 year ago

Looking at the Pfs, it is difficult to see which stock owns which strategy without going through each one of them. Looking at the dbs, I can do

SELECT pfa.id, name, action_id
    FROM public.orders_pf_actions pfa
    inner join public.orders_pf pf
    on pfa.pf_id = pf.id
    order by name, action_id;

Of course, it is a nice to have feature, nothing urgent.

psemdel commented 1 year ago

When thinking of removing the pfs, I wanted to add the "strategy used" into the stock. So it is going in the same direction. Yes, something like that is definitely needed. When I started, there was just a few pf, not 50...

psemdel commented 1 year ago

I fixed the portfolio button (top right of the interface), that I totally forgot with the time (and yes back in the time, there was just one pf for long and one for short). Even on my side it was the mess, so this feature was urgent ;)

ben1628 commented 1 year ago

stock

That's how I do mine in my C# program. Under each section, I can right click add choose which stocks to participate from a list, I can also select which strategies to use. It may not be possible in Django.

ben1628 commented 1 year ago

I fixed the portfolio button (top right of the interface), that I totally forgot with the time (and yes back in the time, there was just one pf for long and one for short). Even on my side it was the mess, so this feature was urgent ;)

Do I have to reload the new dump?

ben1628 commented 1 year ago

Nice...

psemdel commented 1 year ago

No need for new dump.

psemdel commented 1 year ago

stock

That's how I do mine in my C# program. Under each section, I can right click add choose which stocks to participate from a list, I can also select which strategies to use. It may not be possible in Django.

To participate to some strategy?