Is it possible to put an expiration date on a trading system code without the user being able to see or modify it? If the answer is yes, how?
Thank you
You simply have to clear any signal, in case of expiration, just before the line with RETURN.
Assuming your indicator returns data in a variable named SIGNAL, this is the code to clear it on expiration (say on and after Dec. 31, 2023):
1
2
3
4
5
6
7
.
.
.
IFDate>=20231231THEN
Signal=0
ENDIF
RETURNSignalAS"My Signal"
to make an indicator hidden you’ll have to export it selecting one of the two options that prevent the code from being modified (and read). The last one adds the restriction that it can only be imported once, so that it cannot be shared with someone else nor used on multiple accounts (as from attached pic).
Only indicators can be hidden, so you will have to split the strategy into two parts, an indicator (protected) and a strategy (not protected) which CALLs the indicator fron which to get signals. A better alternative is to use MarketPlace.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue