Login Page - Create Account

Support Board


Date/Time: Sat, 20 Apr 2024 08:21:01 +0000



Post From: Spreadsheet

[2019-06-21 23:09:21]
Sawtooth - Posts: 3976
Sierra Chart's spreadsheet studies are flexible enough to do what you want and their documentation is extensive enough to answer most questions. The expectation is that the user will apply it and extrapolate it.

Sierra Chart spreadsheet studies are only Excel-similar; they don't support every Function, they have added some non-Excel Functions, and some common Functions use a slightly different syntax, among other differences. You'll need to work within that which is supported. It would be impossible to offer example formulas for every possible scenario. You'll need to use what is provided to get you started, and then do some trial-and-error to learn how to do what you want.

Sierra Chart spreadsheet studies' array is in descending order. Each row is a chart bar, with the current bar in row 3 and earlier bars in rows below.
If you need to compare a previous bar/row's value to the current bar's row, the easiest way is to create a persistent variable so that the previous value is brought to row 3. Here is an example:
Spreadsheet Example Formulas and Usage: Return Last Two Zig Zag Reversal Values

Column J's read-only values only contain the most recent value so it is difficult to use them if you need a value other than the most recent.

Occasionally SC Engineering will add outputs to column J, so it is not recommended to use the blank cells in this column, or column I. Column H is always blank and can be used for user options, and for calculations that are not associated with chart bars.

The example formulas you refer to for cell J28 only work for earlier/later times that don't span midnight, not later/earlier times that do span midnight. Try this formula (the second AND is the significant difference, plus FRACTIME instead of INT):
=AND(J8 = 0, OR(AND(FRACTIME(J41) < TIMEVALUE("17:00:00"), FRACTIME(J41) > TIMEVALUE("15:54:00")), AND(FRACTIME(J41) > TIMEVALUE("08:29:00"), FRACTIME(J41) < TIMEVALUE("09:30:00"))))
This is a variation of the example here:
https://www.sierrachart.com/index.php?page=doc/SpreadsheetExampleFormulasAndUsage.php#DisableTradingOutsideOfRegularTradingHoursAnd2HoursMidday

If you need more help, post again. If your questions become too complex for a forum response, you'll need to contact me directly.