Save/export history and quotes in real-time - replicate chart in MT4 in realtime

 

Hi,

I am trying to find a way how to automatically export history and real-time data so that I can build in real time the same chart as is in MT4 - just do not like it.

For example:

1, M1 history

2, the last record is autoupdating with every change in quote (actual close, can change low or high)

3, with a new period a new record is created

Date "Time" "Open" "High" "Low" "Close" "Volume"
2012.04.25,20:50,1.32163,1.32163,1.32154,1.32155,20
2012.04.25,20:51,1.32154,1.32157,1.32154,1.32154,11
2012.04.25,20:52,1.32153,1.32153,1.32153,1.32153,1

The last row should autoupdate from 20:52:00 till 20:52:59 - preferably as often as possible.

What I found is the currency loader here - https://www.mql5.com/en/code/8102. That seemed good, but it doesnt update in the last period in real time - although I setup the FrequencyUpdate to for example 5 sec - the last row in the csv file doesnot seem to update. It only updates when the minute is finished - doesnt update for 60 sec no matter what is the update frequency. It just downloads the history and creates new rows, but doesnt update the last minute OHLC in realtime...

Any advise what to do with this?

BTW, arent there more comfortable/faster ways for this than EA attached to chart and data saved to csv?

Thanks for advise. (sorry, not an IT)

J.

 
This article will be interesting first of all for programmers both beginners and professionals working in MQL environment. Also it would be useful if this article were read by MQL environment developers and ideologists,
[url=http://www.mbchief.com]Beats by Dr. Dre Tour[/url]
because questions that are analyzed here may become projects for future implementation of MetaTrader and MQL.