Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 17:42:00 +0000



Post From: based on slope

[2020-07-04 15:46:19]
Sawtooth - Posts: 3976
Since you have so many other things going on, I'll just give you the slope formula for one of the lines, and you can go from there.

Add the Spreadsheet Formula study, put this in the Formula field:
=IF(OR(ID15.SG1>ID15.SG1[-1],AND(ID15.SG1[-2]>=ID15.SG1[-1],ID15.SG1>ID15.SG1[-1])),1,IF(OR(ID15.SG1<ID15.SG1[-1],AND(ID15.SG1[-2]<=ID15.SG1[-1],ID15.SG1<ID15.SG1[-1])),-1,ID16.SG1[-1]))
- where ID16 is the Spreadsheet Formula study.

Up slopes will be 1 and downslopes will be -1.