- Variable names that start with an underscore.
- A macro. Macro substitution (#define)
- Ternary Operator ?:
Hello
What is meaning of these codes?
I don't understand Red and bold parts.
1- what is variables started with _ ?
2- what is _mtfCall ?
3- what is meaning of this statement : double PP=( )? : ;
If possible, please send me documents or references to understand these codes.
MACDHistB1[i]=(MACDHist[i]>0 && MACDHist[i+1]>MACDHist[i])?MACDHist[i]:0;
double PP=(_Digits==5 || _Digits==3 )?_Point*10:_Point;
#define _mtfCall(_buff,_ind) iCustom(NULL,TimeFrame,indicatorFileName,PERIOD_CURRENT,........., _buff,_ind)
3-
if (_Digits==5 || _Digits==3) double PP= _Point*10; else double PP= _Point;
And what is meaning of this code ?
string test = (((state
& 1)== 1)?"DN":"UP");
what is different with this code
string test = (((state)== 1)?"DN":"UP");
I dont understand this part -> & 1
This is the original code:
//+------------------------------------------------------------------+ |
I didn't find anything here Ternary Operator ?:
Thanks for help
- docs.mql4.com
string test = (((state & 1)== 1)?"DN":"UP"I didn't find anything here Ternary Operator ?:
- Take state, isolate the least significant bit (i.e. the value one,) see if it is set (i.e. is one.)
- Read the manual again. If its odd, set test="DN", otherwise set test="UP"
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello
What is meaning of these codes?
I don't understand Red and bold parts.
1- what is variables started with _ ?
2- what is _mtfCall ?
3- what is meaning of this statement : double PP=( )? : ;
If possible, please send me documents or references to understand these codes.
MACDHistB1[i]=(MACDHist[i]>0 && MACDHist[i+1]>MACDHist[i])?MACDHist[i]:0;
double PP=(_Digits==5 || _Digits==3 )?_Point*10:_Point;
#define _mtfCall(_buff,_ind) iCustom(NULL,TimeFrame,indicatorFileName,PERIOD_CURRENT,........., _buff,_ind)