How to protect forex indicators by adding trials to them

Learn How to protect forex indicators by adding trials to them. When the trial period is over, the indicators stop working automatically and you can use trials to prevent people from selling your indicators without your permission. You have probably always wanted to share one of your MT4 indicators or expert advisors with a friend or future partner or customer. However you are afraid that without your permission, your software may be shared with other people or sold without you knowing. But today, you are going to prevent this from happening.

How to add a trial feature to forex indicators

Make sure you have this line of code (#property strict) at the start of the forex indicator as shown below. If not, add it. Otherwise the code will not work.

Indicator code

Trial source code:

datetime TrialEndDate = D'23.09.2021'; // <-- date when you want the MT4 indicator to stops
if(TimeCurrent() > TrialEndDate)
   {Print("Trial period has expired!!"); return(-1);}

watch the video below to know how

1 thought on “How to protect forex indicators by adding trials to them”

Leave a Comment