scanner column data

Questions about MultiCharts and user contributed studies.
juanmon
Posts: 20
Joined: 12 May 2011
Has thanked: 3 times
Been thanked: 1 time

scanner column data

Postby juanmon » 24 Nov 2014

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.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: scanner column data

Postby Andrew MultiCharts » 25 Nov 2014

Hello juanmon,

Do i understand you correctly that you are using ASCII file to feed data into MC (ASCII mapping or ASCII import)?

juanmon
Posts: 20
Joined: 12 May 2011
Has thanked: 3 times
Been thanked: 1 time

Re: scanner column data

Postby juanmon » 25 Nov 2014

Hi Andrew,

that's correct; Acii mapping, and the files are updated at the end of the day, once per day.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: scanner column data

Postby Andrew MultiCharts » 25 Nov 2014

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.

juanmon
Posts: 20
Joined: 12 May 2011
Has thanked: 3 times
Been thanked: 1 time

Re: scanner column data

Postby juanmon » 26 Nov 2014

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?

juanmon
Posts: 20
Joined: 12 May 2011
Has thanked: 3 times
Been thanked: 1 time

Re: scanner column data

Postby juanmon » 28 Nov 2014

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?

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: scanner column data

Postby Andrew MultiCharts » 01 Dec 2014

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.

orion
Posts: 250
Joined: 01 Oct 2014
Has thanked: 65 times
Been thanked: 104 times

Re: scanner column data

Postby orion » 01 Dec 2014

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:

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;

juanmon
Posts: 20
Joined: 12 May 2011
Has thanked: 3 times
Been thanked: 1 time

Re: scanner column data

Postby juanmon » 01 Dec 2014

thanks guys. will give it a go.


Return to “MultiCharts”