-
I am getting the following error when I run multi-core optimization.
AttributeError: Can't pickle local object 'GenericCSVData.start.<locals>.<lambda>'
-
Also, how can I close all my open positions or get the total (realized+unrealized) profit after each optimization run? Currently, I am getting only the realized PnL using the following line in the stop function.
round(self.broker.get_value(), 2)
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 Abhay Jindal
-
Error in multi-core optimization
-
Implement stop loss
I am executing a buy (market) order on the next candles opening price after my strategy gives signal to buy. My stop loss is a function of the price at which the order is executed. How should I implement this stoploss in backtrader