Coding expiration date for strategy

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #171639 quote
    agdavio
    Participant
    New

    Hi guys not sure if someone can help me. I want to send a strategy to someone but I need to code an expiry date so after 1 month they can’t access any longer. Can anyone help me or point me in right direction. Just need help with code for expiration date.
    Thanks

    #171643 quote
    robertogozzi
    Moderator
    Master

    Since you are asking this, I assume you already know how to protect a strategy.

    Si you only need to set an expiration date in your protected indicator, like this (assuming your RETURNed value is X:

    // your indicator
     .
     .
     . X = ....
    IF Date <= 20291231 THEN    //expires on Dec. 31st 2029
       x = 0
    ENDIF
    RETURN X
    #171644 quote
    robertogozzi
    Moderator
    Master

    Please DO NOT double post.
    I removed the other one.
    Thank you 🙂

    #171650 quote
    agdavio
    Participant
    New

    Apologies for the double post I posted in Spanish and English site I haven’t used a forum before. Thank you for your response but I don’t have a protected indicator I just want to pass my strategy to a colleague but only allow him to use it for 1 month. I’m just not sure what sentence / formula I should insert in the code of the strategy. Its extremely kind of you to respond to me really appreciated.

    #171655 quote
    robertogozzi
    Moderator
    Master

    Strategies cannot be protected, so no expiration is possible.

    Indicators, on the other hand, CAN BE protected, so the solution is to RETURN long/short signals via an indicator CALLed from within your strategy, which will remain open, but only to manage orders and positions.

    Your client will see your strategy but will never know why signals are returned.

    To know more you can read

    https://www.prorealcode.com/topic/prorealcode-marketplace-sell-your-trading-products-to-thousands-of-prorealtime-users/

    https://www.prorealcode.com/topic/call-function-guidance/#post-135323

    https://www.prorealcode.com/topic/hidden-code/

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

Coding expiration date for strategy


General Trading: Market Analysis & Manual Trading

New Reply
Author
author-avatar
agdavio @agdavio Participant
Summary

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

Topic Details
Forum: General Trading: Market Analysis & Manual Trading
Language: English
Started: 06/12/2021
Status: Active
Attachments: No files
Logo Logo
Loading...