iTime not returning the current bar open time - page 3

 
Alain Verleyen #:

You need to stop your attitude if you want help on this forum.

You didn't provide working code to reproduce the issue, you didn't answer to question asked by people.

This is a technical forum, we don't need words, we need facts and useful information. Code, logs, settings and the like.

I would argue saying "I don't think there are many telepaths here " is dismissive and and a bad attitude when ample and clear details have been posted already.

Don't play the bureaucrat from Hell. You know as well as me that I don't need to hold your hand. Do you also need me to post pictures of apples to illustrate how 2+2=4?

Please tell me. What burning question have I forgotten to answer?  

Here's code and corresponding log for the visual learners.

Input:

ResetLastError();
Print("GBPCAD ",iTime("GBPCAD",PERIOD_M15,0), " last quote: "+SymbolInfoInteger(GBPCAD,SYMBOL_TIME));
Print("GBPCAD  last error :",ErrorDescription(GetLastError()));

ResetLastError();
Print("GBPNZD ",iTime("GBPNZD",PERIOD_M15,0), " last quote: "+SymbolInfoInteger(GBPNZD,SYMBOL_TIME));
Print("GBPNZD  last error :",ErrorDescription(GetLastError()));

Ouput:

GBPCAD 2023.08.18 02:17:00 last quote: 1692325816
GBPCAD last error :no error

GBPNZD 2023.08.18 02:30:00 last quote: 1692325816 
GBPNZD last error :no error

Edit: edited to avoid confusion

 
dc3463456 #:
I would argue saying "I don't think there are many telepaths here " is dismissive and and a bad attitude

You are mistaken. This is a joke statement. I don't know why you took it negatively

 
dc3463456 #:

Input:

ResetLastError();
Print("GBPCAD ",iTime(GBPCAD,PERIOD_CURRENT,0), " last quote: "+SymbolInfoInteger(GBPCAD,SYMBOL_TIME));
Print("GBPCAD  last error :",ErrorDescription(GetLastError()));

ResetLastError();
Print("GBPNZD ",iTime(GBPNZD,PERIOD_CURRENT,0), " last quote: "+SymbolInfoInteger(GBPNZD,SYMBOL_TIME));
Print("GBPNZD  last error :",ErrorDescription(GetLastError()));

Either this is not the code that you ran to get the output you specified, or what I highlighted are variables.

 
dc3463456 #:

I would argue saying "I don't think there are many telepaths here " is dismissive and and a bad attitude when ample and clear details have been posted already.

Don't play the bureaucrat from Hell. You know as well as me that I don't need to hold your hand. Do you also need me to post pictures of apples to illustrate how 2+2=4?

Please tell me. What burning question have I forgotten to answer?  

Here's code and corresponding log for the visual learners.

Input:

Ouput:


No you didn't provide clear details. Are you thinking people are asking for the pleasure to bother you ?

For the last time I am asking you to change your offensive and unpleasant attitude. And to be respectful with everyone.

 

Vladislav Boyko #:

You are mistaken. This is a joke statement. I don't know why you took it negatively

I was accused of having a bad attitude for essentially the same critique you made. I was not really offended by your statement until then. You at least tried to help, but you guys need to loosen up a bit. 

Vladislav Boyko #:

Either this is not the code that you ran to get the output you specified, or what I highlighted are variables.

Either I forgot the double quotes or what you highlighted are variables. You decide. It doesn't matter. 

Look, I understand it doesn't make sense for any of you either. That's why I suspect my broker.

 

One of the ways to deceive yourself:

void OnStart()
  {
   ResetLastError();
   datetime result1 = iTime("USDCHF",PERIOD_M1,0);
   Print("First request USDCHF M1. Error: ", GetLastError());
   // -------
   datetime notUsed = iTime(Symbol(),PERIOD_M5,0);
   // -------
   ResetLastError();
   datetime result2 = iTime("USDCHF",PERIOD_M1,0);
   Print("Second same request USDCHF M1. Error: ", GetLastError());
   Print("Did the second request give the exact same time: ", result1 == result2);
  }
2023.08.18 05:27:50.321 Test2 EURUSD,M1: Did the second request give the exact same time: true
2023.08.18 05:27:50.321 Test2 EURUSD,M1: Second same request USDCHF M1. Error: 0
2023.08.18 05:27:50.319 Test2 EURUSD,M1: First request USDCHF M1. Error: 4066
 
dc3463456 #:
You decide. It doesn't matter.

How can I decide what you did?😄

Nobody but you knows what you did.

You definitely need telepaths! 😄 😄 😄

 
Vladislav Boyko #:

How can I decide what you did?😄

Because it's irrelevant. It's the same result either way.

Vladislav Boyko #:

One of the ways to deceive yourself:

You're just making stuff up. If I did the same you would go nuts.

Are you trying to distract from the real issue?

 
Alain Verleyen #:

No you didn't provide clear details. Are you thinking people are asking for the pleasure to bother you ?

For the last time I am asking you to change your offensive and unpleasant attitude. And to be respectful with everyone.

What is so hard to understand? 

You sound like a cop who really wants to kill somebody. "Stop resisting!"  Damned if you do, damned if you don't.

Has it ever occured to you that you feel I am "offensive" only because of your own offensive attitude toward me? Please stop trying to create a conflict. We were getting along just fine before you arrived.

If you can't or don't want to help, just stay on the sideline. 

 
dc3463456 #:

Because it's irrelevant. It's the same result either way.

You're just making stuff up. If I did the same you would go nuts.

Are you trying to distract from the real issue?

Here I showed that with a second request, you can get the same incorrect time as with the first request, but the error will no longer be generated.

The code with missing quotes that you showed says that the output you showed was obtained using other code.


This is how you actually did:

Forum on trading, automated trading systems and testing trading strategies

iTime not returning the current bar open time

dc3463456, 2023.08.18 00:32

1. Loop though array or symbols

2. Print(iTime(SYMBOLS[i],PERIOD_CURRENT,0)) 

2. Repeat request for iTime() + repeat call to GetLastError(). The first requests occur in a loop through the array of symbols.

3. To say that point 2 is the problem reproduction code. You have lazily edited the code you provided to look like code to reproduce. But forgot to add quotes. That is, you did not even try to compile the code that you called the code to reproduce.


The problem is that the error occurs in the loop. With the help of the code provided to you, it is not possible to reproduce the error. By the fact that in order to reproduce the error, there should be a loop before the code you provided


[TYPO EDITED]

Reason: