Closed eldisa closed 3 years ago
yes, that is expected behaviour. if you have a position open, the sizer will return the open size else it will return the cash amount. just write a different sizer if you need that functionality. they are really simple to code.
Greetings,
I have a problem about the OandaV20 sizers.
In my expection, the sizer returns a fixed number after calculating the given params, but it double the size of position when order over two times.
For example with code In the L21-L23 from
btoandav20/btoandav20/sizers/oandav20sizer.py
Assume using
OandaV20CashSizer
with default params:amount=50
In the first order, the sizer calculating the size, because
if position
isfalse
. And the 2nd oder, the size return the current position size, becauseif position
istrue
.However, the size of next orders will accumalte instead of
amount=50