To import trading data from Wealth-Lab Developer or Wealth-Lab Pro into BTAnalytics, you can use the Binary Data Feeder created for this purpose. For more information about Binary Data Feeders, please see: Importing Data using a Binary Data Feeder in the BTAnalytics documentation.


To be able to import data into BTAnalytics from Wealth-Lab, take the following steps:


1.Download the Wealth-Lab Binary Data Feeder from the BTAnalytics website.


You can download the Wealth-Lab Binary Data Feeder from the External Data Feeders download page in our website.


2.Install the Wealth-Lab Data Feeder.


You must decompress the downloaded file and move all the included files to the Wealth-Lab installation directory in your computer (the folder where the 'WealthLabxxx.exe' is located).


That's all! When Wealth-Lab runs, it detects the Binary Data Feeder as a plugin and loads it.


3.Configure the Wealth-Lab Data Feeder.


The next step is to enable the Data Feeder plugin from the Wealth-lab menu, by selecting 'Tools' -> 'Preferences' and inside the shown 'Preferences' dialog, in the 'Performance Visualizers' section activate the 'BTAnalytics Data Feeder'.


4.Easily export your Trading Data from Wealth-Lab into BTAnalytics!


Whenever you want to export your Trading Data (backtest results or live trading data) from Wealth-Lab into BTAnalytics, you only have to select the 'BTAnalytics Data Feeder' performance visualizer.



Wealth-Lab Data Feeder
Wealth-Lab Data Feeder



In this window, you can:

Select a name for the exported data, write a small note (that will be shown in the Studies Explorer) or a deeper description.
Normalize Equity Curve: you can make that the exported Equity Curve only has data points with certain periodicity. For example you can normalize an intraday Trading System equity curve to show the equity curve with data only in a daily basis.
Include Analysis Variables: Select if you want to include Analysis Variables with the exported data. You can include all the series used in the Trading System or you can explicitly include only some series in the exported data. See 'Exporting Analysis Variables'.
Ignore Priority When Comparing Positions: This control allows you to configure whether BTAnalytics should take into account the Trade Priority field when searching for exact matches of the simulation being imported among the already imported Trading Data. (BTAnalytics can be configured to only import the Trading Results that haven't already been imported before and hence checks all the previously imported Trading Data before importing a new Data Set)






Exporting Analysis Variables (Optional):


For an in depth description of Analysis Variables and their utility, please, see the Adding Analysis Variables Filters Tutorial and Analysis Vars DAV description in the BTAnalytics Documentation.


If you want to include Analysis Variables for further analysis or to design filters over them using the BTAnalytics Analysis Vars DAV or the Analysis Vars Derivation Builder, you have to check the 'Include Analysis Variables' option in the BTAnalytics Data Feeder Performance Visualizer.


Then, you can include Analysis Variables data with the Trading Data using one of two methods:


1.Export all the series used by the Trading System.

This method includes with each exported Trade, the value of all the Series used in the Trading System in the bar before the entry, in the bar of the entry, in the bar before exit and in the bar of the exit.

If the Trading System makes use of a lot of Series this method is discouraged because it can include a lot of useless data with the exported Trades.



2.Analysis Variables Included in Positions Tag Field.

This method allows to explicitly select the Series that you want to export. It has the drawback that you need to modify the code of the Trading System but allows more control. In order to use this method:


1.Suppose that you want to include with the Trading Data four series for further analysis using BTAnalytics. The series are defined as follows:


         // ***************************
         // Calculate Series:
         // ***************************
         int _ATRPeriod = 10;
         int _RSIPeriod = 6;
         int _ADXPeriod = 8;
         int timeout = 3;
         DataSeries liquiditySeries = SMA.Series(Close, 10) * SMA.Series(Volume, 10);
         DataSeries ATRSeries = (ATR.Series(Bars, _ATRPeriod) * 100) / Close;
         DataSeries RSISeries = RSI.Series(Close,_RSIPeriod);
         DataSeries ADXSeries = ADX.Series(Bars,_ADXPeriod);



2.Then in the entry rules, you could include the Series as follows:



                 // ENTRY RULES:
               double limitPrice = Close[bar-1]*0.95;
               if (limitPrice <= 0) continue;
               Position p = BuyAtLimit(bar + 1, limitPrice, "Entering Long Position At Limit.");
               Dictionary<string, Dictionary<int,double>> anVars = new Dictionary<string,Dictionary<int,double>>();
               // LiquiditySeries:
               Dictionary<int,double> LiquiditySeriesDict = new Dictionary<int,double>();
               // ATRSeries:
               Dictionary<int,double> ATRSeriesDict = new Dictionary<int,double>();
               // RSISeries:
               Dictionary<int,double> RSISeriesDict = new Dictionary<int,double>();
               // ADXSeries:
               Dictionary<int,double> ADXSeriesDict = new Dictionary<int,double>();
               if (p!=null)
                  p.Tag = anVars;               




Create a Dictionary to store all the Analysis Vars information for the current position. The key of this dictionary contains the Analysis Var Name and has another embedded dictionary whose key is a number between 1-4 indicating the Bar Of Analysis:
o1-> Bar before entry
o2-> Bar of entry
o3-> Bar before exit
o4-> Bar of exit


The value of the embedded dictionary will be the value of the Analysis Var.


Dictionary<string, Dictionary<int,double>> anVars = new Dictionary<string,Dictionary<int,double>>();


Create the embedded dictionary for each Analysis Var:

Dictionary<int,double> LiquiditySeriesDict = new Dictionary<int,double>();


Add the Analysis Var value to the embedded dictionary for the desired Bar Of Analysis:



Add the embedded dictionary to the main dictionary:



Finally, add the main dictionary to the 'Tag' field of the current position:

p.Tag = anVars;




3.When you imports into BTAnalytics the Trading Results, you will be able to analyze the results for the Analysis Vars in the Analysis Vars DAV of the Raw Simulation Study or in the Analysis Var Derivation Builder:


Analysis Vars DAV
Analysis Vars DAV



Note: Wealth-Lab is a trademark of Fidelity Investments.