Support Board
Date/Time: Mon, 20 Jan 2025 04:08:26 +0000
how to set time range passing over midnight
View Count: 754
[2018-05-27 10:27:58] |
User30743 - Posts: 365 |
hi, i have some issues trying to set time range that would pass over midnight. lets say i want to calculate mid-price of premarket (starting 15:30 and ending 8:30 the next day). when i set up the starting time at 15:30 and finishing time at 8:30 in my inputs using SetTime/GetTime function, it doesn't really work well. it either calculates from 15:30 till midnight, or it starts calculating from midnight and stops at 8:30. in both cases the result is incorrect because i need to calculate from 15:30 up to 8:30 next day in one go. i know the GetTime function returns int of seconds from midnight so the behaviour kind of makes sense. but i dont know how to set up the range correctly. which function to use or how to combine them.. i tried some others (eg. COMBINE_DATE_TIME etc.) but did not succeed. can you give me a litle hint of how to solve it? Date Time Of Last Edit: 2018-05-27 10:28:35
|
[2018-05-27 19:46:16] |
Sierra Chart Engineering - Posts: 104368 |
We recommend looking at studies like High/Low for Time Period to understand how to work with times in this way.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2018-05-28 20:09:27] |
User30743 - Posts: 365 |
hmm... ok.. well, i dont understand the code in all the details, but did a slight change and it works nicely, thanx a lot!
|
To post a message in this thread, you need to log in with your Sierra Chart account: