We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lean logs should be showing UnrealisedPnl and RealisedPnl in their respective columns.
The logs have these two swapped. An example of the output I'm getting on my server looks like this:
2024-05-08T13:44:01.4882395Z TRACE:: InteractiveBrokersBrokerage.HandlePortfolioUpdates(): Contract: FUT MNQ USD , ConId: 620730945, Position: 0, MarketPrice: 18119.859375, MarketValue: 0, AverageCost: 0, UnrealisedPnl: 87.06, RealisedPnl: 0, AccountName: U########
As you can see, my position is 0, but I'm getting an UnrealisedPnl of 87.06, when this should be in the RealisedPnl column.
Take any position on interactive brokers and then close it. The UnrealisedPnl and RealisedPnl columns will be swapped.
Ubuntu 22.04.4 LTS
master
The text was updated successfully, but these errors were encountered:
I think this might be a bug in IB: we just log the packet: https://github.com/QuantConnect/Lean.Brokerages.InteractiveBrokers/blob/dd264cf3470942151649005e921c129c68747a34/QuantConnect.InteractiveBrokersBrokerage/InteractiveBrokersBrokerage.cs#L2456C59-L2457C10
Log.Trace($"InteractiveBrokersBrokerage.HandlePortfolioUpdates(): {e}");
Sorry, something went wrong.
No branches or pull requests
Expected Behavior
Lean logs should be showing UnrealisedPnl and RealisedPnl in their respective columns.
Actual Behavior
The logs have these two swapped. An example of the output I'm getting on my server looks like this:
As you can see, my position is 0, but I'm getting an UnrealisedPnl of 87.06, when this should be in the RealisedPnl column.
Reproducing the Problem
Take any position on interactive brokers and then close it. The UnrealisedPnl and RealisedPnl columns will be swapped.
System Information
Ubuntu 22.04.4 LTS
Checklist
master
branchThe text was updated successfully, but these errors were encountered: