Reputation: 5387
I would like to see if the bar close is 8am UTC (for every bar in a strategy) in pinescript.
I figure I can maybe use time_close (although that may not be dynamic). Since this returns a unix timestamp I am a bit at a loss on how to test if the close price was at 8amUTC or not. First step would be to extract time of day from the unix timestamp...
Upvotes: 0
Views: 1959
Reputation: 5387
You can just use the built-in variable 'hour', which returns the closing hour of the current bar.
Upvotes: 0