Support Board
Date/Time: Tue, 26 Nov 2024 09:42:03 +0000
[User Discussion] - Study Name for Value # bars ago ?
View Count: 1509
[2014-04-21 14:16:56] |
NRGTrader - Posts: 351 |
I want to plot certain values, e.g., the High or Low, for x bars ago, e.g, 3 days ago. I want the value plotted on the current bar, e.g., day. What study do I use?
|
[2014-04-21 17:50:28] |
Sierra Chart Engineering - Posts: 104368 |
This does not do everything you need, but have a look at the Previous OHLC-Variable Period study.
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 |
[2014-04-21 18:12:08] |
Sawtooth - Posts: 4120 |
You could do it with the Spreadsheet Study study, using Value On High/Value On Low draw styles.
|
[2014-04-21 18:20:12] |
NRGTrader - Posts: 351 |
Support - thanks I had already thought of that option, but it doesn't accomplish the task. any change you could add such an indicator? most charting packages have this built-in. thanks for reply and for considering if possible TomGlib - never used a spreadsheet study so I'm unsure how involved this may be |
[2014-04-22 14:26:32] |
Sawtooth - Posts: 4120 |
Add the Spreadsheet Study study -set the Chart Region to 1 -give it a name in the Spreadsheet Name field -set the Draw Style of (K)SG1 to Value On High -set the Draw Style of (L)SG2 to Value On Low Use these formulas: cell K3: =IF(ROW()=3,INDIRECT(ADDRESS($K$1+3,3)),0) cell L3: =IF(ROW()=3,INDIRECT(ADDRESS($K$1+3,4)),0) cell K1: # of bars ago |
[2014-04-22 14:46:01] |
NRGTrader - Posts: 351 |
Thanks, but obviously i'm doing something wrong. I had in fact tried something similar earlier wtih no success. I just tried your suggestion and when I get to the step of "cell K3" and as soon as I enter the formula, hit return, it disappears
|
[2014-04-22 15:08:27] |
Sawtooth - Posts: 4120 |
Try this: Copy the formula without the '=', then focus the cell, enter '=', then paste the formula. |
[2014-04-22 15:22:14] |
NRGTrader - Posts: 351 |
FYI, clueless here - have NEVER used or attempted to use spreadsheet in SC. I am unable to cut-paste the formula from here to spreadsheet in SC. Highlight, right click, copy, go to cell in SC spreadsheet attempt to "paste" and nothing is entered, whether I do or don't include the "=". I can do the same thing and post to a random Excel sheet without issue. |
[2014-04-22 15:58:47] |
Sawtooth - Posts: 4120 |
Are you using the Non-CLR version of SC? The spreadsheets in this version are not ready for use yet.
|
[2014-04-22 16:23:46] |
NRGTrader - Posts: 351 |
No
|
[2014-04-22 17:46:13] |
Sawtooth - Posts: 4120 |
I don't know what to tell you. You could manually type it in. If you are entering it in an any other row it will disappear when the chart updates. |
[2014-04-22 17:54:37] |
NRGTrader - Posts: 351 |
OK, the formulas are now entered in K3 and L3. The values are correct for today's bar. However, nothing plots on the chart despite having checked value on H and value on L for K and L. Also, this will only plot the last point, correct? I want the values for every bar plotted. UPDATE : OK, I was able to get it to plot now and changed to "point" instead of "value on X". As suspected, only plots last data point. I appreciate your help, but really is a study that should be built into SC. Most charting packages have such a study/indicator. Date Time Of Last Edit: 2014-04-22 18:27:02
|
[2014-04-22 19:35:57] |
Sawtooth - Posts: 4120 |
That requires different formulas. Try this: K3: =INDEX(C$3:INDIRECT("C"&$J$30+2),O3,1) L3: =INDEX(D$3:INDIRECT("D"&$J$30+2),O3,1) O3: =IF(ROW()=3,RIGHT(ADDRESS($K$1+1,1,3)),O2+1) K1: # of bars ago |
To post a message in this thread, you need to log in with your Sierra Chart account: