Login Page - Create Account

Support Board


Date/Time: Fri, 26 Apr 2024 00:17:34 +0000



[User Discussion] - Hide Indicator based on Slope

View Count: 2199

[2019-02-09 15:36:31]
User798007 - Posts: 9
Is it possible to hide an moving average indicator based on it's slope?

If EMA slope is negative, then hide.

Any help is appreciated.

Thanks.
[2019-02-09 16:12:11]
Sawtooth - Posts: 3976
You could color the negative slope the same as the chart background.

But the proper way to do it is to use the Spreadsheet Study study.
If you want the details of how, post again.
[2019-02-09 16:53:38]
Ackin - Posts: 1865
Hi,

via ACSIL download free dll

Ackin's indicators (SCH users requests for studies) - Update list | Post: 170827

edit:
Study slope control
source: some study (hidden)

control (copies part of the source curve) by slope


Study slope control 2
source: some study (hidden)
output: the same

control (show/hide study) by slope
Date Time Of Last Edit: 2019-02-09 23:49:36
imageslope control.png / V - Attached On 2019-02-09 16:53:24 UTC - Size: 81.69 KB - 661 views
imageslope control2.png / V - Attached On 2019-02-09 17:23:12 UTC - Size: 51.57 KB - 589 views
imageadd study.png / V - Attached On 2019-02-09 23:49:33 UTC - Size: 105.92 KB - 600 views
[2019-02-09 22:57:22]
User798007 - Posts: 9
Thank you both. I need a bit more detail please.
Could both elaborate on your respective approaches?

Thanks.
[2019-02-09 23:37:45]
Sawtooth - Posts: 3976
To do it with a spreadsheet study:
1. Add the Spreadsheet Study study.
- Set the Chart Region to 1.
- Give it a name in the Spreadsheet Name field.

On the Subgraphs tab:
- Set the Draw Style of L(SG2) to 'Line - Skip Zeros' and choose the same color and line size as your EMA.
- Set all other subgraphs to Ignore.
- Press OK and OK.

On the spreadsheet:
- Go here and copy/paste the formula in cell K3:
Spreadsheet Example Formulas and Usage: Formula that Matches the Slope Coloring of a Study Subgraph Line
(this formula will exactly match Sierra's slope coloring).
- Put this in cell L3:
=IF(K3=1,ID1.SG1@3,0)
- The formulas assume your EMA is ID1.SG1; edit all instances of ID1.SG1 to the ID#/SG# of your EMA, if necessary.
- You can minimize the spreadsheet if you want.

2. Hide your EMA study.
[2019-02-10 04:08:46]
User798007 - Posts: 9
Hi Ackin. I can not find the free download - the link to the site is not working for me. Would you be able to link to the free download in this thread, or send it to me via DM?
[2019-02-10 09:15:00]
Ackin - Posts: 1865
to User798007)

Hi,

To access our forum, I will create an access, please write to me what you want as a nickname.

The study is part of the .dll library and is free

My email zyp.sierra@gmail.com
Date Time Of Last Edit: 2021-01-19 19:14:59
[2020-05-29 03:47:47]
User940829 - Posts: 1
Ackin, this is awesome! Can it be modified so that the indicator only paints if the moving averages, for example, have a slope greater than 20 degrees? Basically, any user-definable threshold? Reason being, a slightly positive slope is usually a chop zone to be avoided. Sorry if this already exists somewhere and I am unaware.
[2020-05-29 06:54:12]
Ackin - Posts: 1865
Probably yes... everything is possible .... it should just be at the end of a closed bar, so that the study doesn't flicker like it's at a disco. I'll add to it. Next update...

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account