New MetaTrader 4 Client Terminal build 402

 

MetaTrader 4 Client Terminal build 402

  1. Terminal: Fixed timezone correction when uploading history to History Center (F2 key).
  2. Terminal: Fixed display of graphs on scale 1-1 for characters with 5 digits.
  3. Fixed messages on the forum and the kreshlogs.
Thelive update will be available through the LiveUpdate system
 

Problem two.

here's the function:

void MonitorTick()
{   
   string s;
   
   datetime dt=TimeCurrent();
   int y1=TimeYear(dt);
   int m1=TimeMonth(dt);
   int d1=TimeDay(dt);
   string fn=y1+"_"+m1+"_"+d1+"_Monitor_Tick_"+Symbol()+".mon";
         
   {
      handleM=FileOpen(fn,FILE_BIN|FILE_WRITE|FILE_READ);
      if (handleM<0) 
      {
         handleM=FileOpen(fn,FILE_BIN|FILE_WRITE);
      }
      else
      {
         s="Time;;Shift "+Symbol()+"\n";
         FileWriteString(handleM,s,StringLen(s));
      }
   }

   s=TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES|TIME_SECONDS)+";;";
   
   s=s+DoubleToStr((Bid-iOpen(NULL,PERIOD_D1,0))/Point,0)+"\n";
   
   {      
      FileSeek(handleM,0,SEEK_END);
      FileWriteString(handleM,s,StringLen(s));
   
      FileClose(handleM);
   }
      
}

In words - at every tick it writes the difference between the current price and the opening price of the day into a file.

At one point it starts writing rubbish to the file. Contents below:

2011.05.12 15:40:50;;2
2011.05.12 15:40:50;;1
2011.05.12 15:40:51;;0
2011.05.12 15:40:51;;1
2011.05.12 15:40:52;;2
2011.05.12 15:40:53;;2
2011.05.12 15:40:55;;3
2011.05.12 15:53:54;;15692
2011.05.12 15:53:54;;15688
2011.05.12 15:54:05;;15692
2011.05.12 15:54:28;;15696
2011.05.12 15:54:42;;15694
2011.05.12 15:54:56;;15698
2011.05.12 15:55:40;;15697
2011.05.12 15:56:40;;15698
2011.05.12 15:56:47;;15696
2011.05.12 15:57:17;;15696
2011.05.12 15:57:34;;15699 

How to explain it????

Expert doesn't do anything else with this function, the code is three lines. stands on 10 instruments, and periodically 5-7 of them give this out. Only resetting the terminal helps. By the way, indicators (multicurrency) start showing nonsense too.

 
dimonsky:

Problem two.

How to explain it????


When you use a construction like.

Bid-iOpen(NULL,PERIOD_D1,0))

is to make sure that there is a bar on the D1 history and that it corresponds to what is expected.

I.e. if you are using the opening price of the current daily bar, you need to make sure that you are using the opening price of Exactly the current daily bar.

P.S.

I suspect it's the same in your multi-currency codes.

 

So it's not enough that you can see the data on the screen?

I have several months' worth of history on the screen. Also, please explain how a tick from a second ago differs from the current tick, when the history is "suddenly" gone, as well as immediately after a reboot, when it "suddenly" appears the second the terminal is switched on and the tick is written further without any glitches.

The same in multi-currency instruments. Even at zero bar, when there is history for all pairs - they are specially opened in other windows to have a 100% history.

 
PapaYozh:


I.e. if you are using the opening price of the current day bar, you need to make sure that you are using the opening price exactly the current daily bar.

strange situation. the chart is open, which naturally shows the current day. a second ago the opening price was there, and disappeared? and with the network disconnected, without internet access , a reboot suddenly helps the terminal find the history?

and what day does it have to be for the difference to be 15000 pips.... ?

 
dimonsky:
strange situation. there is an open chart, which naturally shows the current day. a second ago there was an opening price, and then it disappeared?


I'm not a terminal developer and I can only guess about the connection between the bars in the open windows and the available history.

I have written you how to programme correctly to avoid ambiguities.

 
PapaYozh:


I'm not a terminal developer and I can only guess about the connection between the bars in the open windows and the programmatically available history.

I have written you how to program correctly to avoid ambiguities.


What ambiguity can there be when accessing the opening price of the current day? What other checks do I need?

For the GBPCAD pair, 15000 pips means that all of the history has disappeared by days, including today's. And it has disappeared suddenly, because it was just now.

 
for GBPCAD 15000 pips means that the Bid price = 0 because you did not refresh the quotes with RefreachRates(), or did not use MarketInfo(Symbol(),MODE_BID)
 
xrust:
for GBPCAD 15000 pips means that the Bid price = 0 because you didn't refresh the quotes with RefreachRates(), or you didn't use MarketInfo(Symbol(),MODE_BID)


No, because in this case, the obtained value would be negative (see the formula).

the problem is exactly that the Bid was there, but there was no history. and i'm figuring out the reason why it's not available to the program code, even though there was a second before that history was there.

 

- And I, as of today, (13-05-2011), have not had any update. Is it that my DC is ignoring the new build ?

At any rate, there was no update warning or regular reboot.

 
brici:

- And I, as of today, (13-05-2011), have not had any update. Is it that my DC is ignoring the new build ?

At any rate, there was no update warning or regular reboot.

The update should go through tomorrow. This is a preliminary announcement.