Download MetaTrader 5

CustomIndicator Index value Mismatch in EA

To add comments, please log in or register
Share the links to products and make your profit
wpg
20
wpg 2011.03.23 15:28 

The values in the indicator is different than the value shown in the EA.

I have attached both the custom indicator and the EA

In the EA the value is 0, whereas indicator shows 1 as the value.


Indicator Value mismatch in Tester

Any clues when this can happen ?


Thanks,

Best Regards,

Walter

Step on New Rails: Custom Indicators in MQL5
  • 2009.11.23
  • Андрей
  • www.mql5.com
I will not list all of the new possibilities and features of the new terminal and language. They are numerous, and some novelties are worth the discussion in a separate article. Also there is no code here, written with object-oriented programming, it is a too serous topic to be simply mentioned in a context as additional advantages for developers. In this article we will consider the indicators, their structure, drawing, types and their programming details, as compared to MQL4. I hope that this article will be useful both for beginners and experienced developers, maybe some of them will find something new.
Files:
TestEA.mq5 1 kb
wpg
20
wpg 2011.03.25 14:33  

Since no one from MetaTrader Developers have replied, I can only assume that this is a bug.

Looks like this problem  was not fixed even in 421.

Would it be possible to list out the bugs fixed, so that if the bug was not fixed in the recent build I wouldn't waste my time in downloading and checking it out.

Just wondering how others who have custom indicator are coping up with this issue ?  Any suggestions ( I mean work around ) ?


Thanks

- Walter.

Rashid Umarov
Admin
11832
Rashid Umarov 2011.04.04 12:36  
wpg:

Just wondering how others who have custom indicator are coping up with this issue ?  Any suggestions ( I mean work around ) ?


Use Master MQL5 while you create your custom indicator. It'll save you from such situations. In this case just specify number of plots:

#property copyright "Walter G. Prabhakar"
#property link      "http://propertymapz.com"
#property version   "1.00"
#property indicator_chart_window

#property indicator_buffers 1
#property indicator_plots 1

double dSignal[];

And you will see like that (I've chfnged your code a bit)


Files:
TestEA.mq5 3 kb
wpg
20
wpg 2011.04.04 13:31  

Thanks a lot for your reply.  Now I understand where the mistake is.

Best Regards,

Walter 

To add comments, please log in or register