Tester results, incorrect maths?

 

Hi


Please can someone have a look at the attached results from Tester please on the screenshot? The profit / losses on the trades don't quite make sense to me.


If look at trade 1 for example- lots is 0.12 and it takes profit 86.4 pips away from entry. So, that should be a profit of 110 right? The value of Size to 4 decimal places is 0.1274 when I used the Print function to find it. But, even if it was rounded down to 0.12 as Tester shows, the profit should be at least 103?


110 is what I would be expecting as my profit target is 1.1x my stop loss, and my Size value for OrderSend is driven off my stop position.


Any thoughts on what I'm missing?


Thanks

void OrderEntry (int direction)         
   { 
   double spread= 30*Point();
   double LowLow= ND(Low[iLowest(NULL,0,MODE_LOW,8,1)]);
   double HighHigh= ND(High[iHighest(NULL,0,MODE_HIGH,8,1)]);
   double stopLong=ND((MathMax(1*Point(),Ask-LowLow)+spread));
   double profitLong=ND(p1*stopLong);           
   double stopShort=ND((MathMax(1*Point(),HighHigh-Bid)+spread));
   double profitShort=ND(p1*stopShort);
   double minStop=((MarketInfo(Symbol(),MODE_STOPLEVEL)+MarketInfo(Symbol(),MODE_SPREAD))*Point());
   double GBPshort=NormalizeDouble((100*Point()/stopShort),4);
   Print("GBPshort", GBPshort);
   double GBPlong=NormalizeDouble((100*Point()/stopLong),4);
   Print("GBPlong", GBPlong);
   
                 if(direction==0 && OpenOrders(Symbol())==0 && stopLong>minStop && stopLong>100*Point())
                             {OrderSend(Symbol(),OP_BUY,GBPlong,Ask,0,ND(Ask-stopLong),ND(Ask+profitLong),"My order",Magic,0,clrGreen); rolLongA=true;}
                             
                              

                        
                                 if(direction==1 && OpenOrders(Symbol())==0 && stopShort>minStop && stopShort>100*Point())
                                             {OrderSend(Symbol(),OP_SELL,GBPshort,Bid,0,ND(Bid+stopShort),ND(Bid-profitShort),"My order",Magic,0,clrRed); rolShortA=true;}
Files:
eurnzd.png  103 kb
 
lancastersteve:

If look at trade 1 for example- lots is 0.12 and it takes profit 86.4 pips away from entry. So, that should be a profit of 110 right? The value of Size to 4 decimal places is 0.1274 when I used the Print function to find it. But, even if it was rounded down to 0.12 as Tester shows, the profit should be at least 103?

What is the account currency?

 
Keith Watford:

What is the account currency?

Hi Keith

the account currency is gbp. Is the tester results coming back in EUR or NZD therefore? 

 
lancastersteve:

Hi Keith

the account currency is gbp. Is the tester results coming back in EUR or NZD therefore? 

I don't believe that the account currency is GBP, I think that you have it set to USD

Your 86 pips profit x 0.12 lots  would give you 103 NZD, convert that to USD and you get 66.

 
Keith Watford:

I don't believe that the account currency is GBP, I think that you have it set to USD

Your 86 pips profit x 0.12 lots  would give you 103 NZD, convert that to USD and you get 66.

Keith

Appreciate the guide, thanks. It's a spread bet account (so currencies should not matter), but I'm guessing Tester works as if it is a CFD account, given spread bet is not widely used.


thanks again.

 

It's the currency in the testing account that matters. In MT4 the default might be USD, did you check it?


Reason: