What can one do wrong on that simple code ? - But something is going wrong !
The output with that is always the same - wrong - value. Is there a bug in that iMaOnArray() or did I found a silly way using it wrong ?
If the loop works with the long distance over the historic values up to 0 it is fine ! But with only the recent values from 1 to 0:
No one any idea ? Me too ! I could play with 'ArraySetAsSeries(..)' as I like, nothing went better.
Now I wrote my own MA-routines. It works in the same code-environment as these insides don't.
No one any idea ? Me too ! I could play with 'ArraySetAsSeries(..)' as I like, nothing went better.
Now I wrote my own MA-routines. It works in the same code-environment as these insides don't.
Your problem is not clear. what is wrong ? Nobody can guess, so nobody can help.
You should provide code that compiles to demonstrate your issue.
- He already did.
2016.03.28 16:18:28.187 xx GBPJPY,M1: CenterLine: 161.5353955941705 - TotalQuotes: 66039 - QuoteValue: 161.52 2016.03.28 16:17:28.593 xx GBPJPY,M1: CenterLine: 161.5353955941705 - TotalQuotes: 66038 - QuoteValue: 161.515 2016.03.28 16:16:28.796 xx GBPJPY,M1: CenterLine: 161.5353955941705 - TotalQuotes: 66037 - QuoteValue: 161.511 2016.03.28 16:15:30.921 xx GBPJPY,M1: CenterLine: 161.5353955941705 - TotalQuotes: 66036 - QuoteValue: 161.455 2016.03.28 16:14:29.609 xx GBPJPY,M1: CenterLine: 161.5353955941705 - TotalQuotes: 66035 - QuoteValue: 161.452 2016.03.28 16:13:31.125 xx GBPJPY,M1: CenterLine: 161.5353955941705 - TotalQuotes: 66034 - QuoteValue: 161.494
- Tell Metaquotes
- Can someone please advise where I send a Request for Support to Metaquotes. - MQL4 forum
- Get in touch with developers using Service Desk! - MQL5 forum
- Report it to the service desk. 'MQL5.community - User Memo' - an article about the algorithmic/automated trading in MetaTrader
- Report it to the Service Desk, not us users.
- He already did.
- Tell Metaquotes
- Can someone please advise where I send a Request for Support to Metaquotes. - MQL4 forum
- Get in touch with developers using Service Desk! - MQL5 forum
- Report it to the service desk. 'MQL5.community - User Memo' - an article about the algorithmic/automated trading in MetaTrader
- Report it to the Service Desk, not us users.
- I can't compiled the code provided.
- Why do you want to report it to Metaquotes ?
zirkoner: Why do you want to report it to Metaquotes ?
| Who do you think can fix a broken iMAonArray? Us users or Metaquotes? |
zirkoner: Why do you want to report it to Metaquotes ? | Who do you think can fix a broken iMAonArray? Us users or Metaquotes? |
Your problem is not clear. what is wrong ? Nobody can guess, so nobody can help.
You should provide code that compiles to demonstrate your issue.
WHRoeder pointed the misthake very well. The results are the same up to 10E-13. Impossible with this input-values.
And the results are correct and different with my own routines.
WHRoeder pointed the misthake very well. The results are the same up to 10E-13. Impossible with this input-values.
And the results are correct and different with my own routines.
Maybe or not...
To be sure 100% the problem need to be reproduced, which I can't do. If you report something to Metaquotes they will ask you the code to reproduce the problem.
Maybe or not...
To be sure 100% the problem need to be reproduced, which I can't do. If you report something to Metaquotes they will ask you the code to reproduce the problem.
I also have been unable to reproduce the problem.
I suspect that
ArraySetAsSeries(arrValues, true); ArraySetAsSeries(bufCenterline, true);is not in the same block of code and is reset somewhere else. so that iMAOnArray is calculating using the same elements every time. Hence the duplicated result.
Maybe or not...
To be sure 100% the problem need to be reproduced, which I can't do. If you report something to Metaquotes they will ask you the code to reproduce the problem.
Ok, with a litlle time I will extract the codes which are necessary up to my point so it can be reproduced. The whole code now is a long walk through classes and other inludes.
Three things made me sure, I could keep it simple:
1) The iMaOnArray() is fine on the long walk from the very beginning to 0 with the same code.
2) The output of arrValues[i] did not show any issue.
3) My own code replacing the iMaOnArray() is working without any other changes.
But if you can't reproduce it, there must be something special in my other code...
@GumRai:
that's what I thought. But I checked the state with ArrayGetAsSeries() a lot of times and set the state a line above the iMaOnArray()... Nothing changes
Thank you for your answers :-)

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
What can one do wrong on that simple code ? - But something is going wrong !
The output with that is always the same - wrong - value. Is there a bug in that iMaOnArray() or did I found a silly way using it wrong ?
If the loop works with the long distance over the historic values up to 0 it is fine ! But with only the recent values from 1 to 0: