Draw chart from text file in MQL4

Back to topics list To post a new topic, please log in or register
avatar
1
bryanjhv 2016.01.29 04:13
 
I'm new to MQL and MetaTrader 4, but I want to read a CSV file and draw the values I've got into the chart of the Expert Advisor I'm working on.
Every file has the form:
;EURUSD;1
DATE;TIME;HIGH;LOW;CLOSE;OPEN;VOLUME
2014.06.11;19:11:00;1.35272;1.35271;1.35271;1.35272;4
2014.06.11;19:14:00;1.35287;1.35282;1.35284;1.35283;30
Where the EURUSD part is the Symbol which another program generated, the 1 is the period, and all the other things are the data to draw.
Is there any form to do it inside an Expert Advisor, or do I need to use a Custom Indicator? If that's the case, how can I do it in the simplest way?
P.S.: I read the data in a struct:
struct entry
{
  string date;
  string time;
  double high;
  double low;
  double close;
  double open;
  int volume;
};
Thanks in advance.

avatar
210
edddim 2016.01.29 06:23 #
 

By my thoughts the simplest way for me would be to copy them in array rates than to use Heiken Ashi as template as indicator, but I do not know method if IndicatorCounted() would work. Manually you would need to update the array by additional code if you have new updates.
Back to topics list  

To add comments, please log in or register