Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 708

 
Shurkin:

Hello.

When I am tessellating (terminal MT-4-670, Alt+R), the chart windows are placed in new places each time.

Can you please advise whether it is possible to fix them so that the position of each particular chart on the screen would be constant?



The placement depends on which graph was active at the time the "Mosaic" command was applied.
 
barabashkakvn:


The arrangement depends on which graph was active at the time the "Mosaic" command was applied.


It also depends on the preceding arrangement of the graphs. The algorithm for this dependency is not entirely clear.
 
Shurkin:


And it also depends on the preceding arrangement of the charts. The algorithm for this dependency is not entirely clear.

It's better to set it manually once, as you need it, and it will always open the same way with pixel accuracy!
 

where is the error?

double Level=1.2925;
int i;
double u;
double q=High[1];
double a=Low[1];
for(u=a;u<q;i++)
  {
   u=u+i*Point;
   if(u==Level)
      Alert("Предыдущий бар пересекал уровень");
  }
 
305:

where is the error?

If this piece of code is inserted into the indicator, there will be no error:

int OnCalculate (const int rates_total,      // размер входных таймсерий
                 const int prev_calculated,  // обработано баров на предыдущем вызове
                 const datetime &time[],     // Time
                 const double &open[],       // Open
                 const double &high[],       // High
                 const double &low[],        // Low
                 const double &close[],      // Close
                 const long &tick_volume[],  // Tick Volume
                 const long &volume[],       // Real Volume
                 const int &spread[]         // Spread
                 )
  {
   double Level=1.2925;
   int i;
   double u;
   double q=High[1];
   double a=Low[1];
   for(u=a;u<q;i++)
     {
      u=u+i*Point;
      if(u==Level)
         Alert("Предыдущий бар пересекал уровень");
     }
   return(prev_calculated);
  }
 
I have a simple script, but it doesn't give out anything. The alert doesn't pop up
 
barabashkakvn:


If you have a script then:

double q=High[1]; // массив High не объявлен - компиляции не будет
double a=Low[1];  // массив Low не объявлен - компиляции не будет
You need to declare arrays, initialise them (fill them in).

Since when is it necessary to declare standard timeseries? And are values of double expressions allowed in the loop, as in the example above? And that's not how the counter is built for the loop.
 

About initialisation - confused with "five".

But you cannot compare two values of double type directly. Perhaps there is an error here. Real types (double, float)

 
It's not even about the types themselves (double, float), it's about the construction of the loop
for(double u=a;u<q; int i++) //i - нигде не инициализирован, всегда ли значение по умолчанию = 0?
 

Hi all! Help me find an error in the code. The point is as follows: all open, let's say 6 of them 4 in profit, 2 in buy (according to the screenshot). Closing is when total profit reaches 1.0 (according to the screenshot). 2 X 2 = 4 locked (they are closed using OrderCloseBy), 2 sells are closed using OrderClose.

The error is as follows: the overlapped orders are closed using OrderCloseBy but the rest of the orders are not closed at all

I do not want to dig in the code, I think the error is here.

line 565 of the code - function to close orders

Code line 92-100 - close all other orders

line 550 of the code - function for counting open orders

I would appreciate any help.


Files: