Skip to content

1 closed trade -> stats["Return [%]"] vs closed_trade.pl_pct #374

Answered by Benouare
Benouare asked this question in Q&A
Discussion options

You must be logged in to vote

That's a normal, and logical behavior.
Maybe we should add something as stats["cash"] to know the amount of cash that is not used during the trade.
If all trades are closed stats["cash"] == stats["Final equity"]
If a trade is open stats["cash"] != stats["Final equity"] => stats["cash"] = old_stats["cash"]-last_trade.entry_price * last_trade.size


In details :
This issue could happen because of the difference between the global cash vs the effective cost of stocks.

For exemple : I have 10k$ of cash and if i want to put all this amount on a stock that cost 880$ each ("buy" order), it means that i will have 11 stocks with an amount of 9680$ (stats["cash"]=320$).

Let's say that my stock goes …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Benouare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant