
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
double tema_buffer[], cci_buffer[];
Thank you so much. I made that fix to the StringFormat and all of the indicators are showing as correct.
I also made the other changes you suggested, moving ArraySetAsSeries to OnInit. I also adopted your names for the arrays, as they were more meaningful.
I had used the code verbatim from the example, with minimal changes to my purposes. Yes, I had wondered whether I should bother copying the last 20 bars. Now I only retrieve the last bar.
I have transferred all of these changes to the Expert Advisor and things look great. Now to see what other errors come up.
I can see now that the VWAP value I am getting is higher than what is displayed on the screen. What is displayed is one line, not all of the standard deviations. Looks like I may be retrieving on of the deviation bands. That's a topic for another post, after I do some more investigation.
Thanks again.
I found the source code for vwap_bands. This should make things easier.
I'm going to start by running it by ChatGPT.
I got an answer from ChatGPT. Change this line in my code:
To this:
This gives the correct index to retrieve the value of the middle band.
It's working. Now I have to see how my decision making in the code works out.
Thank you for your help.
I just found another issue, and from searching it seems to be already recognised.
The indicator values I am getting in my EA lag about 5 minutes behind what is seen on the chart. Hence, they would be about 5 minutes behind the current price.
So that's the next thing I will be looking into.
New topic created.
https://www.mql5.com/en/forum/466337