"Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless.
There are no mind readers here and our crystal balls are cracked.
As global variable you declare matriX but in OnCalculate you try to use matriZ. I can see where is declared array matriZ. When compile program compilator need to warn it for this
when i pasted here, i translated and forgot to change this, but thanks.
The error that occurs is: The indicator line is straight, it dosn't change with the close price, like the moving average.
the pink is my indicator and the red is the moving average.
"Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless.
There are no mind readers here and our crystal balls are cracked.
Sorry,
The error that occurs is: The indicator line is straight, it dosn't change with the close price, like the moving average for example .
I think the problem is how to transform it on a time series. The previous data is the same as the current data.
whroeder1:
Both sum and constant do not depend on i.
It is my first attempt to create an indicator
Any ideia how can i change that, now that you understood my intencion with this indicator?
-
Don't double post!
General rules and best pratices of the Forum. - General - MQL5 programming forum - I have no idea what your intention is. Decide what you want to display, change your buffer assignment to that.
I have deleted your other post. Please do not duplicate posts again.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm trying to create a new indicator that calculates the sum of a array (matrix of 5 symbols with correlation) and divides by a specified number.
The calculation is correct, but i'm having problems with the indicator plot. Probably in the OnCalculate part.
i want the indicator look like a moving average....
Here is the code: