ChartNavigate during initialisation - page 7

 
A100:

Also when changing the profile. In addition, if after ChartNavigate( chart_id, CHART_BEGIN, shift ) we get for example CHART_FIRST_VISIBLE_BAR, the result will be as if ChartNavigate has worked. If the Expert Advisor is removed, then the next time you start the Expert Advisor (the same or different), the result of obtaining CHART_FIRST_VISIBLE_BAR in this chart will look like CHARTNavigate did not work

Bottom line: extremely inconsistent ChartNavigate operation already in combination with CHART_FIRST_VISIBLE_BAR

Wow, need to check it out. I'll report on the results.

 
A100:

Also when changing the profile. In addition, if after ChartNavigate( chart_id, CHART_BEGIN, shift ) we get for example CHART_FIRST_VISIBLE_BAR, the result will be as if ChartNavigate has worked. If the Expert Advisor is removed, then the next time you start the Expert Advisor (this one or another), the result of obtaining CHART_FIRST_VISIBLE_BAR in the same chart will look like CHARTNavigate did not work

As a result: very inconsistent operation of ChartNavigate in combination with CHART_FIRST_VISIBLE_BAR

Checked it three ways (used indicator #1 from Rashid's post):

  1. After attaching the indicator to the chart did not change anything on the chart and switched to a different profile. Switched back to the profile where the indicator was attached. The chart remained in the position where I left it before the switch.
  2. After attaching the indicator to the chart I pressed the Auto Scroll button. The chart moved to the zero bar. I switched the profile to another one and went back to the profile where the indicator was attached. The chart did not even move; it remained on zero candle. The Auto Scroll button is off. It means that the indicator is started, but ChartNavigate() function is executed.
  3. After attaching the indicator to the chart, I changed the chart position by rewinding to the back of the history. Switched the profile to another one and went back to the profile where the indicator was attached. The chart is displayed on the zero bar. I don't understand how to evaluate this result. It's just the terminal taking care of itself))).
 
Ihor Herasko:

Tested it three ways (used indicator #1 from Rashid's post):

  1. After attaching the indicator to the chart, did not change anything on the chart and switched to another profile. Switched back to the profile where the indicator was attached. The chart remained in the position where I left it before the switch.
  2. After attaching the indicator to the chart I pressed the Auto Scroll button. The chart moved to the zero bar. I switched the profile to another one and returned back to the profile where the indicator was attached. The chart did not even move; it remained on zero candle. The Auto Scroll button is off. The indicator is started, but ChartNavigate() function is executed.

You'd better take a video. For once I don't understand what you are writing, because you have managed to write the opposite in one message. I don't think anyone understands you, but in the end you leave everyone with a feeling that something isn't working.

You're referring to my code, here it is.

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {


//--- отключим автопрокрутку
   ChartSetInteger(0,CHART_AUTOSCROLL,false);
//--- установим отступ правого края графика
   ChartSetInteger(0,CHART_SHIFT,true);
//--- отобразим в виде свечей
   ChartSetInteger(0,CHART_MODE,CHART_CANDLES);
//--- установить режим отображения тиковых объемов
   ChartSetInteger(0,CHART_SHOW_VOLUMES,CHART_VOLUME_TICK); 
//--- Прокрутим от правого края графика на 1000 баров влево
   ChartNavigate(0,CHART_END,-1000);
//---

How can a chart not twitch if you write "but the ChartNavigate() function was executed. And such inconsistencies go on in this thread in all your posts. You do not see your posts from the outside. So take a video, then watch it yourself and formulate your thoughts.

 
Rashid Umarov:

You'd better make a video or something. For once I don't understand what you are writing because you manage to write opposites in the same post. I don't think anyone understands you,

So far no one in this thread has said that they do not understand the essence of the problem. Once again I will clarify the matter: when you start the terminal with the attached indicator, the chart is not scrolling to the specified position.

but in the end you leave everybody with the feeling that something doesn't work.

Why do you have to sign for everyone? If you do not understand it, just specify it, nobody beats you for that ))

You're referring to my code, here it is.

How can a chart not twitch if you write "but the ChartNavigate() function was executed".

It's just a misprint. The correct phrase is "ChartNavigate function was not executed".

And such inconsistencies go in this thread in all your posts.

Why, instead of discussing the subject, do you keep getting into personalities? What inconsistencies are there in all your posts? Let's deal with them if there are any. So far I see only one typo.

 
Rashid Umarov:

So make a video, then watch it yourself and formulate your thoughts.

Here's the video:


Comments on the video:

  1. An indicator (the first from Rashid's post) is attached to the chart with autoscroll enabled. The chart has been moved. The place is specifically highlighted with a blue vertical line.
  2. Terminal has been reloaded without disconnecting the indicator from the chart.
  3. The chart is displayed on the current candle. It was expected to be in the same place it was when the terminal was shut down.
Connection to the server is specifically expected in the video. But after connecting to the server nothing changes, the chart remains in the same place.
 

I'm sorry, there's really something weird going on with ChartNavigate(). I made a video, everything worked on it. Then I started switching timeframes, changing "Max bars in window" and it stopped working. I'll draw the developers' attention to the subject.

 
Rashid Umarov:

I'm sorry, there's really something weird going on with ChartNavigate(). I made a video, everything worked on it. Then I started switching timeframes, changing "Max bars in window" and it stopped working. I'll draw the developers' attention to the subject.

...And let them not forget about these bugs related to the problem when reopening the terminal:

https://www.mql5.com/ru/forum/279927/page2#comment_8769528

items 1, 4 and 13:

https://www.mql5.com/ru/forum/279927

 
Rashid Umarov:

I'm sorry, there's really something weird going on with ChartNavigate(). I made a video, everything worked on it. Then I started switching timeframes, changing "Max bars in window" and it stopped working. I'll draw the developers' attention to the subject.

Thank you.

 
Ihor Herasko:

Thank you.

thanks to me, I was the one who brought it up in the other thread)

 

it's been two weeks.

has it been fixed?

(don't want to check everything myself, and Mr. Ihor Herasko would also like to know)