Errors, bugs, questions - page 3008

 
Artyom Trishkin:

Make graphs in windowed mode

Also use CHART_BRING_TO_TOP

if(!ChartGetInteger(0,CHART_BRING_TO_TOP))
              {
}

to take the load off an inactive window and stop drawing.


Also, if the window is inactive, there are no events on it.

I record the time of the last one:

//=====================================================================
// Записываем время последнего обращения к панели
//=====================================================================
   if(id==CHARTEVENT_CHART_CHANGE
      || id==CHARTEVENT_OBJECT_CLICK
      || id==CHARTEVENT_KEYDOWN
      || id==CHARTEVENT_OBJECT_ENDEDIT
      || id==CHARTEVENT_CLICK)
      LastTimeChartUse=TimeCurrent();
 
Vladislav Andruschenko:

I also use CHART_BRING_TO_TOP

to take the load off an inactive window and stop drawing.

How do you use it? This flag is just applied to one of the charts to show it.

I, on the other hand, need to know which chart is already being shown at the moment.

 
Artyom Trishkin:

How do you use it? This flag is only applied to one of the charts to show it.

I need to know which graph is already being shown.

Meaning: if the chart is not active, i.e. it is not currently selected (there is no active user action on it),

ChartGet Integer(0,CHART_BRING_TO_TOP)

shows true when the chart is on top of all of them.

i.e. is in use.

The documentation cannot be blindly trusted....


then I stop drawing data and minimise my panel.


when the graph is not in use, i.e. the user is not working with it,

then

//=====================================================================
// Записываем время последнего обращения к панели
//=====================================================================
   if(id==CHARTEVENT_CHART_CHANGE
      || id==CHARTEVENT_OBJECT_CLICK
      || id==CHARTEVENT_KEYDOWN
      || id==CHARTEVENT_OBJECT_ENDEDIT
      || id==CHARTEVENT_CLICK)
      LastTimeChartUse=TimeCurrent();

save the last access to the graph (cursor (removed for my own needs....), clicks)

and if the chart was not used for more than 5 minutes, I stop all visible calculations to avoid loading the system.

So, when the user accesses the graph, all the calculations start working again...

 
Vladislav Andruschenko:

means: if the graph is not active, i.e. it is not selected now (no user activity is active on it),

shows true when the graph is on top of all.

i.e. is in use.

The documentation cannot be blindly trusted....


then I stop drawing data and minimise my panel.


when the graph is not in use, i.e. the user is not working with it,

then

save the last access to the graph (cursor (removed for my own needs....), clicks)

and if the chart was not used for more than 5 minutes, I stop all visible calculations to avoid loading the system.

Therefore, when the user accesses the chart - all the calculations start working again...

ChartGet Integer(0,CHART_BRING_TO_TOP)

Get-function is useless in case of this flag. The flag can only be written. It cannot be retrieved.

However, I checked it once again. Indeed - the function allows you to read the property's value.

It means that either documentation is obsolete when it comes to describing this property or there is an error there from the very beginning.

 
Artyom Trishkin:

The Get function is useless in the case of this flag. The flag can only be written. It cannot be retrieved.

However, I checked it again. Indeed - the function allows you to read the value of a property.

It means that either documentation is obsolete when it comes to describing this property or there is an error there from the very beginning.

I have been using it for 3 - 4 years. It's OK.

 
Artyom Trishkin:

So either the documentation is out of date in describing this property, or there is an error in it from the beginning.

Or it is an undocumented feature. It works for now, but no one has promised whether it will be in the next release.

 
JRandomTrader:

Or is it an undocumented feature. It works for now, but whether it will be in the next release has not been promised.

Also true.

 

Hello.

There are two terminals.

One at work and one at home. There are no problems at home, but at work the nasdaq chart is displayed the way it is in the attached file.

This problem is showing on the minute and hour timeframes. It is displayed normally on the daily chart. This is on a demo account. There is no problem on a real account. There are no problems with other charts.

Who knows how to solve it?

 
Femdag:

Hello.

There are two terminals.

One at work and one at home. There are no problems at home, but at work the nasdaq chart is displayed the way it is in the attached file.

This problem is showing on the minute and hour timeframes. It is displayed normally on the daily chart. This is on a demo account. There is no problem on a real account. There are no problems with other charts.

Who knows how it can be solved?


Probably a crooked history.

Delete the history

Go to the terminal folder

then as on the screenshot - name of your server - symbol - delete

and ticks:


Files:
 
Artyom Trishkin:

The Get function is useless in the case of this flag. The flag can only be written. It cannot be retrieved.

However, I have checked it again. Indeed - the function allows you to read the value of a property.

It means that either the documentation is obsolete as to the description of this property or there is an error there from the beginning.

Something like this

Forum on trading, automated trading systems and strategy testing

Errors, bugs, questions

Alexey Viktorov, 2021.05.05 10:31

Show chart on top of all others

bool w/o

This property is written only.

Forum on trading, automated trading systems and trading strategies testing

Bugs, bugs, questions

Alexey Viktorov, 2021.05.05 10:47

Well, that's a "ouch". I trusted the documentation so much that I did not find it necessary to check.


Reason: