Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 348

 
Sergey Likho:

On the marketplace, paid products are encrypted. It makes sense here.

I copied the MQL4 folder to another computer and found out that free products seem to be encrypted too. It cannot be launched on the new PC. Why is it so?


Free products, where from and where to?

P.S. I don't need to name the products. Just where are the products from ?

 
Sergey Likho:

On the marketplace, paid products are encrypted. It makes sense here.

I copied the MQL4 folder to another computer and found out that free products seem to be encrypted too. It cannot be launched on the new PC. Why did it do that?

It is a good solution. I would do the same for at least two reasons:

- Additional protection against decompilation. If it happens that the products from the market can be decompiled, it will hardly be good for the company's reputation. Even if they are free products. Programmers who make free versions of products with slightly limited functionality to promote paid versions, I think, do not mind additional protection for free versions either.

- So that the copies of free products would not be distributed all over the Internet (including paid products by some enterprising people and without wasting resources, for example on the work of moderators and translators in the market) and users would only go to the company website (in the market) to download the free products and not be distributed all over the Internet. This includes advertising (of the company and its services in general, including other, already paid products) and statistics and much more.

 
Guys. Help out if you know what's going on. This function detects the minimum and maximum values of a candle for a certain period.
   for(i=pos; i<rates_total && !IsStopped(); i++)
     {
      double dmin=1000000.0;
      double dmax=-1000000.0;
      for(k=i-InpKPeriod+1; k<=i; k++)
        {
         if(dmin>low[k])
            dmin=low[k];
         if(dmax<high[k])
            dmax=high[k];
        }
      ExtLowesBuffer[i]=dmin;
      ExtHighesBuffer[i]=dmax;
     }
Can I change it to calculate minimal and maximal values of MA for this period? For example iMA(NULL,60,24,0,1,0,0)
 
Rustam Bikbulatov:
Guys. Please help me, if you know what I mean. This function determines the minimum and maximum values of the candlestick for a certain period. For example iMA(NULL,60,24,0,1,0,0)

Use iMA() instead of low[k] and high[k] where the last parameter should be k

 
Artyom Trishkin:

Use iMA() instead of low[k] and high[k], where last parameter should be k


I've already tried it several times) the indicator does not show what I need.

 
Rustam Bikbulatov:

Already tried and several times) the indicator doesn't show anything at all. thought anyone else knew

You don't show what you've tried...

 
Artyom Trishkin:

You don't show what you've tried...

Right?
   for(i=pos; i<rates_total && !IsStopped(); i++)
     {
      double dmin=1000000.0;
      double dmax=-1000000.0;
      for(k=i-InpKPeriod+1; k<=i; k++)
        {
         if(dmin>iMA(NULL,1,60,0,1,0,k))
            dmin=iMA(NULL,1,60,0,1,0,k);
         if(dmax<iMA(NULL,1,60,0,1,0,k))
            dmax=iMA(NULL,1,60,0,1,0,k);
        }
      ExtLowesBuffer[i]=dmin;
      ExtHighesBuffer[i]=dmax;
     }
 
Rustam Bikbulatov:
Like this?

How about this?

for(i=pos; i<rates_total && !IsStopped(); i++)
     {
      double dmin=DBL_MAX, dmax=0;
      for(k=i-InpKPeriod+1; k<=i; k++)
        {
         double ima=iMA(Symbol(),PERIOD_CURRENT,60,0,MODE_EMA,PRICE_CLOSE,k);
         if(ima<dmin) dmin=ima;
         if(dmax>ima) dmax=ima;
        }
      ExtLowesBuffer[i]=dmin;
      ExtHighesBuffer[i]=dmax;
     }
 
Artyom Trishkin:

How about this?


I haven't tried it that way)

 
Artyom Trishkin:

How about this?


Still not the same on the indicator((( thanks all the same. I'll keep looking into it(