Import custom data related to market not symbols


#1

Hello,

I want to import data related to market digest and trading compostion related to market (non oHLCV data)
i used the ascii importer but nothing happens and don't know how to call it after import in my AFL or link it to the market instead of a symbol.

please help.


#2

@ahm.montaser, your question does not show us How you imported the data, what the data is, or to what fields, or how you tried to access it after importing.

So instead of making us guess, can you show us a sample of the data, show us the ascii import file format, and the afl code (PLEASE use the code block "</>" when you post it) so we can see what you are doing.

Then we can intelligently try to help.

With your recent joining, please make sure you have reviewed the following: How to use this site


#3

@snoopy.pa30 : thanks for your reply and sorry for not taking care of the notes.

here is the answer to the missing info

  • The data file is DATE_DMY,Tot_Turnover,Retail,Institutional,Foreign,Regional,Local,.......etc information for market trading flow and therefore they have to be stored as info of the whole market not a single symbol.

data snippet:

Date,Total Turnover,Retail,Institutional,Foreign,Regional,Local,
5-2-2018,1526174453,940123463.1,586050990,317444286.2,151091270.9,1057638896,

here is the ASCII format i used

$FORMAT DATE_DMY,Tot_Turnover,Retail,Institutional,Foreign,Regional,Local,

I don't have a AFL code yet as i don't know how to access those data

I also did a lot of search on adding custom data columns but didn't find anything describing except those describing adding AUX1 and AUX2 for symbols which is not useful for my case.

Thanks again for your help


#4

@ahm.montaser: Glad to see you using the code blocks.

I suspect that you will have to create your own Symbol, and import your data into it. It seems that you are part way there. The ASCII format file you have is designed to import quotation data, so you need to "map" your fields to standard quotation fields. Basically you re-label your data. So your Tot_Turnover could be mapped to Open, Retail to High, ... When you decide your mapping, update your ASCII format file, and import into your NEW symbol.

You will then need to learn about the Foreign command to access the data.

A bit of a warning.... Your sample numbers have 9 and 10 digits in them. With the limitation of using a 32 bit signed integer, the Max value is 2,147,483,647. I do not know if your data will exceed this limit, but worth thinking about before you get too far into the process.

I hope you understand that learning this by doing it yourself is a valuable skill, as opposed to me (or another user) supplying you with a coded solution. (I know I learn more by doing it myself, and hope you will too.)