Lot sum after EA test / Avoid "Close at Stop"

 
Hello,

Hello,

1. HOW TO GET INFORMATION FROM TRADES GENERATED BY EA TEST ?
Let's test an EA and then "OPEN CHART". On this chart we can see all orders made by the EA.
To get custom information for this test, I would write a script to get the sum of all lots' order? EXAMPLE: 2 trades at 1.0 lot, 2 trades at 5.0 lots -> sum=12 lots. I think we cannot use OrderLots( ) function because trades (generated by EA durring a test) are not stored in the history pool.
So, how to get information on trades displayed in this chart? Could you help me to write the script?

May be, it is easier to get this information (time, price) from Trendline graphical objects, because each Trendline represents a trade. In this case, how to get the lot value of the trade?

2. HOW TO AVOID "STOP AT CLOSE" RESULTS DURING EA TEST ?
My historical data (EURUSD) go from 1st JULY 2004 to 30th NOVEMBER 2006, and I select "Use date" 1st JULY 2004 to 30th JUNE 2006 (24 months) in my Tester settings.
How to avoid the "Close at Stop" we can see at the end of the Results tab in the Tester (for some EA). Why those trades give big loss?

Thanks.
 
1. Analyze closed trades iIn the deinit function. See for example 'How to Evaluate the Expert Testing Results'

2. You can filter closed trades when analyzing (1.) by close time
Reason: