make a trial version

Created at 09 Sep 2023, 21:02
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
Luxor's avatar

Luxor

Joined 09.04.2023

make a trial version
09 Sep 2023, 21:02


how can I code a trial version. that the user can use just for one day


@Luxor
Replies

PanagiotisChar
11 Sep 2023, 05:26

Hi there,

You would need to integrate a licensing solution to your cBot.


@PanagiotisChar

Luxor
11 Sep 2023, 17:17

how do I make license ?


@Luxor

firemyst
11 Sep 2023, 18:35

Another option you have is the following:

  1. hard code a date in your indicator/bot that's a day or two in the future
  2. check the date in your code against the Server.Time object
  3. if the server's time is > the time you have hard-coded in your code, have your code do nothing. 

Example for a starting point. You'll obviously have to tweak it to fit your needs:

                    if (Server.TimeInUtc > new DateTime(2023, 9, 13))
                       return;
 

Since the cAlgo files are encrypted, nobody should hypothetically be able to crack and adjust your code; and they shouldn't be able to backwards adjust the Server's time either to bypass your time constraint because if they can, Spotware would have a gaping security hole there. 


@firemyst