Adapt the time filter on my EA

Job ID: 34916959

Budget: $30 – $250 AUD

My Expert Advisor has a filter that will close open trades after X minutes to try and stop the odd trade that might sit for 8 days at a loss, and never recover.

Currently this filter, will allow me to enter X minutes eg 10000 minutes. Any trade still open it shuts.
NOTE it says its closing loss trades, I am not sure if it is only closing loss trades.

So the changes I want is to filter:

1. close trade if in a loss at X minutes or longer ( like it does) , but be able to set in the EA for testing the How much in a loss eg if its above $10.00 loss at X minutes eg $11.00 it will close that trade
2. Close trades in a profit at X minutes, if they are X amount in profit eg If I set 10000 minutes and profit of $10.00 then at 10000 or longer minutes that trade that has been open this long, if its at $11 profit it will close it.
Option 3: Close all trades or leave open all trades
Related categories: C Programming C++ Programming MetaTrader 4