Job finished
Specification
I will need a trade management EA that managements all OPEN trades, Pending trades, the Recent X recent number of OPEN trades, and Oldest X open trades.
Scenrio 1:
Close all OPEN trades that are in profit and also close all pending orders.
Scenario 2:
Close the LAST 3 recent open trades that are in profit and close all pending orders
Scenario 3:
Close the Oldest 3 recent open trades that are in profit and close all pending orders
Scenario 1, Scenario 2, and Scenario 3 should be enabled or disabled and work together at same time.
I will need the follow EA for MT5:
Scenario 1 requirements:
1. EA should work on any currency pairs, crypto pairs and commodities pairs. All three pairs types may be open at the same time.
2. EA will compute all open trades profit
3. Profit for all open trades should be displayed on screen
4. If all Trades are in Profit by certain amount then close all open trades including all pending trades.
5. Profit should be inputted by user
Scenario 2 requirements
1. EA will compute the last X recent open trades total profit. It should be displayed on screen.
2. X can be define the user. It represents the number of most recent trades opened. Please exclude pending trades from calculation.
Example: I will need to know what is the Profit level for last or most recent 5 open trades out 25 open trades.
3. EA will close X recent open trades in profit and all pending orders.
4. EA will also need restrictions on closing X recent trades based on number of open trades. Please exclude pending orders from calculation. The number of open trades for restriction should be a user input.
Example: I have 5 open trades. I do NOT want to close the 3 recent trades in positive profit since I only have 5 open trades in total. If it was 6 total open trades then I would close the last 3 recent trades in profit. User should be able to input the number of trade restriction to use close most recent open trades.
In other words there should a certain amount of total open trades to close X amount recent open trades in profit. If there isn't enough open trades then ignore closing X recent open trades.
8. Profit level for X open trades should be able to be inputted by user.
Scenarion 3
1. Scenario 3 is like Scenario 2 but EA closing the X amount of Oldest trades. Trades should close according to FIFO. The first trade should close first then the second and so on.
Scenario 1, Scenario 2 , and Scenario 3 need to work together.
For example I have 25 open total trades. I also have 2 pending orders. X most recent trades hits it profit level. In this case it is 5 recent open trades. The 5 recent trades are closed including the 2 pending orders. I now have 20 open trades.
The X oldest trades are now in profit. The EA closes 4 trades in profit and all pending orders.
There remaining 16 open trades are closed when total profit is reached.
If the total profit is not reached for 16 remaining open trades then the EA will continue to look to close X amount of recent OPEN trades in profit to close or X amount of oldest to close. The 16 open trades can also be closed by total profit.