Login Page - Create Account

Support Board


Date/Time: Thu, 31 Oct 2024 10:12:38 +0000



Post From: How to plot Monday's range

[2021-11-07 13:34:10]
Sawtooth - Posts: 4103
I want to plot Monday's range on a chart — high and low of that session — and carry it forward for the following seven days.
It can be done with the Spreadsheet Study study.

Try this:
Add the Spreadsheet Study study.
- Set the Chart Region to 1.
- Give it a name in the Spreadsheet Name field.
On the spreadsheet, use these formulas:
Cell K3:
=IF(AND(WEEKDAY(A4)<>2,WEEKDAY(A3)=2),C3,IF(WEEKDAY(A3)=2,MAX(C3,K4),IF(WEEKDAY(A3)<>2,K4,0)))
Cell L3:
=IF(AND(WEEKDAY(A4)<>2,WEEKDAY(A3)=2),D3,IF(WEEKDAY(A3)=2,MIN(D3,L4),IF(WEEKDAY(A3)<>2,L4,0)))

https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#WEEKDAY_Function

It's such a simple thing that there must be an easy way to do it
There is no simpler way.