qtpylib
qtpylib copied to clipboard
[BUG] Find available cash and account value inside strategy.
Been trying for a while now to figure out how to get the cash and account value information from inside the strategy. Been looking through the library code for a while and these functions seem to not exist?
Is there anyway we could get these two features added? Or maybe they already do but it's not obvious?
You can get account details like AvailableFunds etc., by
class Teststrategy(Algo): def on_start(self): account = self.get_account() print(account.get("AvailableFunds"))
get_account method is not documented, it returns dict key value pairs.