Login Page - Create Account

Support Board


Date/Time: Wed, 15 May 2024 09:16:25 +0000



Post From: Including slope of a line in calc

[2015-01-12 17:29:57]
User20214 - Posts: 24
Hi everyone,
Is there a way to incorporate the formula for a slope (rise over run) into a Sierra equation? I have the following equation which gives me a signal when price turns after three consecutive bars of the same direction, up or down:

=OR(AND(SG3[0]>SG3[-1],SG3[-1]<=SG3[-2],SG3[-2]<=SG3[-3]),AND(SG1[0]<SG1[-1],SG1[-1]>=SG1[-2],SG1[-2]>=SG1[-3]))

This is working fine, but it generates signals also when prices go sideways. I would prefer a signal generated when prices were moving up/down on a 45 degree or greater. So I’m looking to incorporate the slope of a steep line (or ema) into the filter.

Is it even possible to do so with Sierra Charts? I can’t find any thread in the forum on this topic. Perhaps it is too simplistic.
Any ideas?
Thanks in advance.