[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 197

 
7777877:


I don't understand... The considerations are as follows. We have a string.

The GlobalVariableGet(Quantity) function returns a value of type double. The Expert variable has the int value. Then, according to the typecasting rule, the value of the expression to the right of the operation sign (in this case, it is equal to the operation sign) is cast to the variable type to the left of the operation sign. In this case Expert variable will have int type, as before. But in the line

We have GlobalVariableSet(Quantity, Experts) function, in which the 2nd parameter (i.e. Expert variable) must have (by definition) double type, while we have Expert variable of int type... Is there a typecasting rule (or something similar) inside the FUNCTIONS?


treat type conversion as a work with bytes. e.g. a double is 8 bytes.

When you convert from one type to another, it means that you are working with the byte representation of a number in computer memory.

Bytes don't go anywhere, it's just that one data type represents those bytes in a very different way than another data type.

 
MikeM:
Is it possible (and if so, with which functions) to implement a reaction to a user's keystroke in a program?

In MT5 it is possible
 
Can you tell me if the logging on the tester can be turned off completely? The tester gives out literally hundreds of gigabytes of logs, it is impossible to work on the C: drive) (all Prints in the EA are switched off, but the system writes its own still)
 
Pyro:
Can you tell me if the logging on the tester can be turned off completely? The tester gives out literally hundreds of gigabytes of logs, it is impossible to work on the C: drive) (all Prints in the EA are switched off, but the system writes its own still)

Apparently there are a lot of errors
 
So you can't :)
 
Pyro:
So you can't :)

You can, but you need to get the EA up to speed
 
sergeev:

Think of type conversion as working with bytes. For example, a double is 8 bytes.

When you convert from one type to another, it means that you are working with a byte representation of a number in computer memory.

Bytes don't go anywhere, it's just that one data type represents those bytes very differently from another data type.


Well, it's not quite that simple. After all, double stores a sign, mantissa and exponent, and each part occupies a non-integer byte. So conversion of double to int is not so trivial process....

7777877:


I don't understand... The considerations are as follows. Here we have a string

The GlobalVariableGet(Quantity) function returns a value of type double. The Expert variable has the int value. Then, according to the typecasting rule, the value of the expression to the right of the operation sign (in this case, it is equal to the operation sign) is cast to the variable type to the left of the operation sign. In this case Expert variable will have int type, as before. But in the line

We have GlobalVariableSet(Quantity, Experts) function, in which 2nd parameter (i.e. Expert variable) must have (by definition) type double, but our Expert variable has int type... Is there a typecasting rule (or something similar) inside the FUNCTIONS?

Type conversion works everywhere and if it is not possible, the compiler will kindly tell you about it.

 
alsu:

Through hooks, apparently, especially if you want to override control+I.

You probably won't need them, but if you really need them, here.
MT4 doesn't like hooks.
 
nlp2311:

Thank you! Fun...):

An example with hooks))): would give))): an indicator or part...

=========================== =================

The MAIN QUESTION was about

QUESTION #1.

How can you do a history shift via iBarShift .

I.e. the point is that I put date in global variables (for example "02.06.2010 07:00"), and then pressing the hotkey (Cntrl+I) will add to iBarShift . And the indicator values are shifted, i.e. tested))): visually. It is clear that one should primitively add to iBarShift or subtract...

The question is about CAN or CAN'T?

The graph can be shifted using this library. There is a ServiceSetBar () function in section "4.3 Functions for working with graph".
 
Help! I have not been able to find anything for a week.
I need a function that will close all losing orders at the expense of positive orders. And leave only those orders that are in profit.
Reason: