DLPAL Software FAQ
General FAQ Data FAQ
Is DLPAL a neural net program?
DLPAL is not a typical neural net program. It uses a deep learning algorithm for supervised and unsupervised learning developed by Michael Harris.
If everyone uses DLPAL will that affect the strategy performance?
There are so many different markets, so many different strategies and so many different ways traders can approach strategy development
(in terms of profit targets, stop-loss, profitability, risk management, etc.) that makes this question a philosophical one rather than practical. Of course, trading very liquid markets reduces the risk of being part of
a hypothetical "herd" using the same system.
Are the strategies discovered by DLPAL particular to a certain market?
Although with DLPAL you can discover strategies particular to a certain stock or
futures contract, it turns out that many of those strategies work for a group of stocks or even future contracts. DLPAL can discover strategies that are common to a large universe of securities.
Are the strategies found by DLPAL preprogrammed in a database?
There are no hard coded strategies in DLPAL. Instead, DLPAL uses deep learning principles guided by major cluster types. DLPAL does not look for
traditional chart strategies but for price action strategies. Some of the strategies the program finds may look similar to traditional chart formations. Strategies have up to 9 price bars lookback period. That
does not include the delay bars. The program finds strategies dynamically as it goes through a data file of historical prices and they are specific to the data used although it may turn out that some of the strategies
work for a group of securities.
Can DLPAL consider volume or other indicators in the search for strategies?
DLPAL discovers price strategies that fulfill user-defined risk/reward and performance
criteria. The strategies do not consider volume information, only the open, high, low and close of price bars. There is a way of modifying the input data to identify volume strategies. Contact us for details.
How do I go about developing advanced systems based on DLPAL strategies?
Many sophisticated users of DLPAL do not rely on signals from individual strategies but instead develop systems based on the concepts
described in the "Tips for Advanced Users" section of the help file.
For example, some users require that two or more strategies generate signals at the same time. Some others consider as signals those that come
one or two bars after another signal. There are all sorts of ways and methods to try to increase the probability of success of individual strategy formations.
Can I use DLPAL with intraday or tick data?
DLPAL can be used to find strategies in intraday data after data files are properly converted to the program intraday format. Finding statistically significant strategies in very fast timeframes, for example 1 10
minute bars may turn out to be hard or even impossible due to the presence of noise and the demand for large samples. There are also several parameters that can affect the performance of strategies in
out-of-sample backtesting or actual trading, including the target/stop ratio and short-term volatility.
It is unlikely that tick data strategies can have only statistical significance at all.
What is the p-Indicator?
The p-Indicator is a technical short-term indicator developed by Michael Harris for his trading. This novel indicator is based on short-term strategies identified by DLPAL. The value
of the p-Indicator is calculated as the ratio of the sum of the success rate P of each strategy that generates a signal weighted by the number of its historical trades T in the data history to the sum of the trades of
all those specific strategies. Thus, the p-Indicator can be thought of as having two parts: one to be used for taking long positions and the other for short positions. The calculation of each of the two parts is
identical but in the long part of the indicator, the historical success rate P of strategies with long signals is considered and in the short part that of strategies with short signals.
More information about the p-Indicator can be found under "An Introduction to p-indicator."
What is out-of-sample/forward testing and how to do it in DLPAL?
Testing in out-of-sample or a forward
test is a method used for validation machine learning results. It involves splitting the historical data file into two or more parts, usually two. The first part is called the in-sample, which is used to search for
strategies. It is usually 2/3 of the original data file. The second part is called the out-of-sample, the remaining 1/3 of the data file. DLPAL offers a tool for generating in-sample and out-of-sample data files from
individual files or from or groups of files. The Tool is found is called Sample File Creation under Tools. The in-sample is used with a search workspace to find strategies that satisfy the performance criteria
specified on the search workspace. When the results are generated, the out-of-sample is used with the "Test Strategies" tool to analyze performance.
What is the best way of generating signals from the search results?
As soon as you have done a validation test and you have decided to use specific strategies from the search results, you have a few choices.
Choice A. If the strategies are from daily data, you can mark the strategies you want to use and add a system to System Tracking. Then, you need to update the data files EOD and run System Tracking.
Choice B. If the strategies are from intraday data and/or you want to you another platform anyway, in Tradestation for example, you can generate the code for the strategies you want. In this case, you may keep each
strategy as a separate system, especially when the profit-target and stop-loss values are different. If the exits are the same, a simple way is by combining the conditions using OR, separately for long and short
strategies. Make sure you set the target and stop values in the strategy code to proper values.
Strategy 1: if c > h AND c > l AND h > c AND c > c AND l > c then begin
Strategy 2: if h > h AND h > l AND l AND h > h > l AND l > l then begin
Combination using OR:
if (c > h AND c
> l AND h > c AND c > c AND l > c) OR (h > h AND h > l AND l AND h > h > l AND l > l) then begin
The parentheses were used to enclose each condition. Note that the program also generates a text file with raw code you can use with strategy builder in TS to automate this process. The raw code generation applies
only to the Search and Database results. Two files with identical content are saved automatically in sub-directory "
Results" after you generate EL code from search results:
(1) A file called GeneratedCode.txt which is overwritten each time new code is generated.
(2) A file saved as : RawCode_mm_dd_yyyy_hh_mm.txt
This last file is overwritten only if new code generation takes
place during the same minute mm that the file was initially generated. You can edit this file using a regular editor like Notepad, add what you wish to it and use it in TS. You may also add other indicators and systems
to filter out and/or confirm signals.
What is the recommended way of running multiple instances of DLPAL?
The recommended way of running multiple instances of the open/lifetime license is to create
multiple installations of the program in different directories, such as in: C:Priceactionalb1, C:PriceActionLab2, C:PriceActionLab3, etc. One important restriction is that each instance of the program when it runs must
NOT share data files from the same directory with any other instance.
Important note: The multiple instances were designed to run workspaces that are created and saved only after the instance is loaded. This is
because in some Windows systems the relevant directory is only shown under "Create New Workspace. All other options use the last directory stored in the Registry. If you start a new instance and select "Open Existing
Workspace", the directory shown depending on your system configuration may be the one of the last saved workspace and its corresponding instance, not of the current instance. You can however get around this by selecting
the MyWork sub-directory of the particular instance. If you do not know in which directory the instance is located, you can just select Create New Workspace and you will see the relevant directory. You can then exit and
select open workspace, go to the relevant directory and select the workspace you want. In addition, when you save the workspace you must make sure it is saved in the relevant directory because in some system the
directory of the last instance will apply.
Alternatively, there is a way to simplify the process as follows: You can create a common directory for all instances to save the workspaces, like "C:DLPALWRK" and
another common directory to save all results, like "C:DLPALRES"
After installing a new instance you can create the workspace you like and save it in the common directory, by the name WRKn, for example, where n is
the instance number. Then, after running each instance, you can open the workspace from the common directory.
The above takes some initial work but the time is negligible compared to the time saved running the
multiple instances. It has also the advantage of aggregating workspaces in one place.
What is the difference between Test Strategies, Back-test, Back-Test Portfolio and Portfolio Backtest?
Strategies: This function calculates the performance of all strategies in the results on a data sample that has the same file name as the one shown in the results and it can be used for out-of-sample testing. Selection
from results is ignored.
2. Back-test (right mouse click): back-tests single strategies from the search, scan or system tracking results.
3. Back-test Portfolio (right mouse click): This function calculates the performance of single strategies on a portfolio of symbols.
4. Portfolio Backtest: This tool calculates the performance of each of the
strategy in the search or scan results on a portfolio of symbols. It is equivalent to applying #3 for all strategies without the performance details.
Hint: Option #3 above will generate the same results as #1 if the portfolio contains only one symbol that is the same as that in the results
DLPAL cannot find the file when I try to use the Backtest or Test Strategies tools
The name of the file used with the back-test or Test Strategies tools must be identical to that shown on the results
workspace. Otherwise the program will generate an error message that the file was not found. The same error message is generated if the file name, excluding the path and the .txt extension, is greater than 26
characters. Important: Always double-click on a directory to select it. Only the directory structure is shown, not the files.
How to implement DLPAL strategies and systems in NinjaTrader?
As soon as
you find a system you like in DLPAL using the historical data you export from NinjaTrader (NT), you can generate code for the strategies in NT script and then you can implement a system with the extra code you desire
(with money management, position sizing, etc). Then this system generates the orders through the broker you use with NT when the signals are generated.
What are "common strategies" and what is their objective?
Common are defined in DLPAL as strategies in one instrument that satisfy the criteria set on the workspace for that instrument and also show positive performance in all other instruments using the
risk/reward parameters of the original instrument. The objective of applying the original instrument risk/reward criteria to all other instruments is to determine whether a given strategy with given profit target and
stop-loss is profitable (at least marginally) in another comparable security. If the original profit target and stop-loss were to be changed it could raise curve-fitting issues. In effect this is a method of validation
but it does not guarantee positive forward performance but only reduces the chances of curve-fitting or random strategies. Specifically, in the case of a 2% profit target and stop-loss in SPY and a strategy with profit
factor 1.8, one should not expect to get the same performance in QQQ but it would be nice to have a profit factor at least greater than 1. This does not directly imply the strategy will work in forward testing but the
idea is that a random, or curve-fitted one, will not. Note that the common strategy test is a very conservative validation method.
Why DLPAL does not have an option for time exits or exits based on ATR?
According to the system development philosophy of DLPAL any exit that "adapts" to market conditions may produce fitted systems. Specifically, by adjusting exits to adapt to short-term volatility, which is what ATR
accomplishes, the entry part of a system tends to become less significant. By selecting exits that fit any signals to the data random systems may be developed. Instead, the philosophy of DLPAL is that signals should
perform well for small constant exit thresholds and if a security shows strictly increasing volatility as a function of time then it should not be used for creating automated systems not because it cannot be traded but
because adapting to the volatility during the design phase will create fitted systems. Fortunately, most popular securities and markets exhibit volatility cycles. The profit-target and stop-loss can be calculated as the
average of actual changes or percentage:
daily changes: abs(close close of n bars ago) percentage changes: 100 x abs[(close/close of n bars ago )-1]
where abs stands for the absolute value and n is set to the expected average trade duration, which must be less or equal to maximum strategy length of 9 bars in DLPAL. It has been determined in the finance
literature than memory in price series is slowly lost after 4 to 5 bars and as a result any type of exits that close positions after many bars may contribute to the creation of fitted systems.
Can DLPAL use multiple CPU cores in parallel?
DLPAL is not a multithreaded application because a substantial investment is required for rewriting the code to use multiple cores in an effective way and not in
some pseudo manner done by other applications. With that price would have to increase beyond levels that the average trader can afford. However, we offer an alternative solution for those users that have already
determined that DLPAL suits their needs in the form of an upgrade that allows multiple instances to run on the same machine.
Why I do not get any search results in intraday or daily data?
There are several reasons for not getting any results. Below are a few recommendations:
(1) The markets and timeframes tried may have become too efficient for the parameters specified, including the target and
stop levels. Usually futures and forex markets, especially in intraday timeframes, provide very few tradable strategies.
(2) The stop-loss must be set outside the 1-bar volatility range. Stops are checked
immediately before profit targets to produce conservative backtests and if the stop-loss is too low no significant strategies will be found.
(3) Test Sample size setting: For daily data the default of 500 bars
should be good enough but for intraday data values greater than 1,000 are appropriate depending on timeframe.
(4) Properly back-adjusted continuous data for futures contracts must be used.
(5) Appropriate values
for the profit-target and stop-loss must be used. In the case of futures point values should be used in the T/S file. More details can be found under "A short note on using targets and stops" in "Creating a T/S File" in
the program manual.
(6) Workspaces must be created by first selecting the exit type and then creating a search line? It is always a good idea to check the search lines to see if the proper parameters are selected
before running the workspace.
What is the difference between the search, the scan and system tracking functions?
The search function can be used to discover strategies in
historical daily or intraday data that fulfill user-defined performance statistics and risk/reward parameters. The strategies can be grouped in any way the user desires and in the case of daily data they can be added to
the system tracking module of the program for monitoring signal generation as new data are added. Alternatively, the program can generate code for several popular trading platforms so that the strategies can be
implemented there. When the search function is used, DLPAL serves as a meta-system that discovers trading systems automatically.
The scan function can be used to determine whether there are any strategies with
signals as of the close of the most recent bar in daily data that fulfill the user-defined criteria set on the scan workspace. Here is a partial list of what one can do with the scan function:
determines which strategies in a saved system generate a signal as of the last day in the data file, on the close or open of next day. In case the close was used as the trade input, system tracking determines the
conditions that must be met on the following day's bar to have a signal at the next close.
How to determine the minimum % profitable for long and short?
The formula for the minimum profitability P is: P = 100/(1+ Rwl)
where Rwl is the ratio of average winner to average loser and for fixed dollar size trades it can be approximated by the ratio of profit
target to stop loss. P is the ratio of winning trades to total trades times 100.
To account for slippage, commissions and other things it is better to use the following adjusted formula: P > 100/(1+ 0.7*Rwl)
Example 1: for profit target to stop-loss ratio of 2:1 the minimum P is 33%. The recommended value is: P > 45%
Example 2: for profit target to stop-loss ratio of 1:1 the minimum P is 50%. The recommended value is: P > 62.5%
For a desired profit factor PF value, the above formula becomes:
P = (100xPF)/(PF+Rwl)
One can solve the above formula for the minimum profit factor required as a function of profitability P and ratio of avg. win to avg. loss Rwl:
PF = (P x Rwl) / (100 P)
DLPAL includes a Profitability
Calculator in the Tools of the main menu. The calculator can be used to get an estimate of the minimum profitability P to use on a search workspace when an estimate of Rwl is available along with the desired profit
How to select the proper profit target and stop-loss values?
DLPAL discovers strategies formed by market price action, not some strategies one would like to see formed. Profit targets and
stop-loss levels should be set at reasonable levels and outside of the daily or intraday volatility range. If the exits are set too low, then stops are hit very frequently and the program cannot find profitable
strategies. It takes some parameter adjusting to get to the point of identifying strategies successfully. That's exactly the reason the DLPAL program was developed as a development tool.
It is best to first
try setting exits with a ratio of profit target to stop-loss of one. In the same T/S file you may include smaller and higher ratios and notice the results. For example, in the case of T-Bond futures, you may set the
profit target and stop-loss both equal to 1.00 ($1,000 per contract) but also include the pairs (1.5 , 1) and (1, 0.5). This is easily done in the same T/S file. In the case of stocks, you may want to try sets like (2%,
2%), (3%, 2%) and (5%, 3%) for example. When the search completes, you may select those strategies that better reflect your trading style.
In the case where points are used instead of percentage, for long
positions, a constant number is added to the entry price to determine the profit target exit price and a constant number is subtracted from the entry price to determine the stop-loss exit price.
Case 1: The entries in the T/S file are determined based on a number of ticks:
The formula in this case for the calculation of the correct entries in the T/S file is: T/S = (number of ticks x tick value) / Full point value
Examples: In the case of bond futures a full point is $1000,
the tick value is $31.25 and for 3 ticks target and stop the formula gives T/S = (3 x 31.25)/1000 = 0.09375. If the stop must be set to 4 ticks then the value to input in the T/S file is: S = (4 x 31.25)/1000 =
In the case of the ES mini, a full point is $50, the tick value is $12.50 and for 5 ticks target and stop the formula gives T//S = (5 x 12.50)/50 = 1.25.
Case 2: The entries in the T/S are determined based on a fixed dollar amount
The formula in this case is: T/S = (profit or loss)/(full point value)
If in the ES mini case the target/stop is $62.50 then the
formula gives: T/S = 62.5/50 = 1.25. For the bond futures for $250 target and $125 stop the formula gives: T = 250/1000 = 0.25 and S = 125/1000 = 0.125.
The formulas in both cases (1) and (2) assume that
the prices used correspond to the full point values definition, i.e. that an increment of 1.00 in the price corresponds to a full point.
What does the option "Test Sample Size" mean?
DLPAL uses the
Test Sample to validate strategies. The default setting is 500 bars. Changing this parameter impacts the time taken to complete the search. A minimum of 250 bars is recommended for daily bars. Note that this
parameter is not related to the back-testing range used during the search, which considers the full available price history.
Are commissions and slippage included in the search for price strategies?
Commissions and slippage are not included in the search for price strategies since the program deals only with strategy formations and their number of occurrences rather than with equity performance, which is something
that depends on many factors some controllable and some random. If the profit factor is sufficiently high (see the help file section on the Profitability Calculator), the impact of commissions and slippage on
profitability is minimal. Note that the strategies will form whether or not commission or slippage is considered. These parameters have more to do with the equity performance of the strategies rather than with their
presence in historical data. DLPAL can generate code for popular backtesting platforms and you can test the performance of the price strategies with commission and slippage added. When backtesting single strategies and
systems of strategies in DLPAL you can specify commission per share/contract, big point value and initial capital.
Can I use Tradestation data with DLPAL?
There are 2 steps involved in converting daily or intraday Tradestation data to files that can be used with DLPAL:
Step 1: Generate a text file from Tradestation
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);
For intraday data files you can also use the following function: print( file( "C:.txt" ), dateformat( "YYYYMMDD", ""), ",", time, ",", O, ",", H, ",", L, ",", C );
where directory is a directory on your C: drive to save the file and filename the name of the file.
Step 2: If a conversion is required (often applies only to intraday data), use the appropriate conversion routine from Tools menu to generate a file compatible with DLPAL:
Open the saved file from Step 1 in
Notepad and DELETE any header if present. A header is a line with the names of the fields in the file. There should be only data in the file and nothing at the start or end of it, including any blank lines. Also make a
note of the particular format of the file, like the date format and what type of delimiter is used.
The following steps apply to intraday data and daily data that include a TIME field:
-From the main program menu select Tools and then Intraday File Creation.
-Select the source file saved in Step 1 and specify the correct file format. UNCHECK the option "Metastock Compatible" if CHECKED.
Convert and select a new directory to save the new file generated by DLPAL (or you can use the same directory with a different file name) and then click Save to complete the conversion.
The following steps apply to daily data only (saved data from Tradestation that do NOT include a Time field):
From the main program menu select Tools and then Data file Conversion.
Select the source file saved in Step 1 and specify the correct file settings. Make sure you UNCHECK "Metastock Compatible".
In the target file settings leave the default DLPAL format and hit Convert.
Select a new directory to store the file (or you can use the same directory with a different file name) and click Save to complete the conversion.
Does DLPAL have an interface to eSignal data?
is no direct interface directly to eSignal but there is a small program Qcollector that converts eSignal data to DLPAL compatible format. You can use that with both daily and intraday data. To download a demo please
visit: www (dot) mechtrading (dot) dom
For daily data:
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 directly.
For intraday data.
In the options of Q-Collector specify to output the fields Date, Time, Open, High, Low, Close. The
fields can be either comma or single space delimited and for the date use the format YYYYMMDD. The time field must have the format hh:mm. The output file cannot be used by DLPAL directly. You must use the Intraday File
Creation tool from Tools menu to convert the file to DLPAL intraday format. In both cases above, daily or intraday data, there should be no header in the data file ( The first line of the file is often a header that
defines the content of the fields in the records that follow. QCollector gives you the option of whether or not to include an ASCII header in your data files.)
What are the steps for converting data from excel to DLPAL 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 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 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.
For intraday files that include a TIME field the procedure is:
From the main DLPAL menu select Tools and then Intraday File Creation.
Select the source file and specify the correct file settings (mm/dd/yyyy and comma). Make sure that Metastock compatible box is NOT checked.
Hit Convert and select a new directory to save the converted file (or the same directory with a different file name) and click Save to complete the conversion.
Can I use data from NinjaTrader with DLPAL?
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 can read directly the ASCII text format used by NinjaTrader to export historical daily data.
With intraday data export, NinjaTrader does not place a delimiter after the date. Data are exported in the following form (see the NinjaTrader manual under "export"):
Note that there is no delimiter after the date.
There are at least two ways of converting the data to a format that can be then converted to DLPAL intraday file:
1. Use a script to output the data in
text file in a format that can be converted to DLPAL format. Output the date, time, open, high, low, close separated by a comma. Then use the Intraday File Creation tool from the DLPAL main menu to convert the file to
2. Use Wordpad and Search and Replace (recommended for quick conversion)
Export a .txt file from NinjaTrader and then open it in Wordpad. Input commas in the space after the date on each line
by using Edit-Replace. Just input a space in "Find what" (hit spacebar once) and then input , in "Replace with". After you replace the blank space after the date with a comma on each line, replace all ; with , using the
same method. Then, convert the file using the Intraday File Creation tool for DLPAL main menu.
You can use the text files generated by NinjaTrader in DLPAL to search or scan for strategies and for running the p-Indicator.
Can I use data from MetaTrader with DLPAL?
You can use the ascii
text files exported from MetaTrader to search for strategies with DLPAL but you must first delete the header line, save the file in .txt format and then convert it to DLPAL compatible format. Note that both daily and
intraday data exported from MetaTrader are converted by DLPAL as intraday data but that makes no difference to the search. The complete steps to export data from MetaTrader and convert it to DLPAL format are outlined
Step1: Data export from MetaTrader:
(1) Click Tools and then select History Center or hit the F2 key
(2) Double-click on the instrument to export historical data for and then select the periodicity (for example EURUSD M5)
(3) Click Export, select ASCII Text (*.prn) in the Save as type field and specify the target directory and file name
(4) Click Save to export the historical data
Step 2: Delete header and change the file extension from .prn to .txt. In detail:
(1) Run Notepad
(2) Open the MetaTrader text file you saved. Make sure you select All Files as the File or type
(3) Delete the header line and then make sure there are no empty lines at the beginning or at the end of file.
(4) Click Edit and then Select All. Right click mouse and select copy.
(5) Click File and then New. Select No to ignore changes.
(6) Right click mouse and select Paste. Warning: make sure there are no blank lines at the start or end of file. If any, delete them.
(7) Click File and select Save as to save the file. Type in a file name and click Save.
Step 3: Convert the historical data format to DLPAL format
(1) From the main DLPAL menu select Tools and then Intraday File Creation.
(2) Select as the source file the file saved in Step 2 and specify the correct file settings (yyyymmdd and comma)
(3) Hit Convert and select a new directory to save the file (or the same directory with a different file name) and click Save to complete the conversion.
Now you can use the newly created text
file in DLPAL to search or scan for daily or intraday strategies. Note: Daily data files exported from MetaTrader include a default Time field so they must be converted using the same procedure as with intraday data
How to check for errors in data files?
DLPAL 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 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
If low < stop price then
exit position at stop price
go to next bar
if high > target price then
exit position at profit target price
go to next bar
if open short position then
If open of this bar > stop price then
exit at the open
go to next bar
if high > stop price then
exit position at stop price
go to next bar
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
Should I avoid dividend-adjusted data?
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.
What is the recommended number of bars for the in-sample?
A rule of thumb for determining the minimum number of bars for intraday strategy search is the following: Nbars = 2000 x Np
where Np is the number of bars in the intraday time frame. For example, in the case of hourly US stock data Np = 6.5 and hence Nbars = 19,500.
In the case of hourly Forex data, Np = 24 resulting in Nbars =72,000
Tick data use is not recommended since the Open, High, Low and Close have the same value. Also, it is unlikely that tick data strategies can have any statistical significance at all.
How could the use of non-continuous futures data affect DLPAL?
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 system with a sufficient large number of strategies, 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 individual strategies with a small number of trades, like in the Scan function operation.
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. A simple way of adjusting this type of contracts for use with DLPAL 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 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 because the data format it uses is simple and easy to define and handle.