Support Board
Date/Time: Wed, 15 Jan 2025 12:34:51 +0000
[User Discussion] - Standard Deviation of Return on Bar
View Count: 2275
[2015-09-03 06:22:00] |
Acro - Posts: 441 |
Hi, I'm trying to customize the Standard Deviation indicator code so it shows me each bar’s return as a standard deviation of the last 20 bars’ returns. By return of this bar I simply mean Close of this Bar minus the Close of the Previous Bar I just want to understand how I express Close - [Close - 1] as an array for ACSIL purposes/syntax. Forgive my ignorance on ACSIL as I have only done very minor customisation of code within Sierra so far. Thank you for any pointers you have |
[2015-09-03 18:20:23] |
Sierra Chart Engineering - Posts: 104368 |
You really do not need any custom programming for this. Here is a Study Collection that does what you want. It is attached. Refer to the instructions here to use it: https://www.sierrachart.com/index.php?page=doc/doc_DLLUsage.html#UsingStudyCollection Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2015-09-03 18:22:20
|
StandardDeviationOfBarToBarDifference.StdyCollct - Attached On 2015-09-03 18:19:47 UTC - Size: 18.7 KB - 419 views |
[2015-09-04 00:28:30] |
Acro - Posts: 441 |
Thanks. I forgot you had a Bar Difference Study and you could use that as an input for another study - that opens up lots of possibilities. I will make one customisation, which I believe I can do on my own - that is to plot the standard deviation as negative where the bar closes below the previous close and plot it as positive where the bar closes above the previous close. That will make it more useful for my purposes. |
[2015-09-04 02:25:27] |
Acro - Posts: 441 |
Actually, the standard deviation study doesn't do what I thought it did. I was hoping it would show me how the current bar difference is compared to the standard deviation of the last 20 bar differences. It does something different and without unhiding the Bar Difference study I'm not sure what it shows. In the attached image I have unhidden Bar Difference (green and red bars) and also plotted the Standard Deviation as a blue dash line and SD Bands as grey lines. You can see that without also plotting the Bar Difference, the blue line would have not made the news based price spike at 0830 yesterday (ECB Press Conference) stand out from the crowd. Instead the standard deviation bands get me some way toward my goal as you can see that the Bar Difference clearly breaches the two deviation band provided you do plot the Bar Difference. Is there any other study or function I can use to help me make the bar difference stand out from a statistical/standard deviation perspective ?? Thanks |
Screenshot 2015-09-04 10.24.41.jpg / V - Attached On 2015-09-04 02:25:18 UTC - Size: 136.27 KB - 446 views |
[2017-08-15 01:20:48] |
Neo - Posts: 198 |
Hi. I know this is an old post. However, if you wanted to normalize the result. You could use the Z score study using the bar difference as the input based on mean/STD of x length. And then use the Z-Score result as the top/bottom inputs in the deviation bands study, over the same equivalent x length. |
To post a message in this thread, you need to log in with your Sierra Chart account: