Closed kylerberry closed 6 years ago
doesn't properly calculate some things when a buy is partially filled. It uses the last filled order as the position size, when realistically the position size is the combination of all the previosly partial filled buys:
example series of orders that would reproduce:
[ { size: '1', side: 'buy', price: '100'}, { size: '.5', side: 'buy', price: '100'} { size: '.5', side: 'buy', price: '100'} { size: '.5', side: 'sell', price: '110'} ]
you can see that the last order, a sell should be size 2 but instead is size .5 of the last buy in the sequence
2
.5
probably affected methods:
resolved by https://github.com/kylerberry/JACT/pull/31
doesn't properly calculate some things when a buy is partially filled. It uses the last filled order as the position size, when realistically the position size is the combination of all the previosly partial filled buys:
example series of orders that would reproduce:
you can see that the last order, a sell should be size
2
but instead is size.5
of the last buy in the sequenceprobably affected methods: