Support Board
Date/Time: Wed, 22 Jan 2025 04:25:48 +0000
[Programming Help] - Average for Initial Balance – last 20 (x) days
View Count: 1185
[2018-09-02 11:38:40] |
SayfulA - Posts: 7 |
I would like to know if there’s a way to calculate the average for initial balance (first hour) for the last 20 (or x) days.
|
[2018-09-02 14:17:35] |
Sawtooth - Posts: 4158 |
Try this: 1. Add a chart of the same symbol to your chartbook and set the Start and End times of the day's first hour, with the bar period set to 0-60-0. This will display one bar per day for each day's initial balance. 2. Add the Study Subgraphs Subtract/Difference study, set the 'Input Study 1' to High, and 'Input Study 2' to Low. 3. Add the Moving Average - Simple study, set the 'Based On' to the Study Subgraphs Difference study, set the Input Data to Diff, and set the Length to 20. 4. You can overlay the average onto your trading chart using the Study/Price Overlay study, or you can display the current value on your trading chart using the Text Display For Study From Chart study. |
[2018-09-03 14:16:17] |
SayfulA - Posts: 7 |
Hey Tomgillb, Thank you - works a great. |
To post a message in this thread, you need to log in with your Sierra Chart account: