High-Frequency-Trading-Model-with-IB icon indicating copy to clipboard operation
High-Frequency-Trading-Model-with-IB copied to clipboard

AttributeError: 'NoneType' object has no attribute 'realizedPnL' immediately after " python main.py" is executed

Open developeralgo8888 opened this issue 4 years ago • 1 comments
trafficstars

Traceback (most recent call last): File "/home/miniconda3/lib/python3.8/site-packages/eventkit/event.py", line 184, in emit func(obj, *args) File "/developer/Downloads/High-Frequency-Trading-Model-with-IB/models/hft_model_1.py", line 78, in on_tick self.perform_trade_logic() File "/developer/Downloads/High-Frequency-Trading-Model-with-IB/models/hft_model_1.py", line 101, in perform_trade_logic self.print_strategy_params() File "/developer/Downloads/High-Frequency-Trading-Model-with-IB/models/hft_model_1.py", line 127, in print_strategy_params
rpnl=self.pnl.realizedPnL, AttributeError: 'NoneType' object has no attribute 'realizedPnL'

Note sure what is missing in ib_sync or interactive Brokers response.

developeralgo8888 avatar Apr 29 '21 02:04 developeralgo8888

I also meet this problem, whether you solved this problem?

pengfengyong avatar Dec 09 '23 15:12 pengfengyong