I am seeking to define a TimeSinceSignal condition that returns the time since a variable crosses above 3, but remains above 0. I have tried the ScripterBot, but do not get any results. The Offset seems misplaced, but removing that in the script below still does not yield results.
// Define the condition for TimeSinceSignal to be greater than 3
v1 = TimeSinceSignal() > 3; // TimeSinceSignal greater than 3
// Define the condition for TimeSinceSignal to be less than 1
v2 = TimeSinceSignal() < 1; // TimeSinceSignal less than 1
// Create a signal that is true when TimeSinceSignal crosses above 3
signalCrossAbove3 = SIGNALAFTER(v1, v1 AND OFFSET(v1, OFFSET=1) <= 0); // Signal when it crosses above 3
// Create a signal that is true when TimeSinceSignal falls below 1
signalFallBelow1 = v2; // Signal when it falls below 1
// Count the number of days since the signal crossed above 3 and has not fallen below 1
countDays = ACCSINCESIGNAL(signalCrossAbove3, signalFallBelow1); // Count days since the signal crossed above 3
// Output the count of days
countDays; // This will return the number of days since the condition was met
Many thanks in advance,
Eric