Export Bar Open time
Author: mgrech004
Creation Date: 6/15/2011 4:53 PM
profile picture

mgrech004

#1
I am using a simple Date[bar].ToString("hh:mm") to export the time of a bar to an ascii file. This gives me the time at close of the bar. How do I modify it such that it exports the time at open of the bar?
profile picture

Eugene

#2
You wanted to say HH:mm, right?

By design, WL marks bar with the time at the end of bar. To modify the output, before converting to string subtract the time interval from the DateTime returned by Date[bar]. For example, using .AddMinutes(-x).
profile picture

mgrech004

#3
thanks.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).