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

 
Hello, please advise .... I don't understand when initializing an array
ArrayInitialize(buffer,0.0);

the value 0.0 is written to the whole buffer[] array, and buffer[2] or buffer[6] is 0.0.

And if

ArrayInitialize(buffer,
EMPTY_VALUE );

the value is respectively set to empty

 
Дмитрий:
Hello, could you please tell me .... I don't understand when initializing an array

the value 0.0 is written to the whole buffer[] array, and buffer[2] or buffer[6] is 0.0.

And if

this value is respectively set to empty

Yes, that's exactly how it is. But you must remember that EMPTY_VALUE is not an empty value as we understand it but DBL_MAX

 
Alexey Viktorov:

Yes. Exactly. Only you must remember that EMPTY_VALUE is not a void as we understand it, but DBL_MAX

Thank you!) Have a nice day!)
 
how do I make the indicator appear in the background, behind the candlesticks?
 
Andrey Dik:
how do I make the indicator appear in the background, behind the candlesticks?
. There you go.
 

Good day all!
There is a complex condition

if (Bid - iLow( NULL ,PERIOD_H4,1)>=0.0030||Bid - iLow( NULL ,PERIOD_H1,1)>=0.0030||Bid - iLow( NULL ,PERIOD_M30,1)>=0.0030)


QUESTION 1. Does the program check for the LEFT-RIGHT or LEFT-RIGHT truth?
QUESTION 2. If the first expression in the course of the program is TRUE, will the program check subsequent expressions for TRUE?

Thank you.

 
ANDREY:

Good day all!
There is a complex condition

if (Bid - iLow( NULL ,PERIOD_H4,1)>=0.0030||Bid - iLow( NULL ,PERIOD_H1,1)>=0.0030||Bid - iLow( NULL ,PERIOD_M30,1)>=0.0030)


QUESTION 1. Does the program check for the LEFT-RIGHT or LEFT-RIGHT truth?
QUESTION 2. If the first expression in the course of the program is TRUE, will the program check subsequent expressions for TRUE?

Thank you.

Left->right. Will not check.
More operator priorities.
 
ANDREY:

Good day all!
There is a complex condition

if (Bid - iLow( NULL ,PERIOD_H4,1)>=0.0030||Bid - iLow( NULL ,PERIOD_H1,1)>=0.0030||Bid - iLow( NULL ,PERIOD_M30,1)>=0.0030)


QUESTION 1. Does the program check for the LEFT-RIGHT or LEFT-RIGHT truth?
QUESTION 2. If the first expression in the course of the program is TRUE, will the program check subsequent expressions for TRUE?

Thank you.

Expression is meaningless if written in OnTick
 
ANDREY:

Good day all!
There is a complex condition

if (Bid - iLow( NULL ,PERIOD_H4,1)>=0.0030||Bid - iLow( NULL ,PERIOD_H1,1)>=0.0030||Bid - iLow( NULL ,PERIOD_M30,1)>=0.0030)


QUESTION 2. If the first expression along the program execution matches the TRUE, will the program check subsequent expressions for TRUE?

Thank you.

If thefirst expression along the way is true, then the program will evaluate the condition as true and the commands, operations etc., that follow will be executed.

 
Aliaksandr Hryshyn:
Left->right. It will not check.
More operator priorities.

Thanks for the valuable information.

Please advise, how to store in a variable which expression happens to be true along the way? To be more precise - what is the minimum calculated in the function with respect to a candlestick of what timeframe? How to save the identifier of this timeframe in a variable?
Thank you