1. Home
  2. Docs
  3. DLPAL DQ
  4. Data Conversion FAQ

Data Conversion FAQ

Can I use Tradestation data with DLPAL DQ?

Tradestation historical data can be saved in a .txt file using the following command sequence: View, data window, show all, save
For daily data files you can also use the following function:  print( file( “C:.txt” ), dateformat( “YYYYMMDD”, “”), “,”, O, “,”, H, “,”, L, “,”, C);
where directory is a directory on your C: drive to save the file and filename the name of the file.

Does DLPAL DQ have an interface to eSignal data?

There is no direct interface directly to eSignal but there is a small program Qcollector that converts eSignal data to DLPAL DQ compatible format. You can use that with both daily data. To download a demo please visit: www (dot) mechtrading (dot) dom

In the options of Q-Collector specify to output the fields Date, Open, High, Low, Close. The fields can be either comma or single space delimited and for the date use the format YYYYMMDD. The output file can be used by DLPAL DQ directly.

What are the steps for converting data from excel to DLPAL DQ format?

There are two steps involved in using data from excel.

Step 1: Format the date column and then save the file in text format. Make sure the text file has no header line.  In excel, right click on the date column name and then select Format Cells. While at the Number tab, select Custom and then m/d/yyyy. Click OK and the date column cells should be displayed in the right format. Then, select Save as from the File menu and save the file after selecting Text (Tab Delimited) in the drop down Save as type menu. Next, open the file in Notepad and make sure there is no header line present. If there is one delete it and save the file. Make sure no empty lines are present at the top or bottom of the file.

Step 2: Convert the text file to DLPAL format using the conversion Tools from the main menu:

For daily data the procedure is as follows:

– From the main DLPAL DQ menu select Tools and then Data file Conversion.
– Select as the source file the file saved in the previous step. For Source files Setting mark mm/dd/yyyy as the date format and Comma as the separator (Tab is treated as a comma by the conversion tool). Make sure that Metastock compatible box is NOT checked. In the Target File Settings leave the default DLPAL DQ Compatible format and hit Convert. Select a new the directory to save the converted file and click Save to complete the conversion. You may use Windows Explorer to create a new directory.

Can I use data from NinjaTrader with DLPAL DQ?

Data can be exported from NinjaTrader as follows:

(1)  Click Tools, select Historical data and then click Export.
(2)  Select the Instrument to export historical data for and the Data series starting and ending date
(3)  Click OK and then select the data directory and file name
(4)  Click Save to export the historical data

DLPAL DQ can read directly the ASCII text format used by NinjaTrader to export historical daily data.

How to check for errors in data files?

DLPAL DQ has a tool for checking data files for errors, like open and close values outside the High-Low range and spikes. For more details look for “Data File Test”, under the Tools section of the program manual.

Does daily data use result in misleading backtesting results?

This is how, in principle, the back-testing algorithm of DLPAL DQ works. At every bar the program checks if there is an open position. The loop goes as follows:

For current bar:

If open long position then

If open of this bar < stop price then
exit at the open
go to next bar
else
If low < stop price then
exit position at stop price
go to next bar
else
if high > target price then
exit position at profit target price
go to next bar

else

if open short position then

If open of this bar > stop price then
exit at the open
go to next bar
else
if high > stop price then
exit position at stop price
go to next bar
else
if low < target price then
exit position at profit target price
go to next bar

go to next bar

The program checks for the stop-loss before it does for the profit target and this produces the most conservative results since one cannot know whether the low or the high of the day occurred first intraday.

Should I avoid dividend-adjusted data for stocks?

Yes, because they distort price series. Only split-adjusted data should be used.

Can I use point stops with stocks?

Point stops with stock data should not be used when splits in the stock price have been accounted for.

How could the use of non-continuous futures data affect DLPAL DQ?

If continuous data cannot be used for some reason and if the rollover changes are small, the performance of a strategy will only be affected if it has a trade open when the rollovers occur. For a trading strategy with a sufficient large number of trades, the average error due to rollover will be close to zero because some trades will gain and some will lose. The problem arises only with strategies with a small number of trades.

How to deal with negative values in continuous futures?

Some continuous futures contracts include negative values that arise from the rollover adjustments. Negative values should not be used with DLPAL DQ. A simple way of adjusting this type of contracts for use with DLPAL DQ if via an upward shift that involves adding a positive value to all price fields that is equal to the largest negative value. However, when such method is used the profit target and stop-loss must be always expressed in points and not as a percentage of price because in the latter case the performance results will be misleading as percentages of adjusted data do not equate to percentages of unadjusted data. To see this consider a profit target of T% of the entry price P which equates to a target of PxT/100. If P is shifted upwards by an amount equal to s then the new profit target is at (P+s)xT/100 and it is now different. When T is in points, the profit target price is still equal to T when data is adjusted by s and thus the backtest results are invariant under a simple data shift in conjunction with point exits and in the case of future contracts that have a fixed tick value. If a data shift is not desired for some reason, the part of the data file that involves negative values can be removed if it occurs in the far past.

How can I update my data files and where can I save them?

Data for DLPAL DQ can be saved as a text file in the proper format in any directory on the hard drive. The data files included with the program are just examples. Normally a script or some type of program is required to download data from a vendor and update files in the directories on the hard drive. There are many ways of generating data for DLPAL DQ because the data format it uses is simple and easy to define and handle.