show your code
Its ok I discovered what was wrong, something went wrong in mt4 even though i had been recompiling the code and removing the EA and indicator and reapplying them to the chart, mt4 was not using the updated version I dont know why this happened, is there a bug in mt4 that does this ? In the end I had to close mt4 and reopen it, after that it was working properly and the variables were the proper values.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Anyone know the best way to test what is up with my indicator ? The indicator appears to work but for some reason the lines on my chart do not match up with the values for those same lines when i make an EA to use that indicator so i decided to compare the values for those line the EA prints with the values for those same lines by printing out the buffers from the indicator.
The problem is when i added this to my indicator
Alert("buffer_a= ",buffer_a[0]);
The result is several hundred pips away from the actual line on the chart, so then I tried
Alert("Buffer_a= ",(oldvalupper+upperdeviation+oldvallower+centerlowdeviation)/2);
That is the line of code for the input to that buffer it still prints out a value a mile away from the actual line on my chart.
How should I print out the latest value for the line in my indicator ?