Support Board
Date/Time: Wed, 27 Nov 2024 20:47:58 +0000
[User Discussion] - Looking for a possible study
View Count: 1285
[2014-10-06 18:27:44] |
User48557 - Posts: 138 |
I would like to know if there is a study that can draw a horizontal line every Monday once a week at 8:30 am for example. A line that starts on Monday and ends next Monday and so on.
|
[2014-10-06 18:41:02] |
mkata - Posts: 103 |
Initial Balance study might work for you, although you'll want to set the extensions to ignore.
|
[2014-10-06 20:47:50] |
User48557 - Posts: 138 |
I just tried that study it didn't work out, It only takes the high low and middle reading of a certain range, Horizontal line at Time study is the closest I found but it resets daily. I need a weekly reset
|
[2014-10-06 21:52:59] |
mkata - Posts: 103 |
Did you set it to Weekly using only the midline? Here's a screenshot that fulfills your criteria.
|
Untitled.png / V - Attached On 2014-10-06 21:51:48 UTC - Size: 124.07 KB - 373 views |
[2014-10-07 13:36:43] |
User48557 - Posts: 138 |
Close but no cigar.. I just tried to plug that in, but the line that is drawn does not start at exactly the opening price, Its on the same candle but I need it right at the opening price.
|
[2014-10-07 14:01:17] |
Sawtooth - Posts: 4120 |
You can do this with the Spreadsheet Study study. Add the Spreadsheet Study study -Give it a name in the Spreadsheet Name field. -Set the Chart Region to 1 -Set the Draw Style of K(SG1) to Dash -Put this formula in cell K3: =IF(AND(WEEKDAY(A4)=1,WEEKDAY(A3)=2),B3,K4) |
[2014-10-07 14:24:52] |
User48557 - Posts: 138 |
Ok im getting close. I plugged that in and im getting a line that starts Monday at midnight. Is there a way I can set a certain time to start? I am terrible with spreadsheets but your instructions worked so far.
|
[2014-10-07 14:41:52] |
Sawtooth - Posts: 4120 |
Sorry, use this formula instead: =IF(AND(WEEKDAY(A3)=2,A4-INT(A4)<TIMEVALUE("08:30:00"),A3-INT(A3)>=TIMEVALUE("08:30:00")),B3,K4) |
[2014-10-07 15:06:24] |
User48557 - Posts: 138 |
It works now, Good solution, Sorry I have 2 follow up questions. My first question is can I use that study for ''continuous futures contract '' so I can backtest that formula for the last few years. I noticed that study stops after about 2 months. It does not work from beginning to end. Also incase I wanted to change the day to Friday or Sunday how would you tweek that formula?
|
[2014-10-07 15:15:12] |
Sawtooth - Posts: 4120 |
Yes, you can use this spreadsheet study on a continuous contract, and for backtesting. The spreadsheet 'lookback' of 1000 rows will automatically move when doing a Chart Replay or a backtest. If you want to see the line earlier than 2 months back, you can scroll the chart back in time, start a Chart Replay, then click Pause. You can also set the Number of Rows to a larger number, but a very large number might cause some lag in realtime, depending on complexity of the chartbook and/or spreadsheet. Date Time Of Last Edit: 2014-10-07 15:17:43
|
[2014-10-07 15:47:57] |
User48557 - Posts: 138 |
Ok its working now, One last thing im trying to figure out is how to change the day from Monday to Sunday or Friday?
|
[2014-10-07 19:19:17] |
Sawtooth - Posts: 4120 |
Here's the documentation for the WEEKDAY function: http://office.microsoft.com/en-us/excel-help/weekday-HP005209336.aspx?CTT=5&origin=HP005204211 |
To post a message in this thread, you need to log in with your Sierra Chart account: