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

 
Alexey Viktorov:

Line names change and hence a lot of lines.

In such cases it is better to include the bar opening time in the line name.

This still puts "alien" lines on a new bar.

                if(Line) 
                 {
                  Setline(Time[i],Time[b_u_pbu],High[b_u_pbu],Time[b_u_pbu1],High[b_u_pbu],clrLime);
                 }

Can you put lines with coordinates in the buffer?

 
bij:

This still puts "alien" lines on a new bar.

Can the lines with coordinates be buffered?

Try this

if(Line)
  {
   Setline((string)Time[b_u_pbu],Time[b_u_pbu],High[b_u_pbu],Time[b_u_pbu1],High[b_u_pbu],clrLime);
  }
//
void Setline(string sh,datetime tm,double pr,datetime tm1,double pr1,color clr)
  {
   if(ObjectFind("-"+sh) >= 0)
    ObjectCreate("-"+sh,OBJ_TREND,0,tm,pr,tm1,pr1,clr);
   ObjectSet("-"+sh,7,STYLE_SOLID);
   ObjectSet("-"+sh,OBJPROP_RAY,false);
   ObjectSet("-"+sh,OBJPROP_COLOR,clr);
   ObjectSet("-"+sh,OBJPROP_WIDTH,2);
  }
and try not to use numeric values for object properties.
 

Good evening!

There is a question about using the tester in MetaTrader 4. There is such a thing as "Chart mismatch errors". I was looking for a way to fix it, but when I try to load archive data from MetaQuotes server I get a message that "There is no new data for the symbol...". At the same time the table contains data for 15-minute candlesticks only from June 21 till the current moment. I should have downloaded the data since 1999, as it is described on the net. And the discrepancy errors don't disappear. What is wrong and maybe there are alternative solutions?

 
kirson-7:

Good evening!

There is a question about using the tester in MetaTrader 4. There is such a thing as "Chart mismatch errors". I was looking for a way to fix it, but when I try to load archive data from MetaQuotes server I get a message that "There is no new data for the symbol...". However, the table contains data for 15-minute candlesticks only from June 21 till the current moment. I should have downloaded the data since 1999, as it is described on the net. And the discrepancy errors don't disappear. What is wrong and maybe there are alternative solutions?

The data should be downloaded only for M1. All other TFs are deleted(close charts and delete history files from the history folder when the terminal is off). On the basis of M1 using the regular period_converter script create all other TFs.

 
kirson-7:

Good evening!

There is a question about using the tester in MetaTrader 4. There is such a thing as "Chart mismatch errors". I was looking for a way to fix it, but when I try to load archive data from MetaQuotes server I get a message that "There is no new data for the symbol...". At the same time the table contains data for 15-minute candlesticks only from June 21 till the current moment. I should have downloaded the data since 1999, as it is described on the net. And the discrepancy errors don't disappear. What's wrong and maybe there are alternative solutions?

I can suggest that you use a free script. As you were told before, first delete all the symbol data and run the script (better also read the "Recommendations" section of the script).

 
Ihor Herasko:

Ihor, be so lenient as to correct your owl, or explain why it cannot be corrected

 
Artsem:

Ihor, be so lenient, correct your owl, or explain why it can't be corrected

Good afternoon. Sorry, but I don't keep pets.

If, however, the question is about the EA, then write to me privately and describe the problem in detail. If instead of a description it is again a stream of consciousness, I will not answer.

 
Alexey Viktorov:

Try this.

And try not to use numeric values for object properties.
Thank you, no "alien")
What is the analogue of SetIndexStyle(0,DRAW_LINE) in mql5?

 
bij:
Thank you, no "alien")
What is the analogue of SetIndexStyle(0,DRAW_LINE) in mql5?

Can #propert indicator_styleN or in OnInit() PlotIndexGetInteger

 
Alexey Viktorov:

You can #propert indicator_styleN or in OnInit() PlotIndexGetInteger

PlotIndexSetInteger()
Reason: