Sell an indicator for the strategy tester

 

Hi everybody. I developed an indicator to practice manuial trading on the strategy tester. it let the user do trading at a faster speed, thanks to the strategy tester use, buying, selling, placing the stop loss and administering a little capital in terms of pips. The problem is, being an indicator for the strategy tester there is no limit to use it. How can I sell it? Thanks

 
Daniele Nerstini: Hi everybody. I developed an indicator to practice manuial trading on the strategy tester. it let the user do trading at a faster speed, thanks to the strategy tester use, buying, selling, placing the stop loss and administering a little capital in terms of pips. The problem is, being an indicator for the strategy tester there is no limit to use it. How can I sell it? Thanks

Even if it is meant for the Strategy Tester, if it is capable of placing trades, then it is not an Indicator, it is an Expert Advisor. Indicators can't trade.

You are already a "seller" and have market products, so you already know how to sell it.

You can sell your EA, classified as an "Utility", for which there are already several such utilities to "trade" in the Strategy Tester, some of which are free.

 
Hi Fernando, thanks for the answer. The problem is this utility has a purpose only on the strategy tester and its useless in live trading, it serves to make experience faster. My point is, if every program is fully working in the demo version on the strategy tester why someone should pay for it? There no need to acquire a licence. Or do demo versions have a time limit?
 
Daniele Nerstini #: Hi Fernando, thanks for the answer. The problem is this utility has a purpose only on the strategy tester and its useless in live trading, it serves to make experience faster. My point is, if every program is fully working in the demo version on the strategy tester why someone should pay for it? There no need to acquire a licence. Or do demo versions have a time limit?

You can detect at run-time what license type is being used ...

ENUM_LICENSE_TYPE

Identifier

Description

LICENSE_FREE

A free unlimited version

LICENSE_DEMO

A trial version of a paid product from the Market. It works only in the strategy tester

LICENSE_FULL

A purchased licensed version allows at least 5 activations. The number of activations is specified by seller. Seller may increase the allowed number of activations

LICENSE_TIME

A version with a limited term license

Maybe you can adjust the functionality depending on whether it is a "purchased" product or a "trial" product.

However, this may violate a Market rule, so please check with the Service Desk, if this is acceptable.

Rules of Using the Market Service
Rules of Using the Market Service
  • www.mql5.com
General Provisions and Conditions of Use service Market
 

As you said, Fernando, I asked the Service Desk for permissions. In the meantime I wrote this line to limit the demo and free versions. Do you reckon it could work?

int OnInit()
  {


if (MQLInfoInteger(MQL_TESTER)) {
time_frame=0;
ENUM_LICENSE_TYPE mql_program=(ENUM_LICENSE_TYPE)MQLInfoInteger(MQL_LICENSE_TYPE);
 switch(mql_program)
     {
      case LICENSE_DEMO:
        {
        if( TimeCurrent() > StringToTime("2023.08.01 00:00:00") && TimeCurrent() < StringToTime("2023.08.31 00:00:00"))
          {time_frame=1;}; break;
        }
        
       case LICENSE_FREE:
        {
        if( TimeCurrent() > StringToTime("2023.08.01 00:00:00") && TimeCurrent() < StringToTime("2023.08.31 00:00:00"))
          {time_frame=1;}; break;
        }
                
      case LICENSE_FULL:
        {
         time_frame=2;
         break;
         }
}

if(time_frame == 0)
          { 
          
               ChartSetInteger(0, CHART_COLOR_BACKGROUND, clrBlack);
               ChartSetInteger(0, CHART_COLOR_FOREGROUND, clrBlack);
               ChartSetInteger(0, CHART_COLOR_ASK, clrBlack);
               ChartSetInteger(0, CHART_COLOR_BID, clrBlack);
               ChartSetInteger(0, CHART_COLOR_CANDLE_BEAR, clrBlack);
               ChartSetInteger(0, CHART_COLOR_CANDLE_BULL, clrBlack);
               ChartSetInteger(0, CHART_COLOR_CHART_LINE, clrBlack);
               ChartSetInteger(0, CHART_COLOR_CHART_UP, clrBlack);
               ChartSetInteger(0, CHART_COLOR_CHART_DOWN, clrBlack);
              
               ChartSetInteger(0, CHART_SHOW_GRID, false);
               ChartSetInteger(0, CHART_SHOW_ASK_LINE, false);
               ChartSetInteger(0, CHART_SHOW_BID_LINE, false);
               ChartSetInteger(0, CHART_SHOW_VOLUMES, false);
               
 
       
           ObjectSetInteger(0,"Label_license1",OBJPROP_BACK,false);
           ObjectCreate(_Symbol,"Label_license1",OBJ_LABEL,0,0,0);
           ObjectSetInteger(0,"Label_license1", OBJPROP_XDISTANCE,20);
             ObjectSetInteger(0,"Label_license1", OBJPROP_YDISTANCE,100);
           ObjectSetInteger(0,"Label_license1", OBJPROP_FONTSIZE,72);
           ObjectSetInteger(0,"Label_license1", OBJPROP_COLOR, clrWhite);
           ObjectSetString(0,"Label_license1",OBJPROP_TEXT,"Sorry, the demo version");
           
            ObjectSetInteger(0,"Label_license2",OBJPROP_BACK,false);
           ObjectCreate(_Symbol,"Label_license2",OBJ_LABEL,0,0,0);
           ObjectSetInteger(0,"Label_license2", OBJPROP_XDISTANCE,20);
             ObjectSetInteger(0,"Label_license2", OBJPROP_YDISTANCE,180);
           ObjectSetInteger(0,"Label_license2", OBJPROP_FONTSIZE,72);
           ObjectSetInteger(0,"Label_license2", OBJPROP_COLOR, clrWhite);
           ObjectSetString(0,"Label_license2",OBJPROP_TEXT,"works only between");          
           
            ObjectSetInteger(0,"Label_license3",OBJPROP_BACK,false);
           ObjectCreate(_Symbol,"Label_license3",OBJ_LABEL,0,0,0);
           ObjectSetInteger(0,"Label_license3", OBJPROP_XDISTANCE,20);
             ObjectSetInteger(0,"Label_license3", OBJPROP_YDISTANCE,260);
           ObjectSetInteger(0,"Label_license3", OBJPROP_FONTSIZE,72);
           ObjectSetInteger(0,"Label_license3", OBJPROP_COLOR, clrWhite);
           ObjectSetString(0,"Label_license3",OBJPROP_TEXT,"2023.08.01 00:00:00");          
           
              ObjectSetInteger(0,"Label_license4",OBJPROP_BACK,false);
           ObjectCreate(_Symbol,"Label_license4",OBJ_LABEL,0,0,0);
           ObjectSetInteger(0,"Label_license4", OBJPROP_XDISTANCE,20);
             ObjectSetInteger(0,"Label_license4", OBJPROP_YDISTANCE,340);
           ObjectSetInteger(0,"Label_license4", OBJPROP_FONTSIZE,72);
           ObjectSetInteger(0,"Label_license4", OBJPROP_COLOR, clrWhite);
           ObjectSetString(0,"Label_license4",OBJPROP_TEXT,"to 2023.08.31 00:00:00.");         
           
           } 

}


and in OnCalculate

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const int begin,
                const double &price[])
  {
  

  if (MQLInfoInteger(MQL_TESTER)) { 
   
   

   if(time_frame == 0)
   {     
   Print("Out of time frame! "+TimeCurrent());
   color clr_labels="clrNONE";
   color clr_buy_label="clrNONE";
   color clr_sell_label="clrNONE";
   color clr_lossLine="clrNONE"; 
   
    ObjectSetInteger(0,"Label_trade", OBJPROP_COLOR, clr_labels);
    ObjectSetInteger(0,"Label_stop_loss", OBJPROP_COLOR, clr_labels);
  ObjectSetInteger(0,"Label_pips", OBJPROP_COLOR, clr_labels);
    ObjectSetInteger(0,"Label_spread", OBJPROP_COLOR, clr_labels);
    ObjectSetInteger(0,"Label_total", OBJPROP_COLOR, clr_labels);
    ObjectSetInteger(0,"Label_speed", OBJPROP_COLOR, clr_labels);
      ObjectSetInteger(0,"Sell_loss_line",OBJPROP_COLOR,clr_lossLine);
      ObjectSetInteger(0,"Buy_loss_line",OBJPROP_COLOR,clr_lossLine);
     ObjectSetInteger(0,"Sell_loss_line",OBJPROP_COLOR,clr_lossLine);
    ObjectSetInteger(0,"Buy_loss_line",OBJPROP_COLOR,clr_lossLine);
      
      


       ChartSetInteger(0, CHART_COLOR_BACKGROUND, clrBlack);
      ChartSetInteger(0, CHART_COLOR_FOREGROUND, clrBlack);
      ChartSetInteger(0, CHART_COLOR_ASK, clrNONE);
      ChartSetInteger(0, CHART_COLOR_BID, clrNONE);
      ChartSetInteger(0, CHART_COLOR_CANDLE_BEAR, clrNONE);
      ChartSetInteger(0, CHART_COLOR_CANDLE_BULL, clrNONE);
      ChartSetInteger(0, CHART_COLOR_CHART_LINE, clrNONE);
      ChartSetInteger(0, CHART_COLOR_CHART_UP, clrNONE);
      ChartSetInteger(0, CHART_COLOR_CHART_DOWN, clrNONE);
     
      ChartSetInteger(0, CHART_SHOW_GRID, false);
      ChartSetInteger(0, CHART_SHOW_ASK_LINE, false);
      ChartSetInteger(0, CHART_SHOW_BID_LINE, false);
      ChartSetInteger(0, CHART_SHOW_VOLUMES, false);
      
      
      
   
   
   
   }
    
   
 
Don't limit by time you will have to update the product constantly 
 
Lorentzos Roussos #:
Don't limit by time you will have to update the product constantly 
The limit should be only for the free or demo version in my intentions, if I wrote the code well. Is that working?
 
Daniele Nerstini #:
The limit should be only for the free or demo version in my intentions, if I wrote the code well. Is that working?

Well if you want them to only test on August of 23 yeah .

You could make it more flexible like , can test from 2months ago till 1month ago . 

 
Lorentzos Roussos #:

Well if you want them to only test on August of 23 yeah .

You could make it more flexible like , can test from 2months ago till 1month ago . 

Yes, but uninstalling and reinstalling would reset the dates, unless you have a solution
 
Daniele Nerstini #:
Yes, but uninstalling and reinstalling would reset the dates, unless you have a solution

Yes but they will have to wait a month before they can train for a new month again :)

The anticipation works in your favor here , in both cases actually , if the desk allows it.
 
Ok, I got what you are saying. Then, I could, for example, limit the program functionality only to the day before so the user will be able to see only one day for every day and not 10 days in a day. Thanks for the suggestion.
Reason: