For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Latest posts made by gretzteam
RE: Buy and Hold example - monthly cash being added twice?
Buy and Hold example - monthly cash being added twice?
From the buy and hold blog post:
Buy and Hold
Why is the self.p.monthly_cash added first to self.broker.add, and then again to calculate the target_value for the current order? Isn't this adding the cash twice?
def notify_timer(self, timer, when, *args, **kwargs): # Add the influx of monthly cash to the broker self.broker.add_cash(self.p.monthly_cash) # buy available cash target_value = self.broker.get_value() + self.p.monthly_cash self.order_target_value(target=target_value)