Trading with absolute amount of money allocated for each trade
thanhuwe8 last edited by thanhuwe8
I have checked all the topics involved in sizers but i cannot find how to do things like :
First, broker.setcash(10000). Then after that i want to allocate 1000 dollar for each trade if the signal is true.
The money spent on each trade will not shrink regardless of my overall portfolio value (fixed 1000 dollar, not percentages).
The way i do everytime is to set size = 1000/data0.close-1 for every buy order.
However it is not fully flexible at several situations.
Is the any other more formal way offered by Backtrader that i can use?
Thank for any help!
ab_trader last edited by
You can probably use target value orders -
Docs - Target orders