Errors, bugs, questions - page 1751

 
pako:
CHART_BRING_TO_TOP
If not in "TOP".
no. this feature displays the window at the top. but it does not check for a window in the top
 
Vladislav Andruschenko:
no. this feature displays the window at the top. but it does not check for a window in the top

ChartGetInteger()


https://www.mql5.com/ru/forum/42833#comment_1493908

there

the help hasn't changed yet, a year and a half is not a deadline :))

Активный, в данный момент график.
Активный, в данный момент график.
  • www.mql5.com
Есть индикатор на каждом графике.
 

This is not the case at all. A chart may not be at the top but be visible. Or it can be at the top but invisible.

Drawing on a chart only makes sense or not if you know whether it is visible or not.

 
fxsaber:

That's not the case at all. A chart may not be at the top but be visible. Or it can be at the top but not visible.

It only makes sense to draw on a chart if it is known whether it is visible or not.

Try this
 
fxsaber:

That's not the case at all. A chart may not be at the top but be visible. Or it can be at the top but not visible.

Drawing on a chart only makes sense or not if you know whether it is visible or not.

WinApi is your help.
There you can get coordinates and width of charts, plus their z-order - all windows of charts belong to the same WMIClient.
 
pako:
Try this.
Doesn't fit.
 
Sergey Dzyublik:
WinApi is your help.
You can get chart coordinates and width there, plus their z-order - all chart windows belong to the same WMIClient.
Thank you, I'm aware of WinAPI. I will suggest to Service Desk to expand ENUM_CHART_PROPERTY_INTEGER.
 

I use a script to call up the period data. Starting with hourly figures, the numbers are incomprehensible. Or should it be like that?

void OnStart()
  {
Print("Period()=",Period());
  
  }
2016.11.01 16:56:07.466 период (EURUSD,H1)      Period()=16385
2016.11.01 16:55:58.840 период (EURUSD,M30)     Period()=30
2016.11.01 16:55:46.950 период (EURUSD,M1)      Period()=1
 
forexman77:

I use a script to call up the period data. Starting with hourly figures, the numbers are incomprehensible. Or should it be like that?

void OnStart()
  {
Print("Period()=",Period());
  
  }
2016.11.01 16:56:07.466 период (EURUSD,H1)      Period()=16385
2016.11.01 16:55:58.840 период (EURUSD,M30)     Period()=30
2016.11.01 16:55:46.950 период (EURUSD,M1)      Period()=1
It's supposed to be like that.
 

Is it the right approach to measure full lap times in the current indicator flow?

#property indicator_chart_window

#property indicator_buffers 0
#property indicator_plots 0

sinput int Amount = 100; // Количество циклов

void OnInit( void )
{
  EventSetMillisecondTimer(1);
}

ulong ArrayMean( const ulong &Array[] )
{
  const int Size = ArraySize(Array);
  
  ulong Sum = 0;
  
  for (int i = 0; i < Size; i++)
    Sum += Array[i];
    
  return((Size > 0) ? Sum / Size : 0);
}

ulong ArrayMin( const ulong &Array[] )
{
  return(Array[ArrayMinimum(Array)]);
}

ulong ArrayMax( const ulong &Array[] )
{
  return(Array[ArrayMaximum(Array)]);
}

#define TOSTRING(A) #A + " = " + (string)(Array##A(Cycles)) + " mcs. "

void CycleComment( void )
{
  static ulong Cycles[];
  static const int Size = ArrayResize(Cycles, Amount);
  
  static ulong PrevTime = GetMicrosecondCount();
  static int i = 0;
    
  Cycles[i] = GetMicrosecondCount() - PrevTime;

  i++;
  i %= Size;
  
  Comment(TOSTRING(Mean) + TOSTRING(Min) + TOSTRING(Max));
    
  PrevTime = GetMicrosecondCount();
}

void OnTimer( void )
{
  CycleComment();
}

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

Something I get a lot on an empty chart (no indicators) - an average of 15ms, a minimum of 5ms. Why is this the case?

Reason: