dear saji,
i have formulated afl for overlaying relevent indices data over their codes.i.e.
{
if (MarketID(0)==3)PlotForeign("S&P CNX Nifty","nifty",colorGold,styleOwnScale|styleThick);
if (MarketID(0)==1)PlotForeign("900010","sensex",colorGold,styleOwnScale|styleThick);
//plot nifty over nifty indices & sensex over bse indices
if (MarketID(0)==5)PlotForeign("S&P CNX Nifty","nifty",colorGold,styleOwnScale|styleThick);
if (MarketID(0)==4)PlotForeign("900010","sensex",colorGold,styleOwnScale|styleThick);
//plot imp indices on nifty & sensex
//if ((Name()=="900010")PlotForeign("900015","midcap",colorViolet,styleOwnScale|styleThick);
//if ((Name()=="sensex")PlotForeign("900016","smallcap",colorBrown,styleOwnScale|styleThick);
//plot nifty & sensex in world charts
if (MarketID(0)==0)PlotForeign("900010","sensex",colorGold,styleOwnScale|styleThick);
if (MarketID(0)==0)PlotForeign("S&P CNX Nifty","nifty",colorViolet,styleOwnScale|styleThick);
//plot sectoral indices over nse stock
if (SectorID(0)==2)PlotForeign("900027","AUTO",colorViolet,styleOwnScale|styleThick);
if (SectorID(0)==3)PlotForeign("900026","BANK",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="IT")PlotForeign("900018","IT",colorViolet,styleOwnScale|styleThick);
if (SectorID(0)==12)PlotForeign("900028","METAL",colorViolet,styleOwnScale|styleThick);
if (SectorID(0)==13)PlotForeign("900029","OIL&GAS",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="PHARMA")PlotForeign("900022","HEALTH",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="CONSUMER GOODS")PlotForeign("900020","CGS",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="PHARMA")PlotForeign("900022","HEALTH",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="AGRI")PlotForeign("~AGRI","AGRI",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="CEMENT")PlotForeign("~CEMENT","CEMENT",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="CHEMICAL")PlotForeign("~CHEMICAL","CHEMICAL",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="CONSTRUCTION")PlotForeign("~CONSTRUCTION","CONSTRUCTION",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="DIVERSIFIED")PlotForeign("~DIVERSIFIED","DIVERSIFIED",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="ENGINEERING")PlotForeign("~ENGINEERING","ENGINEERING",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="POWER")PlotForeign("~POWER","POWER",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="SERVICES")PlotForeign("~SERVICES","SERVICES",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="TELECOM")PlotForeign("~TELECOM","TELECOM",colorViolet,styleOwnScale|styleThick);
if (SectorID(1)=="TEXTILES")PlotForeign("~TEXTILES","TEXTILE",colorViolet,styleOwnScale|styleThick);
}
problem is that i want to overlay midcap & small cap indices over nifty & sensex only .issue is that i can not get return value of symobl name in the function. plz, guide me how to get symbol name in the function to compare.
i tried to code that with name() but it does not return name.
hlp, plz.
rajneesh