For each Closed Trade no working?
-
I'm trying to use the block "For each Closed Trade " en bloc then the formula > in loop > close team.
to find the time to bo last closing trade
unsuccessfully......
imagem.JPG -
I tried this thing and it works for me. But it depends on the datatype of the variable. For Time it's "datatime" normally. What do you want to do with that value?
-
I want to compare the last trade closing time with the opening trade today
-
After trying about 4 different ways I finally finished otherwise hope not to miss the form posted in the forum. But if they finish the forum with a solution to this problem I'll thank very
hugs -
There is pink block "check age", otherwise I would not use Formula blocks, directly using this value in Condition should be enough
-
You mean the (Check age ) ? I tried to use it , but it indicates age.
eg
It remained for 1 hour, 10 seconds , 30 days ....
enough already that I would like to know the closing time only
I am wrong? -
The closing time is easy, somewhere in Condition - (in loop)... or directly with OrderCloseTime(). But this is unix format - the number of seconds since 1.1.1970 http://www.epochconverter.com/
-
I emailed to you....
I have almost the same problem. OrderCloseTime returns an unix Time Stamp. To compare this time later on with the current server time we need to convert wether the close time in a dateTime or the dateTime in a unix ts.
Is there any blöock for that? -
There are obviously 0 blocks for converting, otherwise you will see some category called "Converting" or something.
It looks that now I must think for these things as well... Anyway, just in case, there are some native conversion functions like this one - https://www.mql5.com/en/docs/convert/stringtotime