Backtester problem with Phoenix.

 
Hi,

I was backtesting Phoenix_4_CONTEST expert from ATC, and there is one problem. A trade opened on 10th November. This is what I get from backtester:

45 2006.11.10 08:45 sell 23 5.00 117.57 118.41 117.15
46 2006.11.17 05:36 s/l 23 5.00 118.41 118.41 117.15 -4038.53 26937.91

Take profit is set to 117.15, and on the contest account it is hit on 13.11.2006@2:40 (ticket 4343340). When I look on a chart with generated ticks I see that minimum price was 117.12, and spread is 3 pips, so TP should be hit like on the contest account. But is isn't! This one trade makes a lot of difference when comparing Phoenix results from contest with backtester. Is this something that I'm doing wrong or something wrong with backtester?
 
What the build number do You use?
 
What the build number do You use?

200, 14 Nov 2006

Moreover, I've printed bid and ask's and there are 117.15 Asks 6 times. TP is simply not fired, just like with less honest brokers ;)
 
Is historical data from the MetaQuotes server?
 
Try to print the price and tp with more presicion using stdlib functionality:
#include <stdlib.mqh>

...

   Print("Ask/Bid ", DoubleToStrMorePresicion(Ask, 16), "/", DoubleToStrMorePresicion(Bid, 16), ", SL/TP ", DoubleToStrMorePresicion(OrderStopLoss(), 16), "/", DoubleToStrMorePresicion(OrderTakeProfit(), 16));


There might be a problem with double comparison in MT if tp is a tad (~0.000000000000001 for example) higher than the price.


 
Is historical data from the MetaQuotes server?

I did not downloaded data as I had all of them from beginning of championship. So this are just data which were loaded from MetaQuotes demo server.
 
Try to print the price and tp with more presicion using stdlib functionality:
#include <stdlib.mqh>

...

   Print("Ask/Bid ", DoubleToStrMorePresicion(Ask, 16), "/", DoubleToStrMorePresicion(Bid, 16), ", SL/TP ", DoubleToStrMorePresicion(OrderStopLoss(), 16), "/", DoubleToStrMorePresicion(OrderTakeProfit(), 16));


There might be a problem with double comparison in MT if tp is a tad (~0.000000000000001 for example) higher than the price.




I have no influence how backtester does its comparision. Slawa does ;) Personally, in all my EAs I convert first everything to integers with MathRound(double/Point), and then back again int*Point when interfacing to trading functions. I think it would be great if we have also set of integer trading functions. Eg IntSendOrder(), IntAsk, etc.
 
Anyone from MetaQuotes cares to address this backtester issue? Thanks.
 
I've reproduced this problem. Thanx. Will investigate.
 
There was different stops normalization in the server and in the tester. This tp should be closed just on peak (bravo)

Normalization in the tester fixed. Download updated build.
 
There was different stops normalization in the server and in the tester. This tp should be closed just on peak (bravo)

Normalization in the tester fixed. Download updated build.

Thanks a lot.
Reason: