Login Page - Create Account

Support Board


Date/Time: Mon, 07 Jul 2025 03:33:20 +0000



Post From: [Programming Help - Spreadsheet] Column Data Calculation Formula

[2020-02-29 19:00:23]
User183724 - Posts: 194
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