Login Page - Create Account

Support Board


Date/Time: Tue, 23 Apr 2024 10:13:25 +0000



Running Clock that starts from a trigger and resets with another trigger [SPREADSHEET]

View Count: 339

[2021-07-23 15:18:55]
User355030 - Posts: 163
Is there a way within the spreadsheets to have a running clock start when a trigger is met and then to reset the clock when another trigger fires off?

@SCE
@TOMGILB
[2021-07-23 16:04:18]
Sawtooth - Posts: 3976
Here is an example that you'd need to modify:
Spreadsheet Example Formulas and Usage: Cancel Unfilled Working Order n Minutes After Entry
Spreadsheet Example Formulas and Usage: Cancel an Unfilled Order After n Bars

You'll need to create a persistent value of the time at the first trigger, then reset it at the second trigger.
You can only use FRACTIME(A3) because it's not possible with a spreadsheet study to capture an intrabar time from J41.

You would then compare the persistent FRACTIME at the first trigger with the current FRACTIME of J41.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account