For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Cash management and analyzers
-
I try so simulate some basic cash management, by making calling buy() with different amount on different conditions buy(amount = <amount>).
While debugging I can see that buy is indeed called with the correct amount.
When I run the analyzer though:result = cerebro.run()
result[0].analyzers.ta.get_analysis()I get the exact same results as if I always called buy() without any amount. Any thoughts on this?
-
@hoflz5 try to use 'size' parameter instead of 'amount'. Docs here:https://www.backtrader.com/docu/strategy/
-
@vladisld Thanks for the quick response! That solved my issue.