Just wondering if it's possible to export chart data from Metatrader to Excel? If anyone knows, I'd really appreciate the help.
Thanks.
Thanks.
MT4 to Excel through Excel RTD (Finally!) 609 replies
MT4 export to Excel? 8 replies
How do you Export MT4 price to Excel? 7 replies
Export to Excel 6 replies
Export OHLC to Excel 4 replies
DislikedThanks for posting so quickly. I am looking for something a little more than this. I would like to import price data as well as te data for my indicators to an excel spreadsheet, not just the price. For example I would like the 8ema, 200 ema and MACD data on there as well.
Is there a way to do that?
Thanks again for your help.Ignored
FileWrite(handle, date1, time1, iOpen(ccy,tf,i), iLow(ccy,tf,i), iHigh(ccy,tf,i), iClose(ccy,tf,i), iVolume(ccy,tf,i));
FileWrite(handle, date1, time1, iOpen(ccy,tf,i), iLow(ccy,tf,i), iHigh(ccy,tf,i), iClose(ccy,tf,i), iVolume(ccy,tf,i), iMA(ccy,tf,5,0,MODE_SMA,PRICE_CLOSE,i));
You can add as many indicator outputs as you wish.out_hist("GBPUSD",1440); // This will produce daily history for GBPUSD
to have output for any combination of currency pairs/timeframes that you wish, in the same run. Output is sent to the ....\experts\files folder.DislikedThanks for that indicator. Can you have excel running at the same time so that it imports the data real time while you are watching the excel sheet?Ignored
Dislikedcould easily be adapted to add data from any indicator. For example, to output data for a 5 period SMA of the Close price, simply add the code in red typeface:FileWrite(handle, date1, time1, iOpen(ccy,tf,i), iLow(ccy,tf,i), iHigh(ccy,tf,i), iClose(ccy,tf,i), iVolume(ccy,tf,i), iMA(ccy,tf,5,0,MODE_SMA,PRICE_CLOSE,i));
You can add as many indicator outputs as you wish.
DavidIgnored
FileWrite(handle, date1, time1, iOpen(ccy,tf,i), iLow(ccy,tf,i), iHigh(ccy,tf,i), iClose(ccy,tf,i), iVolume(ccy,tf,i), iMACD(ccy,tf,12,26,9,PRICE_CLOSE,MODE_MAIN,i), iADX(ccy,tf,14,PRICE_CLOSE,MODE_MAIN,i));
Hope this helps. Post further questions if you wish. See the attachment as an example.DislikedThanks for all the info above. So helpful.
Is it possible, when exporting the csv data, to only export the top record? Currently every time I do it I end up with he whole lot! If I specify the time period which is exposed (say 1year or monthly records) it's fairly time consuming as would have to do it for all the different time frames. Hope I've made myself clear!
DaveIgnored
DislikedHow to make it so it writes new data on the next cell below
instead of overwriting
So it keeps a data logIgnored
DislikedI realize that the original post is over 2 months old. However, if anybody wants to export data to a CSV file, I have written the out_hist.mq4 indicator (attached to this post).
Currently it outputs only OHLCV, but the line that readsFileWrite(handle, date1, time1, iOpen(ccy,tf,i), iLow(ccy,tf,i), iHigh(ccy,tf,i), iClose(ccy,tf,i), iVolume(ccy,tf,i));
could easily be adapted to add data from any indicator. For example, to output data for a 5 period SMA of the Close price, simply add the code in...Ignored