Errors, bugs, questions - page 875

 
lordlev:

A quote problem?

There's a trivial code that prints the hours and minutes of a given candlestick:

It ends up with this absurdity:

2012.11.16 18:00:50 Core 1 2000.11.13 00:01:30 0:1

At the same time on the chart, all the candles are there and everything is fine.

Look at the TimeToString() function.
 

The issue is resolved. But another question has arisen - Why does the tester show the wrong time? "2012.11.16 18:00:50 Core 1 2000.11.13 00:01:30 0:1"

 
lordlev:

Then I don't understand you. )) And what is absurd in your result?

For example, I launch this code:

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   MqlDateTime Time;
   TimeCurrent(Time);
   Print(Time.hour," Hours : ",Time.min, " Minute; Datetime: ",TimeCurrent());
  }

And I get this result in the log:

2012.11.16 14:40:26     MiniScript (GBPUSD,H1)  12 Hours : 40 Minute; Datetime: 2012.11.16 12:40:31

//---

That's right. Or what do you want the result to be?

 
lordlev:

The issue is resolved. But another question has arisen - Why does the tester show the wrong time? "2012.11.16 18:00:50 Core 1 2000.11.13 00:01:30 0:1"

What mode are you running the test in? And what settings are you making in the tester?
 
tol64:
In which mode do you carry out the test? And what settings are you making in the tester?
Normal mode. All ticks. EURUSD M1.
 
lordlev:
Normal mode. All ticks. EURUSD M1.

The tester shows everything correctly in this case too. Add on the print output and seconds:

 
tol64:

The tester shows everything correctly in this case too. Add on the print output and seconds:

And you check on this date2000.11.13
 
lordlev:
And you check on this date2000.11.13

It's fine, too:

//---

Yes and your result is correct:

But another question has arisen - Why does the tester show the wrong time? "2012.11.16 18:00:50 Core 1 2000.11.13 00:01:30 0:1"

//---

That is, the tick in the tester came in at Zero hours : One minute : Thirty seconds. And you printed out the hours and minutes. You ended up with 0:1 (Zero hours : One minute).

 
tol64:

It's fine, too:

//---

Yes and your result is correct:

//---

That is, the tick in the tester came in Zero hours : One minute : Thirty seconds. And you printed the hours and minutes. The result is 0:1 (Zero hours : One minute).

I got it... )))) and I didn't see it coming at 1:30.
 

A couple of months ago, maybe more, it slipped out that if you find a fault and report it to servicedesk they might give you a reward ?

Just remembered.