mt4 bug?

 

Sorry for my bad english. I will try to explain my problem trought this charts.

this is output chart from tester. Sell order is out of price.

I did download m1 data and h1 data, then I run tester by "every tick".

this is m1 chart I download.

How could this be?

Thanks a lot.

 
How do you open the order? At market price or using Limit/Stop order?
If it is at market price what price value do you put in the OrderSend?

Posting related segment of your mq4 codes could probably help the discussion.
 
 
   if( Bid>HighBand   && NewBar && Trend==DOWN && RangeOK && (lstOrder==BUY || !Alternate))
      {
      if(StopLoss!=0 && TakeProfit!=0) ticket=OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, Bid + StopLoss*Point, Bid-TP*Point, "SELL", MAGICMA, 0, Blue);    
      if(StopLoss==0 && TakeProfit!=0) ticket=OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, 0, Bid-TP*Point, "SELL", MAGICMA, 0, Red);
      if(StopLoss!=0 && TakeProfit==0) ticket=OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, Bid + StopLoss*Point, 0, "SELL", MAGICMA, 0, Red);        
      if(StopLoss==0 && TakeProfit==0) ticket=OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, 0, 0, "SELL", MAGICMA, 0, Red);    
      NewBar=false;
      lstOrder=SELL;
      
      //handle=FileOpen("OpenTrade.csv",FILE_CSV|FILE_WRITE,',');   
      //FileWrite(handle, "SELL",Symbol(),Bid,TimeLocal());
      //FileClose(handle);
     
      }
Order is open at market price. This segment code for open short orders.
 
Make sure it is opened at current market price using RefreshRates() before sending OrderSend().
Simulation may behave differently than real execution, so during testing you can force it to use
exact price by setting Slippage to zero.
 

I insert RefreshRates(), but did not work.

Here is more evidence:

I run "visual mode" and I saw this:

visual mode show bar at 1.1861, then the bar return at you can see first chart

This is m1 chart for 2 Jan 2006 9:00 bar .

Im very confused.

Thanks for your help.

 
Seems to me you are downloading test data from different source than the broker you are connected to.
 

I follow this steps:

1. close all charts

2. download h1 data and m1 data from history (f2) window

3. open offline charts m1 and h1

4. run tester as "every tick"

Since you can see in the graphs the information in m1 and h1 they coincide.

Thanks a lot for your answers.

 

Im not the only one.

'Backtester Bug'

 
Delete all *.hst files , shutdown MT4, run again MT4, download M1 period data on Symbol, convert all other time frames (see period converter) and do back test again.

Never mix historical rates from different sources! Also, fxt and hst extensions files must be contain data from same source.

Reason: