beatzxbt / bybit-smm

bybit simple market maker
MIT License
443 stars 141 forks source link

OMS: self.ss.buffer missing #18

Closed AvangardAA closed 4 months ago

AvangardAA commented 4 months ago

Greetings! Wonder why in these lines of code you do such comparison and what is the value to use for it, since there is no self.ss.buffer in SharedState.py? Thanks in advance!

OMS: amend_orders func https://github.com/beatzxbt/bybit-smm/blob/56c803b25b836de459f6876b96f473b7c7cea82c/src/strategy/oms.py#L83C13-L83C59

OMS: 5th check https://github.com/beatzxbt/bybit-smm/blob/56c803b25b836de459f6876b96f473b7c7cea82c/src/strategy/oms.py#L178C13-L178C60

beatzxbt commented 4 months ago

eeek, seems like some old code that i didnt modify. didnt notice this as those fn's werent running (due to the purposeful early return).

from what i can remember, that is checking the absolute difference of the new - old price and comparing it to a buffer. the buffer is based on this impl (https://github.com/beatzxbt/bybit-smm/blob/56c803b25b836de459f6876b96f473b7c7cea82c/src/strategy/oms.py#L63) but instead has an absolute difference (in this case, the spread) which the greater than checks for.

this is old code which should have been depreciated and wasnt meant to be production ready, didnt mean for it to be used :/

the version will soon be depreciated anyway so do check out the alpha branch (https://github.com/beatzxbt/bybit-smm/tree/v.2.0-alpha) for newer iterations of the OMS and how its working so far if you want a better idea!