Login Page - Create Account

Support Board


Date/Time: Thu, 06 Feb 2025 00:00:59 +0000



[Programming Help] - Spreadsheet programming - locking one time event

View Count: 776

[2020-04-07 19:11:13]
User183724 - Posts: 191
need to save (freeze) a copy of current line 3 of the

[ID0.SG1] Open  [ID0.SG2] High  [ID0.SG3] Low  [ID0.SG4] Last

when K3 or M3 go from 0 to 1. Don't need to keep after K3/M3 return to 0. could use the same area to store the next occurrence.

I'm working with this Locking the State of a One Time Condition

Spreadsheet Studies Special Tasks

and this

Spreadsheet Example Formulas and Usage: Persistent and Incrementing Variables

Persistent and Incrementing Variables

can't quite get it to work and reset correctly. any assistance appreciated. thx tim
[2020-04-07 19:30:41]
Sawtooth - Posts: 4167
Try this in Q3:

=IF(K3=0,0,IF(AND(K4=0,K3>0),B3,Q4))

This will make the Open price persistent in column Q when K3 goes true, and return to 0 when K3 goes false.

You'll need a separate Formula Column for each of the 4 values.

You can use the shorter B3, C3, D3, E3 instead of ID0.SG1@3, ID0.SG2@3, ID0.SG3@3, ID0.SG4@3
[2020-04-07 23:35:57]
User183724 - Posts: 191
thank you

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

Login

Login Page - Create Account