Expiration date hidden

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #224157 quote
    Tropic
    Participant
    New

    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

    #224168 quote
    robertogozzi
    Moderator
    Master

    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):

     .
     .
     .
    IF Date >= 20231231 THEN
       Signal = 0
    ENDIF
    RETURN Signal AS "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).

    x-4.jpg x-4.jpg
    #224170 quote
    Tropic
    Participant
    New

    Thanks Roberto, but what if it’s a trading system and not an indicator instead?

    As you will know, there you don’t use the RETURN statement except only to plot elements on the graph if I’m not mistaken.

    #224173 quote
    robertogozzi
    Moderator
    Master

    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.

    Here you can find some links and info: https://www.prorealcode.com/topic/hidden-the-strategy-code/#post-223224.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Expiration date hidden


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Tropic @tropic Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzi
2 years, 2 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/22/2023
Status: Active
Attachments: 1 files
Logo Logo
Loading...