Support Board
Date/Time: Sat, 23 Nov 2024 17:58:10 +0000
Using a Moving Average of a Data Point
View Count: 1474
[2013-07-24 17:02:07] |
molandes - Posts: 5 |
Hello, I am in the process of transposing my custom indicators created in Ensign to Sierra. This will require the ability to use a moving average as a data point in the calculation of another moving average. For example: [MA_1 - (MA_2(MA_3)] + MA_4 This formula takes MA_1 and subtracts another moving average which uses a third moving average as the data point (MA_2(MA_3) and then finally adds the value of a fourth moving average (MA_4). Can anyone point me into the right direction on how the code would look in Sierra to achieve this? Any documented examples of this would be greatly appreciated as well. |
[2013-07-24 17:32:12] |
Sawtooth - Posts: 4118 |
You can use the Based On function of each study... http://www.sierrachart.com/index.php?l=doc/doc_ChartStudies.html#SettingsandInputsTab ...then use one of the Study Subgraphs studies to add or subtract. MA2 would be Based On MA3 Use the Study Subgraphs Difference study to subtract MA2 from MA1 Use the Study Subgraphs Add study to add the above to MA4 You can Hide Study on the ones you don't need to see. |
[2013-07-24 18:05:33] |
molandes - Posts: 5 |
It worked beautifully! I am officially one step closer to being transposed. Thank you!
|
To post a message in this thread, you need to log in with your Sierra Chart account: