
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Thanks again, but you're really not understanding the issue. Thanks anyway.
How do I filter from all the closed orders, only those that were closed today?
Clearly I have to use something like
if (OrderCloseTime() == TimeCurrent()
But that doesn't work. How do I modify that, so it does work?
There will be hundreds of closed trades with this magic number, and for this symbol........I only want to find those closed today.
i don't know if i understand your nature of problem well.
here is my approach.
i don't know if i understand your nature of problem well.
here is my approach.
Thank you, appreciate the reply.
Yes, that might work. I'll give it go.
Can you explain what that number is. It's coming out as 1520467200 at the moment.
and
how could that be compared to OrderCloseTime()?
Thanks, appreciate any help.
That "number" is datetime start of today. E.G. 2018.03.14 00:00:00 (it cut hours, minutes and seconds)
If you do the same with OrderCloseTime() => OrderCloseTime()-OrderCloseTime()%86400 you get start of day that the order was closed.
And you can compare these two datetime. If the values are equal the order belong to today.
That "number" is datetime start of today. E.G. 2018.03.14 00:00:00 (it cut hours, minutes and seconds)
If you do the same with OrderCloseTime() => OrderCloseTime()-OrderCloseTime()%86400 you get start of day that the order was closed.
And you can compare these two datetime. If the values are equal the order belong to today.
Thanks, that helps. I think I've got it working now.
Try this code to find out which trades are closed today