Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 553

 
VasiliKolchanov:
Thank you Igor !
 
Igor Makanu:

I have sketched and tested a script which will check the history of closed orders (I don't have a market order right now, you can redo it yourself) and find the last closed order and log the information about it:

result:

21:12:07.558 test EURUSD,H1: Last order closed: day 27, 21h, 17 min

Thank you very much! Igor.
 
VasiliKolchanov:
What does it look like Taras ?

check the current time

string start_session="11:30";
if (TimeCurrent()>=StrToTime(TimeToStr(TimeCurrent(),TIME_DATE)+" "+start_session))
   {
   //началась новая сессия
   
   }
and probably need to add an end of session
 
Taras Slobodyanik:

check the current time

and probably need to add an end of session
Thank youTars!
 
VasiliKolchanov:
Thank youTars!

Just try to give up the old spelling right away.

string start_session="11:30";
if (TimeCurrent()>=StringToTime(TimeToString(TimeCurrent(),TIME_DATE)+" "+start_session))
   {
   //началась новая сессия
   }

It will be easier to switch to MQL5

 
Konstantin Nikitin:

Just try to get rid of the old spelling right away.

It will be easier to switch to MQL5

What would the new spelling of this construction look like?

 
Alekseu Fedotov:

What will this construction look like in the new writing?

It will look as I have written in TimeToStr, StrToTime

'TimeToStr' - function not defined file N N

'StrToTime' - function not defined file N N
get these errors when using
 
Good day to all. tell me whether it is possible to create an indicator that would work on the basis of the data you enter into it? if so, tell me how to do it. thank you in advance.
 
Igroc33:
Good day to all. Can you tell me if it is possible to create an indicator that works based on the data you enter into it? if so, tell me how to do it. thank you in advance

So any indicator works on the data that is entered there. Or is the question something else?

 
there is data but how do I enter it into the indicator?
Reason: