Assume that I have four open trades.
If the oldest trade has been open for, for example, 100 hours, I want to close that trade and reduce the lot size of the remaining trades by half.
At the moment, I am able to close the oldest trade in my code, but I encounter problems when trying to reduce the volume of the remaining trades, and I cannot correctly implement the desired outcome.
Example:
Before reaching 100 hours:
Trade1 = 0.01
Trade2 = 0.02
Trade3 = 0.04
Trade4 = 0.08
After the oldest trade (Trade1) reaches 100 hours:
Trade1 = Closed
Trade2 = 0.01
Trade3 = 0.02
Trade4 = 0.04
Thank you in advance for your time and support.
nd the test is performed

