Leeps-Lab / flow_market

1 stars 1 forks source link

Updating graph during algorithms #7

Open alkngo opened 3 years ago

alkngo commented 3 years ago

After each group of orders is made (the for loop), live._live_send_back (shown below) should send the updated list of buys and sells to each clients to update the graphs. In effect, the clients' graphs would be updating periodically during the algorithm.

Instead, it seems that all live._live_send_back calls don't run until the entire algorithm ends (the while loop), which results in the clients' graph not updating until the entire algorithm is finished.

https://github.com/Leeps-Lab/flow_market/blob/17c1407214ab67b5aa6dde119efc92bec69c1e7b/models.py#L97-L140

I use a similar method to input orders through a file (shown below), but that method runs as expected, so I'm not sure what's causing the issue for the algorithm methods.

https://github.com/Leeps-Lab/flow_market/blob/17c1407214ab67b5aa6dde119efc92bec69c1e7b/models.py#L175-L198

giangd commented 3 years ago

I'm not sure what the correct behavior should look like, so I'm going to tag this for further discussion with Yilin and Alex.

giangd commented 3 years ago

How algorithmic inputs should work

Required parameters

Todo

Buys

Sells