Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 19:17:00 +0000



Suggestion regarding moving average studies

View Count: 1839

[2013-11-04 16:16:50]
Avio - Posts: 14
Hi Admin,
In all moving average studies - can you put an option to exclude the current bar when the MA is drawn?
[2013-11-04 23:02:06]
vegasfoster - Posts: 444
You can accomplish same thing by setting the displacement to 1.
[2013-11-05 13:24:54]
Avio - Posts: 14
I'm following the MA by the coloring based on slope. I don't want to use displacement, because when it's set to 1 the coloring moves 1 bar forward and I don't like that. I want to keep the colors of the MA based on slope without any displacement but be able to have the option not to include the current bar.
[2013-11-05 13:32:59]
Sawtooth - Posts: 3992
You can do it with a spreadsheet study.

=IF(ROW()=3,0,AA3)

where column AA is the MA

Hide the original MA and let the spreadsheet study draw it instead.
[2013-11-05 16:17:32]
Avio - Posts: 14
Vegasfoster and tomgilb, thank you for your suggestions. I'm just wondering if adding the option in "Settings and Inputs" tab to exclude the current bar when drawing the moving average is in Sierra's future plan?
[2013-11-05 21:03:29]
drywater0 - Posts: 85
Avio,
Can you explain how to change the MA color based on slope? I was able to do so in a previous charting package but have been unable to replicate in Sierra, Many thanks in advance.
[2013-11-05 22:57:29]
Avio - Posts: 14
Drywater0,
Once you choose your MA from the "Studies Available" , go to "Settings", open the tab "Subgraphs" (this is the middle tab on top). Go a little bit down that says "Auto-Coloring" and choose "Based on Slope" from the menu. Then you can change colors. Hope that helps.
[2013-11-06 19:04:52]
vegasfoster - Posts: 444
What I was thinkin Avio, I could create a study so you would add the other studies and then hide them, then reference to the other studies from this study, which would plot them without the current bar. I can do it next couple days if that would work for you.
[2013-11-06 20:52:23]
Avio - Posts: 14
Vegasfoster, appreciate your willingness to help. Your idea sounds a little bit complicated but I will give it a try. Thanks again.
[2013-11-08 17:18:35]
vegasfoster - Posts: 444
You're right, it's probably not going to work very well.
[2013-11-08 23:07:09]
Sawtooth - Posts: 3992
Here's a really easy way to not draw the MA at the current bar:

-Add the Color Bar Based On Alert Condition study.
-Set the Based On to the MA
-Set the Output When Condition True to Use Input Data
-Set the Input Data to Avg
-Set the Draw Style and color the same as the MA
-Put this formula in the Alerts tab:
=C[1]
-Hide the MA study
[2013-11-09 04:46:13]
Avio - Posts: 14
Tomgilb, thank you for the idea!!! Your help is highly appreciated. People like you make this Support Board great.

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

Login

Login Page - Create Account