Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 22:39:39 +0000



[Programming Help] - [Programming Help - Spreadsheet] Column Data Calculation Formula

View Count: 479

[2020-02-29 19:00:23]
User183724 - Posts: 183
I have data from a study in row AH. This data is either 0 or price. I need to write a formula that:

compares the most recent closed bar non zero value of AH to the next most recent non zero value AH

if the most recent closed bar value = 0 then results = 0

results = 1 if most recent non zero value is higher than next most recent non zero value

results = 0 if most recent non zero value is equal to or lower than next most recent


if AH 4 (the last closed bar - not the present bar) is greater than 0 and if AH 4 is greater than AH x (look back x rows to the last non zero value) then results is 1 otherwise results is 0. Perform this formula at the beginning of each new bar open.


I've read the example section - Persistent and Incrementing Variables.

Haven't been able to understand how it works. Any assistance appreciated. thx tim
Date Time Of Last Edit: 2020-02-29 19:06:22
[2020-02-29 22:12:20]
Sawtooth - Posts: 3993
Have a look at this example. You should be able to tweak it to get the two values you need. :
Spreadsheet Example Formulas and Usage: Return Last Two Zig Zag Reversal Values
[2020-03-01 00:45:48]
User183724 - Posts: 183
Thank you
[2020-03-04 16:42:45]
Programming_autotrading_phonesup - Posts: 59
I can provide you with support for Programming Help, Alert Formula Configuration for automated trading and backtesting and Remote Assistance services and anything else which is considered outside the scope of the technical support provided by Sierra Chart.

I saw you send me a Direct Message but did not give me permission to reply.

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

Login

Login Page - Create Account