Login Page - Create Account

Support Board


Date/Time: Thu, 31 Oct 2024 10:13:11 +0000



[User Discussion] - How to plot Monday's range

View Count: 1064

[2021-11-07 07:00:18]
User506624 - Posts: 2
I want to plot Monday's range on a chart — high and low of that session — and carry it forward for the following seven days.

It's such a simple thing that there must be an easy way to do it, but I can't seem to find one and have not found the answer either via Google or in this forum. Probably being stupid, but if you could point me in the right direction, that would be fabulous. Thanks!
[2021-11-07 13:34:10]
Sawtooth - Posts: 4103
I want to plot Monday's range on a chart — high and low of that session — and carry it forward for the following seven days.
It can be done with the Spreadsheet Study study.

Try this:
Add the Spreadsheet Study study.
- Set the Chart Region to 1.
- Give it a name in the Spreadsheet Name field.
On the spreadsheet, use these formulas:
Cell K3:
=IF(AND(WEEKDAY(A4)<>2,WEEKDAY(A3)=2),C3,IF(WEEKDAY(A3)=2,MAX(C3,K4),IF(WEEKDAY(A3)<>2,K4,0)))
Cell L3:
=IF(AND(WEEKDAY(A4)<>2,WEEKDAY(A3)=2),D3,IF(WEEKDAY(A3)=2,MIN(D3,L4),IF(WEEKDAY(A3)<>2,L4,0)))

https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#WEEKDAY_Function

It's such a simple thing that there must be an easy way to do it
There is no simpler way.
[2023-04-08 15:50:02]
DayTraderEsad - Posts: 119
There is a more simple way, you can just write a study for in in ASCIL, I wrote it to do just this and also plot the mid. Let me know if you need help with it.
[2023-04-09 14:30:04]
Trader72391 - Posts: 3
There is a more simple way, you can just write a study for in in ASCIL, I wrote it to do just this and also plot the mid. Let me know if you need help with it.

Any chance you could share the code? You can send me a DM. Thanks.
[2023-04-09 16:22:11]
DayTraderEsad - Posts: 119
Attached is the simple quick Mondaymid dll

This was last pulled end of October ---and someone asked to to write a study just to plot the Monday Mid line so that is what I did. Wrote a quick study to plot the Monday Middle Point for the rest of the week for you to have as a reference point. The study itself needs to be applied to your daily historical chart and then just overlay it to whatever charts you want to see the Monday Midpoint
The idea behind it is that price will revisit the Monday Mid close to 80% during the same week and out of that 60% it will test it on Tuesday
This way you dont have to draw it -- it should do it for you - there are no settings and inputs that can be adjusted....only thing that can be changed are the graphics the color and label, line type.
Anyway, there you go

There are some other files, codes, dll's, and charts you can download if that can helps.
Date Time Of Last Edit: 2024-02-09 19:14:37
Private File
[2023-09-18 14:05:55]
svltan - Posts: 6
Hey @DayTraderEsad, any way I could take a look at this code as well. Looking to code something up similar, but for Friday's daily session and contains the the Weekly Open as well? Thanks in advance!

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account