Ami Database - sector classification

amitrandive

Well-Known Member
#21
Hello ,

first download csv file from this link

https://drive.google.com/file/d/0B2H...it?usp=sharing

https://drive.google.com/file/d/0B2HDkZSTrj09Y3lkY0RYTnU1Z0k/edit?pli=1

you will get I_s .csv

then create a dummy format , save that format [ give whatever name you like e.g - I_s.format]

then edit that forma t file and copy-paste these lines

$FORMAT Ticker, FullName,IndustryName,SectorName
$SEPARATOR ,
$AUTOADD 1
$NOQUOTES 1
$OVERWRITE 1
$CLEANSECTORS 1
$SORTSECTORS 1


save the changes ... now import I_s .csv with I_s format ...
your all stocks will get classified > Full Name / industry / Sector

Hope this helps
Wonder what is going wrong , only the full name is imported , not the industry and the sector.
 

casoni

Well-Known Member
#22
Wonder what is going wrong , only the full name is imported , not the industry and the sector.
check Symbols>Sectors
you will find industries / stocks

use this in title , to display Industry/sector

strWeekday = StrMid("SunMonTueWedThuFriSat", SelectedValue(DayOfWeek())*3,3);
Title = EncodeColor(colorWhite)+ " " + " - " + Name() + EncodeColor(colorGold) +" ( " +IndustryID(1)+ " )" + " [ " +SectorID(1)+ " ] "+" \n"+
EncodeColor(colorYellow) +"Op:"+O+" "+"Hi:"+H+" "+"Lo:"+L+" "+ "Cl:"+C+" "+ "Vol:"+ WriteVal(V/1000)+"\n" +" # "+strWeekday +" , "+ Date()
+" " + EncodeColor(colorAqua)+ Interval(2) ;
 

amitrandive

Well-Known Member
#23
check Symbols>Sectors
you will find industries / stocks

use this in title , to display Industry/sector

strWeekday = StrMid("SunMonTueWedThuFriSat", SelectedValue(DayOfWeek())*3,3);
Title = EncodeColor(colorWhite)+ " " + " - " + Name() + EncodeColor(colorGold) +" ( " +IndustryID(1)+ " )" + " [ " +SectorID(1)+ " ] "+" \n"+
EncodeColor(colorYellow) +"Op:"+O+" "+"Hi:"+H+" "+"Lo:"+L+" "+ "Cl:"+C+" "+ "Vol:"+ WriteVal(V/1000)+"\n" +" # "+strWeekday +" , "+ Date()
+" " + EncodeColor(colorAqua)+ Interval(2) ;
Apologise for asking again , but where to insert this code?
Sector Classification is done by Ami but only not displaying
Can you please show by a picture?

 

casoni

Well-Known Member
#24
Apologise for asking again , but where to insert this code?
Sector Classification is done by Ami but only not displaying
Can you please show by a picture?

use that in "TITLE" ... in your formulas

e.g

plot(close,"",3,132);

strWeekday = StrMid("SunMonTueWedThuFriSat", SelectedValue(DayOfWeek())*3,3);
Title = EncodeColor(colorWhite)+ " " + " - " + Name() + EncodeColor(colorGold) +" ( " +IndustryID(1)+ " )" + " [ " +SectorID(1)+ " ] "+" \n"+
EncodeColor(colorYellow) +"Op:"+O+" "+"Hi:"+H+" "+"Lo:"+L+" "+ "Cl:"+C+" "+ "Vol:"+ WriteVal(V/1000)+"\n" +" # "+strWeekday +" , "+ Date()
+" " + EncodeColor(colorAqua)+ Interval(2) ;
 

amitrandive

Well-Known Member
#25
use that in "TITLE" ... in your formulas

e.g

plot(close,"",3,132);

strWeekday = StrMid("SunMonTueWedThuFriSat", SelectedValue(DayOfWeek())*3,3);
Title = EncodeColor(colorWhite)+ " " + " - " + Name() + EncodeColor(colorGold) +" ( " +IndustryID(1)+ " )" + " [ " +SectorID(1)+ " ] "+" \n"+
EncodeColor(colorYellow) +"Op:"+O+" "+"Hi:"+H+" "+"Lo:"+L+" "+ "Cl:"+C+" "+ "Vol:"+ WriteVal(V/1000)+"\n" +" # "+strWeekday +" , "+ Date()
+" " + EncodeColor(colorAqua)+ Interval(2) ;
Great Thanks !!!
:clapping:
 

babukraman

Well-Known Member
#26
Hello everyone,
Posting after long time
here's the sector and industry classification of NSE , import format

$FORMAT Ticker, FullName,IndustryName,SectorName
$SEPARATOR ,
$AUTOADD 1
$NOQUOTES 1
$OVERWRITE 1
$CLEANSECTORS 1
$SORTSECTORS 1

please check , and let me know if there is any mistake in assign the stock to its Ind / sec

*Requires AB 5.60 or above
Thanks for the step by step procedure. However, is there a way to do such an import in version 5.30?
Thanks!
Babu Kothandaraman
 

Similar threads