hello,
I have some continuous intraday (5 min bar) data series that have some additional data after the usual data (date, time open, high,low, close). this includes (in the next fields after close) tickvolume, and the actual contract month of the current contract in YYYYMM format. so each row in the series is : date, time, open, high, low, close, upticks, contractmonth. Series is comma delimited. I'm trying to get the value of the last two columns into a scanner column but keep getting 0's in scanner despite the fact that they are populated with non zero numbers in the file. All other data reads into the scanner fine, (high, close, etc). Also, the files are .txt comma delimited and aciii mapped to symbols in Multicharts and updated once a day at the end of the day.
Does anyone have a suggestion as to how to get the data beyons the close into scanner columns?
thanks in advance.
scanner column data
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: scanner column data
Hello juanmon,
Do i understand you correctly that you are using ASCII file to feed data into MC (ASCII mapping or ASCII import)?
Do i understand you correctly that you are using ASCII file to feed data into MC (ASCII mapping or ASCII import)?
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: scanner column data
If you want to get those last 2 values (columns) from the ASCII file into the scanner window, you will need to create a custom indicator, that would be reading the values and plotting them them in the scanner.
Re: scanner column data
Got it.
I don't see any type of sample code in the manuals that would do that. Could you give an example or just a starting point of what type of easylanguage code would accomplish this, or could you point me to a manual or somewhere that would show me how this can be coded?
I don't see any type of sample code in the manuals that would do that. Could you give an example or just a starting point of what type of easylanguage code would accomplish this, or could you point me to a manual or somewhere that would show me how this can be coded?
Re: scanner column data
in other words, what would be the line of code or reference word that would access these extra data points (columns).
something I would guess like value1=close, except "close" is the word that references the values I'm trying to get perhaps?
something I would guess like value1=close, except "close" is the word that references the values I'm trying to get perhaps?
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: scanner column data
In order to do this you will need an external .dll that could read the file and plot the values. In order to call required function from that .dll file you will need to use the DefineDLLFunc keyword.
Re: scanner column data
You can use ELC to read ASCII csv files. Here is some sample code and sample csv file. Cut and paste following csv entries including the header line to a file and save to c:\equity.csv.
equity.csv file:
Ticker,Date,EPS
@ES,9/30/2008,45.95
@ES,6/30/2008,51.37
@ES,3/31/2008,60.39
@ES,12/31/2007,66.18
@ES,9/30/2007,78.6
Code to read the file:
equity.csv file:
Ticker,Date,EPS
@ES,9/30/2008,45.95
@ES,6/30/2008,51.37
@ES,3/31/2008,60.39
@ES,12/31/2007,66.18
@ES,9/30/2007,78.6
Code to read the file:
Code: Select all
inputs:
fileName("c:\equity.csv");
vars:
dataMap(MapSC.New),
tickerList(0),
dateList(0),
epsList(0),
fli(0);
once begin
if ELC.PathExists(fileName) then begin
value1 = MapSC.ReadFile(dataMap, fileName);
// Check map count in case file was empty
if (MapSC.Count(dataMap) > 1) then begin
tickerList = MapSC.Get(dataMap, "Ticker");
dateList = MapSC.Get(dataMap, "Date");
epsList = MapSC.Get(dataMap, "EPS");
end;
for fli = 1 to ListS.Count(tickerList) begin
print(ListS.Get(tickerList, fli), " , ",
ListS.Get(dateList, fli), " , ",
ListN.Get(epsList, fli));
end;
end
else
print ("File does not exist");
end;