- ago
I have a csv file with some signals that I want to use for backtesting. The file contains a a few hundreds of lines. On each line it's a date and a signal value. Not all dates have a line in the file. What's the simplest way to load this into WL8 and use it on different symbols as trading signals? Thanks.
0
341
Solved
14 Replies

Reply

Bookmark

Sort
- ago
#1
New Strategy > Trade History.
0
- ago
#2
Thanks Engene.

I took a look at this and it imports trades. What I have is that some historical signal values. For example, let's say I have three double value signal A/B/C. I'm looking to see how to import/incorporate such signals so that WL indicators could be used on them to create strategies. For example, a buy building block might be created as "When RSI(4) of signal A is smaller than value of signal B", etc.

Such data points are simply just time series, similar to OHLCV/bar data but with different field names/values. Most WL indicators works on time series. So if one could import such data just like bar histories (WL DataSets), then it could be used in very flexible ways for strategy design.

0
- ago
#3
Explored a little bit and found this: I was able to create a custom symbol and loaded the signal time series as additional NamedSeries through the DataSet creator tool (The tool itself does not show that those columns were loaded in the preview). I think this should work for me.
0
- ago
#4
I tried to build strategies with by using the custom fake ticker with NamedSeries data (two series with name s1 and s2, some values are 1 and some are 0) as image shown below. No trades were executed in the backtest. When I check the values of s1 from the indicator code, seems there are all NaNs. Any idea what I'm missing here?

CODE:
public override void Initialize(BarHistory bars) {          externalSymbol = GetHistory(bars, "TESTSIGNAL");          indicator = new NamedSeries(externalSymbol,"s1");          PlotIndicator(indicator,new WLColor(0,0,0),default,default,"TESTSIGNALPane");          _startIndexList.Add(indicator);          if (bars.NamedSeries.Count > 0)          {             foreach (var ns in bars.NamedSeries)             {                WriteToDebugLog(ns.Key);             }          }          WriteToDebugLog(indicator.Count);          for (int i = 0; i < indicator.Count; i++)          {             WriteToDebugLog(indicator[i]);          }          foreach(IndicatorBase ib in _startIndexList) if (ib.FirstValidIndex > StartIndex) StartIndex = ib.FirstValidIndex; }


Debug log:
CODE:
---Symbol by Symbol Debug Logs--- ---TestSignal--- s1 s2 2517 NaN NaN NaN NaN NaN NaN NaN NaN NaN


Strategy config
0
- ago
#5
You're on the right track (I misread your question late night). Looks like its values simply cannot be recognized (parse error?). Also, there must be double values, not strings like "s1", "s2".
0
- ago
#6
When I test using the following config on the Same ticker in the dataset I loaded it works. But when I tried to use it on a different ticker but using symbol qualifier as shown in the last message it did not work...


0
- ago
#7
QUOTE:
You're on the right track (I misread your question late night). Looks like its values simply cannot be recognized (parse error?). Also, there must be double values, not strings like "s1", "s2".


yes there are double values, as you can see above the values could be loaded if the same symbol is used for test. "s1" and "s2" are just the names of the named series.
0
- ago
#8
Make sure this DataSet is enabled in Data Manager > Historical Providers and experiment with the order of providers there (they can be rearranged).
0
- ago
#9
@Eugene, thanks for the pointer. I feel that might not be the problem since for the external data set I could get OHLCV data, but not the named series data attached to it.

One possibility might be the following call. When creating external symbols (the symbol filter qualifier), maybe only OHLCV data is kept but not the named series data values (I still see the names but values are all NaNs)

CODE:
         externalSymbol = GetHistory(bars, "TESTSIGNAL");
1
- ago
#10
QUOTE:
When creating external symbols (the symbol filter qualifier), maybe only OHLCV data is kept but not the named series data values (I still see the names but values are all NaNs)

You're right, this seems to be happening and we need to investigate.
0
- ago
#11
Thanks Eugene. Do I need to file a bug report somewhere?
0
- ago
#12
No.
0
- ago
#13
To be fixed in B94.
2
Cone8
 ( 7.89% )
- ago
#14
Build 94 is ready.
0
Best Answer

Reply

Bookmark

Sort