Skip to content
NEXORA Money & AI

How to Create a Trading Indicator Customers Can Test Before Buying

October 3, 2026 · OYIN ADESOLA · 5 min read · Updated October 12, 2026
Cover graphic for the article: How to Create a Trading Indicator Customers Can Test Before Buying

Last checked: 12 October 2026. This guide draws on the MetaTrader 5 Help pages for Market demo versions and rentals and on MQL5 reference functions for program and account information. Code is a teaching example; compile and test it on a demo account.

Traders are cautious buyers, and they should be. Many have been burned by tools that looked perfect in screenshots and failed on their own chart. Letting customers test your indicator before they pay is the single most effective way to build trust. This guide covers the options available on the MQL5 Market and on your own site, and shows how to build a trial mode into an indicator using MQL5.

What the MQL5 Market already gives you

The MetaTrader 5 help explains that trading robots and indicators on the Market have demo versions that buyers can download before buying, and that demo versions have some limitations. An older MQL5 announcement described the demo as runnable only in the Strategy Tester, not in a live terminal. Check the current rules to see whether that restriction still applies, because it decides what your demo must show. The help pages also say the rent option is another way for buyers to assess a product before buying a full licence, with period and fee set by the developer.

Because the demo may run only in the tester, your product description should tell buyers how to test it: which symbol and timeframe, which date range and which settings to use. A buyer who opens the tester, sees nothing and gives up has not been given a fair trial.

Summary graphic listing the main sections of: How to Create a Trading Indicator Customers Can Test Before Buying

Trial models for your own site

  • Time-limited trial. The full tool works for 7 or 14 days, then stops.
  • Feature-limited version. A free version with fewer symbols, one timeframe or no alerts.
  • Demo-account-only version. The tool works fully, but only on demo accounts, so a buyer can evaluate it with no risk.
  • Money-back guarantee. Not a trial, but it reduces the risk. Define it clearly (see the support article in this series).

The demo-account-only model is popular because it is easy to explain and easy to build, and it gives a full view of how the tool behaves in real market conditions.

Building trial logic in MQL5

MQL5 lets a program ask about its environment. MQLInfoInteger with MQL_TESTER tells you whether it is running in the Strategy Tester. AccountInfoInteger with ACCOUNT_TRADE_MODE tells you whether the account is demo, contest or real. TimeCurrent returns the last known server time, which is harder for a user to change than the computer clock. This example puts a trial mode into an indicator:

#property indicator_chart_window
#property indicator_buffers 0
#property indicator_plots   0

// Trial settings
#define TRIAL_END_DATE   "2026.12.31"   // trial stops after this server date
const bool DEMO_ONLY = true;           // allow only demo accounts

string LBL = "TrialNote";

bool LicenseOk(string &reason)
  {
   // The strategy tester is always allowed, so buyers can evaluate it there.
   if(MQLInfoInteger(MQL_TESTER)) return(true);

   if(DEMO_ONLY &&
      AccountInfoInteger(ACCOUNT_TRADE_MODE) == ACCOUNT_TRADE_MODE_REAL)
     { reason = "Trial version: demo accounts only."; return(false); }

   datetime end = StringToTime(TRIAL_END_DATE);
   if(TimeCurrent() > end)
     { reason = "Trial ended on " + TRIAL_END_DATE + ". Please buy the full version."; return(false); }

   reason = "";
   return(true);
  }

void ShowNote(const string text, const color clr)
  {
   if(ObjectFind(0, LBL) < 0)
     {
      ObjectCreate(0, LBL, OBJ_LABEL, 0, 0, 0);
      ObjectSetInteger(0, LBL, OBJPROP_CORNER, CORNER_RIGHT_UPPER);
      ObjectSetInteger(0, LBL, OBJPROP_ANCHOR, ANCHOR_RIGHT_UPPER);
      ObjectSetInteger(0, LBL, OBJPROP_XDISTANCE, 10);
      ObjectSetInteger(0, LBL, OBJPROP_YDISTANCE, 20);
      ObjectSetInteger(0, LBL, OBJPROP_FONTSIZE, 10);
     }
   ObjectSetString(0, LBL, OBJPROP_TEXT, text);
   ObjectSetInteger(0, LBL, OBJPROP_COLOR, clr);
  }

int OnInit() { return(INIT_SUCCEEDED); }
void OnDeinit(const int reason) { ObjectDelete(0, LBL); }

int OnCalculate(const int rates_total, const int prev_calculated,
                const datetime &time[], const double &open[],
                const double &high[], const double &low[],
                const double &close[], const long &tick_volume[],
                const long &volume[], const int &spread[])
  {
   string reason;
   if(!LicenseOk(reason))
     {
      ShowNote(reason, clrTomato);
      return(rates_total);        // do nothing else: no signals, no buffers
     }
   ShowNote("Trial version", clrOrange);

   // ... the real indicator logic goes here ...
   return(rates_total);
  }

Notes on this design

The code checks the licence on every calculation and returns early when it fails, so a locked indicator draws nothing. It shows a clear message instead of failing silently, because silent failure produces angry emails. The tester is always allowed, which matches how marketplace demos behave and lets a careful buyer test thoroughly. The end date is a constant compiled into the file, which means you build a separate trial file for each trial campaign. This is a deliberately simple approach. A determined person may be able to bypass any check stored inside a file they hold, as the protection article in this series explains.

Make the trial useful

  1. Include a short guide: how to install, which chart settings to use and what each part of the display means.
  2. Give the trial enough time to see the tool in different market conditions. Three days is too short for a swing tool, while two weeks is more reasonable.
  3. Show how many days remain, so the end does not come as a surprise.
  4. Tell trial users what the trial does not include.
  5. Follow up once, politely, near the end of the trial. Do not spam.

Risks of trials

  • Trial copies can be passed around. A demo-only limit and an end date reduce this.
  • A trial raises support requests from people who will never pay. Put the answers in documentation.
  • A trial does not prove profit and should not be advertised as if it did.

What we could not confirm

  • Whether the current MQL5 Market demo is still limited to the Strategy Tester. Check the live rules.
  • That the code compiles without warnings on your build. Compile and test it yourself.

Frequently asked questions

Can a user bypass the date by changing their computer clock? TimeCurrent follows the broker server time, so changing the local clock does not affect it, but other bypass routes may exist.

Should I allow the tester only? It is safe but limited. Many buyers want to see the tool on a live chart.

Key takeaways

Let people test before they pay, explain how to test, use the demo-account and date checks for your own trials and display clear messages instead of silent failure.

Sources checked

  • MetaTrader 5 Help, “How to Purchase an App” and Market demo and rent sections, metatrader5.com
  • MQL5 Reference, MQLInfoInteger, AccountInfoInteger and TimeCurrent, mql5.com

Educational content only — not financial advice. Income and savings results vary and are never guaranteed. How we write

Enjoyed this story?

Get the best stories delivered weekly.

Leave a Reply

Your email address will not be published. Required fields are marked *

Share with