Support Board
Date/Time: Tue, 04 Mar 2025 10:23:16 +0000
Inconsistent calculations with Spreadsheet study
View Count: 608
[2021-11-18 16:13:13] |
Mario Escalante - Posts: 21 |
Good day, SC team, I've been using the following formula in K3 in order to differentiate every new RTH section by returning a "1" at 09:30 am =IF(FRACTIME(A3)=TIME(09, 30, 00,0),1,0) somedays it works somedays it doesn't, IT IS INCONSISTENT can I do something to resolve this? if not, is there any other way to restart my spreadsheet study every day at 9:30 am? thank you for your help |
[2021-11-18 16:27:32] |
John - SC Support - Posts: 38341 |
Refer to the following: Spreadsheet Functions: Serial DateTime Values For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2021-11-18 17:27:58] |
Sawtooth - Posts: 4179 |
can I do something to resolve this?
You must round the timestamp to the millisecond (to remove any floating point imprecision) before you compare it to the millisecond.Try this formula: =MROUND(FRACTIME(A3),1/86400000)=TIME(09,30,00,000) https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#MROUND_Function Spreadsheet Example Formulas and Usage: Formula Equivalents of Serial Date Time Values Working with Spreadsheets: Floating-Point Values and Comparisons When Using the Spreadsheet Study Date Time Of Last Edit: 2021-11-18 17:36:01
|
[2021-11-30 21:51:02] |
Mario Escalante - Posts: 21 |
Solved using: =if(round(fractime(A3),5)=0.39583,1,0) and at least one study that will reset every new RTH, that will create a 09:30:00 value that the formula can interpret to post #3 tried, still inconsistent |
To post a message in this thread, you need to log in with your Sierra Chart account: