I have been a satisfied user for about 15 years
![Very Happy :D](./images/smilies/icon_biggrin.gif)
The management of purchases when you exceed your available capital because it seems that the software considers available money from profit positions not yet closed "Portfolio_OpenPositionProfit"
Let me explain with a practical example:
In portfolio trader setting like the attached "MC" with the Signals "prova":
{********************************************************************************}
if C>0 THEN buy (InitialCapital +Portfolio_NetProfit)/c shares next bar at o;
IF LASTBARONCHART THEN SELL THIS BAR AT C;
{********************************************************************************}
I start with an Initialcapital of 100.000 usd and then:
The oldest symbol AMD is bought in date 19/03/1980 (32989 shares * 3,03=99.956) and sold in date 11 09 2023 and up to here everything is correct. But In date 07 06 1993, the first day of data avilable for the latest symbol ALL, this is bought for 14192 shares at 6,95= 98.687. How is this possible, since all the money was used in the first purchase AMD?
See the attached file "list of Trade"
This happen because the backtester see the money from the Portfolio_OpenPositionProfit available. But this is a mistake because the money is not available until the transaction is closed and the simulation ends up with more invested assets than it could in reality.
I am the one who set up the portfolio trader incorrectly?
Thanks in advance for the help!
Riccardo