Errors, bugs, questions - page 1377

 
Slawa:

That's how you do it.

It's already been pointed out to you at the service desk...

Thank you, I understand that already.
 
Slawa:

That's the way to do it.

According to your answer, does the OBJPROP_TOOLTIP property not belong to the object for which it is set?
 
Комбинатор:
Judging by your answer, does the OBJPROP_TOOLTIP property not belong to the object it is set for?
Since the OBJPROP_TOOLTIP property cannot be set manually to an object via the properties dialog (but only automatically or programmatically), it is not stored in the chart settings.
 
Will pointers to variables of simple types be introduced in MQL? With their help, adapters can be fully used as in STL C++.
 

Hi.

I'm trying to make an LWMA difference indicator built from ticks. I'm trying to make an LWMA difference indicator based on ticks. The 'ticks' - parameter conversion not allowed tk-MM mq4:

'ticks' - parameter conversion not allowed tk-MM.mq4 99 28


//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int i1;

   string symbol=Symbol();
   int bars=Bars;
//---
   datetime time=TimeCurrent();
   double price=Bid;


   for(i1=count_tickper-2;i1>=0;i1--)
     {
      ticks[i1+1]=ticks[i1];
     }
  
 //      ticks[0]=price;
       ticks[0] = 0;
 
    if(count_tickper+1<bars)
     {
      bars=count_tickper;
     }
   for(i1=0;i1<bars;i1++)
     {
 //     TickBuffer0[i1]=ticks[i1];
      

      TickBuffer0[i1]=LWMA(ticks[i1],Fper,i1)-LWMA(ticks[i1],Sper,i1); //-- А здесь ошибка ????
      
      
     }
   TickBuffer0[bars]=2147483647;
   

   return(0);
  }
//+------------------------------------------------------------------+
double LWMA(double & array[],int per,int bar)
{
   double Sum = 0;
   double Weight = 0;
   double llwma = 0;
      for(int i = 0;i < per;i++)
      { 
      Weight+= (per - i);
      Sum += array[bar-i]*(per - i);
      }
   if(Weight>0) llwma = Sum/Weight;
   else llwma = 0; 
   return(llwma);
} 
//-------------------------------------------------------++++++++++++
Files:
tk-MM.mq4  4 kb
 
Dear developers, please add class templates to MQL, because function and method templates have been created, but there are no classes...
 
Yes, and a sfinae and a template! )
 
Комбинатор:
Yes, and a sfinae and a template! )
Class templates are very useful when creating various adapters and containers.
 
Konstantin Karpov:
Dear developers, please add class templates to MQL, because function and method templates have been created, but there are no classes...
We are working on it
 
Slawa:
We are working on it

Yay!!!

Approximately when will the implementation take place? I'm currently writing lists and queues for different types, so I have to start a vegetable garden.

And I'd also like to know,will pointers to variables of simple types be implemented in MQL? You may use them to fully utilize adapters like in STL C++.

Reason: