Direct export to matlab mt4
Use this script to export the price history to MATLAB mat files from any chart. Optionally, a CSV file can be created. This script allows easily creating and verifying your trading strategy in MATLAB, for example, statistical arbitrage or pairs trading strategies.
Input parameters
- startDT: start export from this date and time. Can be '1970.01.01 00:00:00' to start from the first available date and time.
- endDT: the last date and time in the file. Can be '1970.01.01 00:00:00' to export until the most recent available date and time.
- tryDownloadHistory: try to download history if there is no corresponding history in the terminal.
- writeCSV: create CSV file as well.
Then simply open the created mat file in MATLAB. Variable name created in MATLAB corresponds to exported symbol name and timeframe. If there are special symbols in the instrument name, then they are replaced with "_".
The resulting variable has a matrix structure, where the columns are values of the corresponding parameters below:
Matlab serial date number(datenum), Open, High, Low, Close, Tick volume, Spread, Real volume.
To simplify access to corresponding time series scalar, index variables are created: itime, iopen, ihigh, ilow, iclose, itick_volume, ireal_volume. For example, they can be used to plot the chart of Close price relative to time in MATLAB (assuming EURUSD_M1 is the corresponding variable):
plot(datetime(EURUSD_M1(:, itime),'ConvertFrom','datenum')), EURUSD_M1(:, iclose));
The format of CSV file is: Date, Time, Open, High, Low, Close, Tick volume, Spread, Real volume.
本店最新上架
-
- MT4 MT5跟单EA 本地跟单远程跟单 绝不
- ¥1100.00
-
- 在MetaTrader市场购买MetaTrader 5的
- ¥3988.00
-
- 在MetaTrader市场购买MetaTrader 5的
- ¥3988.00
-
- 在MetaTrader市场购买MetaTrader 5的
- ¥3988.00
-
- 在MetaTrader市场购买MetaTrader 5的
- ¥3988.00
全网为您推荐
-
- AlgoTradeSoft
- ¥3988.00
-
- 国际期货套利软件
- ¥3988.00
-
- MT4 MT5跟单EA 本地跟单远程跟单 绝不
- ¥1100.00
-
- 在MetaTrader市场购买MetaTrader 5的
- ¥3988.00
-
- 在MetaTrader市场购买MetaTrader 5的
- ¥3988.00