Errors, bugs, questions - page 1491

 
How do I drag the graph window to another monitor?
 
Joo Zepper:
How do I drag the chart window to another monitor?

open another terminal and drag it out )

Or stretch it out, but that's not good

 
Alexandr Bryzgalov:

open another terminal and drag it out )

or drag it out, but it's not very good.

The same is true for the other terminals - they all communicate with each other via events.

Why is stretching the terminal "not good"?

 
Joo Zepper:


and why is stretching the terminal "not good?"

I can tell by the way I feel.

your hand is used to a certain screen size, and when you stretch it, your hand moves off the table.

If you like it, why not?

I don't like it.

 
Joo Zepper:
How do I drag the chart window to another monitor?
Detach the window from the terminal
 
Yuri Evseenkov:

MT4. I want to draw attention to the difference in initialisation order of global variables and extern variables. It is not mentioned in documentation.

The extern variable is located in global scope and by the type of variable (global or local) refers to the global, as it is written in the documentation and in Kovalev's tutorial.

Since the documentation says nothing about the order of initialization of extern, it is logical to conclude that the order of initialization of extern is the same as that of the global variable itself.

In fact, the differences are significant. Global variables a and b are initialized once before the first function init is executed; they retain their initial (or changed in the code) values, if the timeframe or symbol on the chart has changed.

The variable extern int c does not save the value changed in the code and, if the timeframe or instrument on the chart has been changed, takes the initial specified value. The code below shows this.

This is important to know in order to understand why, all else being equal, the results of code running from the "Properties" window or recompiling differ from the results of code running by changing of timeframe or symbol.

Below is the code showing this. If we change timeframe or symbol several times, we will see that a and b grow and c keeps its initial value.


Forget the word extern

The new MQL4 uses input. Start from there.

The external variables are always re-initialized just before call of OnInit - this is an external input parameter!

 
Slawa:

Forget the word extern

The new MQL4 uses input. Start from there.

External variables are always reinitialized just before call OnInit - it's external input parameter!

In MQL4++ I can't do without extern when I need to change input parameters programmatically. For example, when converting a simple indicator into an interactive one I have to replace input with extern. The compiler treats input variables as const and complains at attempt to change them. With extern there will be no such problems.
 
Slawa:

Forget the word extern

The new MQL4 uses input. Start from there.

External variables are always reinitialized just before call OnInit - it's external input parameter!

External (global) variables are re-initialized, and that's good. And global (not external) variables are not, and it's not good.
 
Slawa:

Forget the word extern


Yep, first taught to walk and talk

and now teach to sit and shut up)

 
Slawa:

Forget the word extern

The new MQL4 uses input. Start from there.

External variables are always reinitialized just before call OnInit - it's external input parameter!

It would be good to reflect this in documentation.