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

 
Vitaly Muzichenko:

All is well, no warnings. Use it as it is.


What can be the reason why the Expert Advisor I uploaded here does not open trades?

 

Hello.

Can you please help me find the biggest upper fractal out of the next five?

Count only those fractals that are less (closer) than 50 pips from the current price. That is, the price of the upper fractal minus the current price < 50
 

Hello. Please help me with the following question. I am using the Cluster_Cum_Delta indicator in my trading system. This indicator is based on traded volume data. Respectively, the data are integers, so it is an int format.

My question is. How can I take the data from this indicator for my robot, if the iCustom command returns data of the double type?

 
voron_026:

Hello. Please help me with the following question. I am using the Cluster_Cum_Delta indicator in my trading system. This indicator is based on traded volume data. Respectively, the data are integers, so it is an int format.

My question is. How can I take data from this indicator for my robot, if the iCustom command returns data of the double type?


The problem is not clear - just put a variable of int A=iCustom () type;

 
Aleksey Vyazmikin:

What's the problem - it's not clear - just put a variable like int A=iCustom ();


I did so. A warning about data type mismatch possible loss of data due to type conversion pops up


 
voron_026:

I have done so. You get a warning about data type mismatch possible loss of data due to type conversion


The forum engine even put a link in your post. Go to it and read it.

 
voron_026:

I have done so. A warning about data type mismatch possible loss of data due to type conversion pops up


double A=iCustom();
int B=(int)A;
 
Aleksey Vyazmikin:
And just int A=(int)iCustom() ?
 
Artyom Trishkin:
And just int A=(int)iCustom() ?

I have shown a chain of actions to make it clear to the person in question.

In general, such feeling that you have displeasure with me - if I am in the way, tell me - I won't write.

 
Aleksey Vyazmikin:

I have shown a chain of actions to make it clear to the person in question.

In general, there is a feeling that you have a grudge against me - if I am disturbing you, tell me - I won't write.

You have a strange feeling. I just showed you how to make it simpler - without unnecessary variables.

Reason: