Writing data to a text file in mql4 is easy enough. Reading it back is a pain.
What I'm going to do is write a set of data at the top of every hour (for this example, we'll say Open, High, Low, Close, DateTime, SomeINT). Now, at the top of every hour, I don't want to add the data; I want to read what's in the file first, delete the data in the file, then write the new set of data. Data in the file will be from Bar[2] that will be deleted and the data written to the candle will be Bar[1].
Anyone got any ideas or links to good tutorials on how to do this? Google is letting me down today.
Thanks.
-Non.
What I'm going to do is write a set of data at the top of every hour (for this example, we'll say Open, High, Low, Close, DateTime, SomeINT). Now, at the top of every hour, I don't want to add the data; I want to read what's in the file first, delete the data in the file, then write the new set of data. Data in the file will be from Bar[2] that will be deleted and the data written to the candle will be Bar[1].
Anyone got any ideas or links to good tutorials on how to do this? Google is letting me down today.
Thanks.
-Non.