I have taken this from MQL4 Reference in MetaEditor:
Arithmetical operations include additive and multiplicative operations:
Sum of values i = j + 2;Difference of values i = j - 3;Changing the operation sign x = - x;Product of values z = 3 * x;Division quotient i = j / 5;Division remainder minutes = time % 60;Adding 1 to the variable value i++;Subtracting 1 from the variable value k--;The operations of adding/subtracting 1 (increment/decrement) cannot be used in expressions.
I am having trouble understanding mabey the grammer of code (like a foreigner would have troble with the order of words in a sentence he is trying to say)
I am basically trying to break codes down now to see how it all works...
//if in the imputs section of the code you have periods
//for example:
extern int periods=50;
//And you also had an identifier called something like CountBars wich was the same as Bars which I beleve means all the bars In the chart, and sometimes all the bars which a perticular indicactor looks at in total ('you know' when it only shows so much and each time there is a new bar It deleats the last one)
//Now you have my puzzle, if counted bars were 1000 and periods were 50 are you not taking away like in maths at school 1000-50-1=949
A=CountBars-periods-1;
// I am not sure why you would need to leave 949 bars and take away the 50periods that are used for the calcualtion of the indicator also to take away the current bar that is being counted?
Arithmetical operations include additive and multiplicative operations:
Sum of values i = j + 2;Difference of values i = j - 3;Changing the operation sign x = - x;Product of values z = 3 * x;Division quotient i = j / 5;Division remainder minutes = time % 60;Adding 1 to the variable value i++;Subtracting 1 from the variable value k--;The operations of adding/subtracting 1 (increment/decrement) cannot be used in expressions.
I am having trouble understanding mabey the grammer of code (like a foreigner would have troble with the order of words in a sentence he is trying to say)
I am basically trying to break codes down now to see how it all works...
//if in the imputs section of the code you have periods
//for example:
extern int periods=50;
//And you also had an identifier called something like CountBars wich was the same as Bars which I beleve means all the bars In the chart, and sometimes all the bars which a perticular indicactor looks at in total ('you know' when it only shows so much and each time there is a new bar It deleats the last one)
//Now you have my puzzle, if counted bars were 1000 and periods were 50 are you not taking away like in maths at school 1000-50-1=949
A=CountBars-periods-1;
// I am not sure why you would need to leave 949 bars and take away the 50periods that are used for the calcualtion of the indicator also to take away the current bar that is being counted?