- ago
I export data in ASCII format from a data provider. It includes all the standard fields (Date, Security Name, OHLC, Volume) plus one more: Unadjusted Close. Even after opening a sample file there is no such name listed under Field nor an option to create one. So I added it as a Named Series - while it got added that way no such column is shown in Data Manager (it only shows the usual standard columns but no Unadjusted Close).
What am I doing wrong? How do I add this particular field?
0
283
Solved
7 Replies

Reply

Bookmark

Sort
- ago
#1
You're not doing anything wrong. Unadjusted Close is just an optional series like many other possible fields, so adding it as Named Series is the right way to do it. The Data Manager will show the standard DTOHLCV only.

To display named series, check in your code if such named series exists in the BarHistory and then plot it (QuickRef, BarHistory > NamedSeries). Also, there's NamedSeries indicator that does just that for convenience - plots a named series.
0
Best Answer
- ago
#2
Can you please show the correct usage? The following is not working:
CODE:
         if (bars.NamedSeries.Count > 0)          {             unadjCls = bars.NamedSeries.ContainsKey("Unadjusted Close");          }
0
- ago
#3
Never mind, figured it out, I'm new to ASCII.

Thanks for the help!
1
Glitch8
 ( 9.56% )
- ago
#4
This is the usage:

CODE:
public override void Initialize(BarHistory bars) {          TimeSeries ts = bars.GetNamedSeries("AdjClose");          if (ts != null)             PlotTimeSeries(ts, "AdjClose", "AdjClose"); }
3
- ago
#5
👍
0
- ago
#6
How come GetNamedSeries isn't showing under BarHistory in the QuickRef? I'm I looking in the wrong place? I'm running WL8 Build 21.
0
Glitch8
 ( 9.56% )
- ago
#7
Probably because we neglected to document it. I'll add it to the list.
1

Reply

Bookmark

Sort