ZigZag.mq4 code

 
code from standard ZigZag

Hi

this code is from standard "ZigZag.mq4"

"if (counted_bars==0 && downloadhistory) // history was downloaded"

counted_bars==0 : checking if the value is equal to zero........ its ok.
downloadhistory : there is no condition check why ??? please clear this

Thanks.
 

downloadhistory is a boolean, so the condition check is equivalent to:


if (counted_bars==0 && downloadhistory==true) // history was downloaded

 
blogzr3:

downloadhistory is a boolean, so the condition check is equivalent to:


if (counted_bars==0 && downloadhistory==true) // history was downloaded

Thanks for reply


then its mean if we check boolean without "true" "false" its "true" by default ?

 
Yes.
Reason: