Apologies if posted before but my search came up negative.
Is there C# code to check whether the Fidelity data is up to date.
I don't want to act on a signal unless it is current as of the most recent trading day.
I can't tell for sure but I have a sneaking suspicion I generated a real trade on "old" data and I want to explicitly make sure by inserting some code.
Size:
Color:
Have you tried
CODE:
Please log in to see this code.
?
Size:
Color:
Can use that, sure. But then there is comparing that with
CODE:
Please log in to see this code.
and checking the days between dates, the holiday schedule, etc....
If someone has already done that, it would be handy or a way of comparing
CODE:
Please log in to see this code.
with some date up there on the Fidelity site to confirm it is the latest date of update
Size:
Color:
You could compare the last bar with the DateOfNextTradingDay() method from Community Components:
CODE:
Please log in to see this code.
Size:
Color:
Great, this works
Thanks for the help
Size:
Color:
Here's my take at it to prevent running the script if the data do no match the last market session date (EOD only).
CODE:
Please log in to see this code.
Size:
Color:
Wow. That's a great script as well.
Thank you
Size:
Color: