Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 10:24:23 +0000



Post From: How to Draw a Horizontal Line at High and Low of the Previous 3 Bars

[2023-02-21 23:38:03]
User120942 - Posts: 71
Much appreciated @John - SC Support,

The Spreadsheet Formula study is a gem that I will be using more in the future. I used the formula you provided to calculate the High of the last 3 bar and the results are exactly what I wanted.

In case anyone else has the same question. I used 2 separate instances of the Spreadsheet Formula study (1 for the High and 1 for the Low).

The Spreadsheet Formula for the High of the last 3 bars (excluding the current bar):

=MAX(H[-1], H[-2], H[-3])

The Spreadsheet Formula for the Low of the last 3 bars (excluding the current bar):

=MIN(L[-1], L[-2], L[-3])

I set the Number of Bars to Calculate value to 4 to include the current bar and the previous 3 bars.

Then I used Draw Style (Line From End of Chart Left to Right) for both instances with different colors for the High and Low.

Thanks again for pointing me in the right direction @John - SC Support.