Scripts: Save OHLCV Data from Chart to CSV File

 

Save OHLCV Data from Chart to CSV File:

This script saves all the OHLCV data available on the chart to a CSV file.

Save OHLCV Data from Chart to CSV File

Author: Mohammad Sh

 
any difference than exporting in SYMBOLS menu?
 
umad #:
any difference than exporting in SYMBOLS menu?

From my experience, sometimes the Symbols menu tool doesn't return all the available data on the chart (and sometimes it doesn't work at all), specially when dealing with data-providers other than MetaQuotes. I guess this is because the Symbols menu tool requests the data from the broker, and brokers impose limitations on the number of bars we can get in one request (I guess that's why historical data is filled gradually when we open a completely new chart).

This script saves the data that are available locally on the chart, so such limitations don't apply to it.