Login Page - Create Account

Support Board


Date/Time: Tue, 23 Apr 2024 02:46:34 +0000



[User Discussion] - Protecting studycollection with an 'expiration date'

View Count: 460

[2023-01-06 05:06:42]
User61168 - Posts: 344
Hello,

This is my very first request for assistance since I began using Sierra Chart on Oct 1st 2018! I have an algo developed for automated trading using simple alerts only. I know I can password protect each study in the collection. What I am struggling to do is disable the study collection once an expiration date is passed (i.e. prevent the algo from running if it gets stolen or hacked) . I do not want the collection to show any bar data or even run in market replay mode after this expiration date is passed. If there is a simple feature or solution available for use, I would really appreciate it.

I also need to know how to do this in simple alert formula:

1) check the system date (today's date and time and not the current BARDATE and BARTIME). Edit: I know of the NOW() function but need an example
2) How to set the bar color to whatever the chart background color is when a alert condition is met (in essence, conditionally hide the bar color (or entire chart for that matter) to make it invisible when condition is met without selecting the background color for the subgraph in the study)

Thanks for your assistance in advance.

EDIT: moving to user discussion to see if someone has developed a solution.
EDIT1: Please ignore question #1... TODAY()>DATEVALUE("1/31/2023") should do the trick.
Date Time Of Last Edit: 2023-01-06 07:13:02
[2023-01-06 14:06:08]
Sawtooth - Posts: 3976
2) Try this:
Add the Spreadsheet Formula (Bar) study.
- Set the Chart Region to 1.
- Put your expiration formula in all 4 Formula fields:
=TODAY()>DATEVALUE("1/31/2023")

When TRUE, the OHLC values will all have a value of 1, drawing a line at the value of 1.
Date Time Of Last Edit: 2023-01-06 14:28:25
[2023-01-06 17:35:06]
User61168 - Posts: 344
Thanks Tom. I really appreciate it very much. This is not what I am looking for. If today() exceeds the expiration date then I want ALL historical bars loaded in the chart along with all indicators etc to go completely blank and not just the bars past a certain expiration date... in essence 'locking' the entire study collection or chart or chartbook to avoid reverse engineering. Also, my chart type is renko and not a time-based chart.
[2023-01-06 19:50:24]
Sawtooth - Posts: 3976
You could filter each indicator individually with a Spreadsheet Formula study, using the same expiration formula.
You would Hide each indicator, and its value would instead be displayed by the Spreadsheet Formula study, which has the expiration filter.

This would not prevent the user from deleting the Spreadsheet Formula studies, and unhiding the unfiltered indicators.
So I suspect that the only real solution is to create a custom ACSIL study.
[2023-01-06 20:04:08]
bradh - Posts: 854
A custom study can be authorized on a per-user basis, and expiration dates can be applied. When the study expires, it will no longer show any previous signals on the chart. If there are standard indicators you want to add an expiration to, and if the source code has been provided by Sierra Chart, then they can be locked as well. This works with all bar period types. Any method that has the date in the spreadsheet itself complicates having individual dates per user.

While the user can no longer use the studies once the chartbook is reopened after the expiration date, there is no guaranteed way to delete the Study Collection files, as backups could have been done before the deletion.

DM or email me for more information.

brad (at) forgivingcomputers (dot) com
[2023-01-06 20:27:20]
User61168 - Posts: 344
Thanks Brad and Tom.

Brad - I will email you more specifics on what I am trying to accomplish in next month or so... it's much more than complex than what I have written here as far as needing a longer term "universal" solution. I need something that I can plug-n-play into all my live study collections running on a VPS server as I plan to hire couple of remote IT system administrators to manage and monitor these algos and the underlying infrastructure on cloud. To start off, I was just thinking of a simple way to blank out the entire chart, hide all the indicators and then password protect each of the individual studies and put an expiration date in the entries alert study... just to address the risk of someone running off with my algo.

I wish there was a way to create a "read-only" login credential in Sierra Chart that I can give to their IT guys so they don't mess with any chart settings and fudge around.
[2023-01-06 20:32:02]
User61168 - Posts: 344
...This would not prevent the user from deleting the Spreadsheet Formula studies, and unhiding the unfiltered indicators.
So I suspect that the only real solution is to create a custom ACSIL study.

Tom - wouldn't password protecting each of the formula studies prevent the deletion of studies? I hope that is the case otherwise what is the point of doing a password protect if they can just delete the study... I don't get the benefit of this feature.
[2023-01-06 21:10:11]
Sawtooth - Posts: 3976
wouldn't password protecting each of the formula studies prevent the deletion of studies?
TBH, I don't know. If it does, then the workaround should work, albeit clumsily.
[2023-01-29 06:23:00]
User61168 - Posts: 344
Hi Tom, Sierra chart is allowing me to delete a password-protected study within the study collection. The main purpose of password-protected studies is to just hide the underlying study parameters and alert formulas and that's about it. Not a whole lot of practical use of it imo. Introducing a password to protect the entire study collection is what I am looking for and perhaps to also prompt user to enter password every time it is applied to a chart.
[2023-01-29 13:15:37]
Sawtooth - Posts: 3976
Introducing a password to protect the entire study collection is what I am looking for
Sierra Chart is extremely flexible for many things users want to do, but this is one where ACSIL is required.
[2023-01-29 19:26:42]
User61168 - Posts: 344
It's a struggle but I might be overthinking this. Knowing that all password protected studies in a collection could be deleted, I could do the following:
- password protect all studies
- Create a new password protected "Check Expiration" Alert condition (say ID5.SG1 which returns 1 on success) to put background color as "black" to "hide" all bars if today (i.e. server system date and not local desktop system date) is past 2/15/2023. This should "blank out" all bars in history as well as all future bars... something like ServerDateTime>DATEVALUE("02,15,2023"). Could you please help me with this formula to fetch server date? local desktop system clock could be manipulated so it has to be server date.

- in my alert formula for trade entry study, I simply put a criteria ID5.SG1<>1 as a criteria to allow trade entries if today's system date is not past the expiration date.

If ID5 is deleted, then my entry alert condition should result in a error/failure resulting in no live or simulated or replay trades :-)

Edit: Not background color, I mean Color bar. Even if i am unable to "hide" the bars, that fine as setups are coded via alert formulas
Date Time Of Last Edit: 2023-01-29 19:35:23
[2023-01-29 19:50:30]
bradh - Posts: 854
This should "blank out" all bars in history as well as all future bars... something like ServerDateTime>DATEVALUE("02,15,2023"). Could you please help me with this formula to fetch server date? local desktop system clock could be manipulated so it has to be server date.

Hiding the bars on the chart will not remove their values from a spreadsheet study.
[2023-01-29 19:58:54]
User61168 - Posts: 344
Hiding the bars on the chart will not remove their values from a spreadsheet study.
Hi Brad, I am only using Simple Alert formulas which I am trying to protect from reverse engineering. I have gone thru the over-simplification journey of removing all the 50+ studies by converting them into custom formulas so I am not too worried about hiding the visuals. I just want to prevent the algo from executing in a live/simulated/replay modes after a given date.

Edit: Thinking further, I understand now what you are saying Brad. That's a very good point to take into consideration. A single universal password protection at the entire study collection level is required to have a solid protection.
Date Time Of Last Edit: 2023-01-29 22:33:19

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

Login

Login Page - Create Account