EMA_of_EMA is a double variable.
Just like...
double var1, var2;
... creates 2 double variables your code does the same because of the comma.
Compiler is expecting either a)semicolon or b)comma to either a)end variable definition or b)define the next double variable.
/ McKeen
Ohh ok i see now !! Thanks McKeen, I was looking at it all the wrong way
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
That block of code is from a DEMA indicator the first line ends in a comma so I assume that means that line is continued onto the next line.
I dont really understand what the comma does in this case, and if it does continue onto the next line it means there is this section of code:
the thing about it that puzzles me is there is no variable defined as EMA_of_EMA, there is one called lastEMA and one called lastEMA_of_EMA so how does this compile with: "lastEMA,EMA_of_EMA" ? and
Buffer[0]=2.0*EMA - EMA_of_EMA;
The indicator does compile and does appear to work but I would like to understand what that line does and how it can be written that way if anyone knows I would appreciate any reply as I want to incorporate this indicator into an EA later on. I was wondering if the code should have been like this:
This is the complete code of the indicator