Shariah & PN17 Bursa Malaysia
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © mukhlisahmadmy

//DISCLAIMER *************************************************************************************************//
// This Shariah Indicator ONLY and MERELY applicable to be used with BURSA MALAYSIA STOCK MARKET

// List of Shariah Stock Was Extracted From:
// - https://www.bursamalaysia.com/market_information/equities_prices

// List of PN17 & GN3 Stock Was Extracted From:
// - https://www.bursamalaysia.com/trade/trading_resources/listing_directory/pn17_and_gn13_companies

// This Indicator Was Built by Referring To:
// -https://www.tradingview.com/script/tKoaNdYm-Saham-Syariah-Indonesia-The-Most-Liquid-Sharia-Stocks-Indonesia/
//************************************************************************************************************//

//HOW DOES THE INDICATOR WORK*********************************************************************************//
// 0. This is an overlay type of indicator. (Panel on chart)
// 1. This indicator list all shariah stock including warrant up to the month & year stated on the panel.
// 2. User may update the list (delete or adding) accordingly - refer to comment in the code
// 3. Panel of the indicator may be relocated in the indicator setting - default: TOP RIGHT
// 4. Panel will indicate Red Color with 'PN17' text for PN17/G3 stock 
// 5. Panel will indicate Green Color with 'S' text for shariah stock
// 6. Panel will indicate none for non-shariah stock
// 7. If shariah stock was listed as PN17/GN3 stock, panel will indicate as PN17
//************************************************************************************************************//

//@version=5
indicator(title="Shariah & PN17 Bursa Malaysia", shorttitle="S", overlay=true)

TablePos = input.string(title="Location", defval="Top Right", 
     options=["Top Right",  "Middle Right",  "Bottom Right", 
              "Top Center", "Middle Center", "Bottom Center", 
              "Top Left",   "Middle Left",   "Bottom Left"], group = "Display Panel")

_tablePos= TablePos== "Top Right"    ? position.top_right: 
           TablePos== "Middle Right" ? position.middle_right:  
           TablePos== "Bottom Right" ? position.bottom_right: 
           TablePos== "Top Center"   ? position.top_center: 
           TablePos== "Middle Center"? position.middle_center:
           TablePos== "Bottom Center"? position.bottom_center:
           TablePos== "Top Left"     ? position.top_left: 
           TablePos== "Middle Left"  ? position.middle_left:position.bottom_left

Size = input.string(title="Size", defval="Small", 
     options=["Normal", "Small", "Tiny"], group = "Display Panel")

_size= Size == "Normal"? size.normal:Size == "Small"? size.small: size.tiny

//Code Required Frequent Update Referring to Bursa Malaysia Website....................................................
pn17_gn3 = array.new_string(20, "") //<<-Number of PN17 & GN3 Stock
shariah = array.new_string(971, "") //<<-Number of shariah Stock

update_date = "22/06/15" //<<-Year/Month/Date Updated

//PN17 & GN3 Stocks List
array.push(pn17_gn3,'AAX')
array.push(pn17_gn3,'AMEDIA')
array.push(pn17_gn3,'BARAKAH')
array.push(pn17_gn3,'BERTAM')
array.push(pn17_gn3,'CAPITALA')
array.push(pn17_gn3,'CAPITALA-WA')
array.push(pn17_gn3,'CAP')
array.push(pn17_gn3,'COMCORP')
array.push(pn17_gn3,'DOLMITE')
array.push(pn17_gn3,'EATECH')
array.push(pn17_gn3,'FSBM')
array.push(pn17_gn3,'IQZAN')
array.push(pn17_gn3,'IREKA')
array.push(pn17_gn3,'JERASIA')
array.push(pn17_gn3,'KHEESAN')
array.push(pn17_gn3,'KTB')
array.push(pn17_gn3,'MPCORP')
array.push(pn17_gn3,'PRKCORP')
array.push(pn17_gn3,'PGB')
array.push(pn17_gn3,'SAPNRG')
array.push(pn17_gn3,'SCOMIES')
array.push(pn17_gn3,'SCOMI')
array.push(pn17_gn3,'SCOMI-WB')
array.push(pn17_gn3,'SEACERA')
array.push(pn17_gn3,'SERBADK')
array.push(pn17_gn3,'SERBADK-WA')
array.push(pn17_gn3,'THHEAVY')
array.push(pn17_gn3,'TOPBLDS')
array.push(pn17_gn3,'IDMENSN')
array.push(pn17_gn3,'GNB')

//Bursa Malaysia Shariah Stocks List
array.push(shariah,'DNEX')
array.push(shariah,'TOPGLOV')
array.push(shariah,'WIDAD')
array.push(shariah,'YONGTAI')
array.push(shariah,'YEWLEE')
array.push(shariah,'SERBADK')
array.push(shariah,'JETSON')
array.push(shariah,'JSB')
array.push(shariah,'SUPERMX')
array.push(shariah,'LGMS')
array.push(shariah,'SERBADK-WA')
array.push(shariah,'HIBISCS')
array.push(shariah,'IRIS')
array.push(shariah,'CYPARK')
array.push(shariah,'NWP')
array.push(shariah,'BPLANT')
array.push(shariah,'SAPNRG')
array.push(shariah,'HEXIND')
array.push(shariah,'PWORTH')
array.push(shariah,'JADEM')
array.push(shariah,'DSONIC')
array.push(shariah,'HIAPTEK')
array.push(shariah,'AEMULUS')
array.push(shariah,'CNERGEN')
array.push(shariah,'ICONIC')
array.push(shariah,'MERIDIAN')
array.push(shariah,'HARTA')
array.push(shariah,'PA')
array.push(shariah,'SEDANIA')
array.push(shariah,'KNM')
array.push(shariah,'JTIASA')
array.push(shariah,'MNHLDG')
array.push(shariah,'CAPITALA')
array.push(shariah,'FFB')
array.push(shariah,'MYEG')
array.push(shariah,'SIAB')
array.push(shariah,'DYNACIA')
array.push(shariah,'SCIB')
array.push(shariah,'EVERGRN')
array.push(shariah,'GENETEC')
array.push(shariah,'TANCO')
array.push(shariah,'INARI')
array.push(shariah,'PTRANS')
array.push(shariah,'QES')
array.push(shariah,'ATAIMS')
array.push(shariah,'AXIATA')
array.push(shariah,'NOVAMSC')
array.push(shariah,'JAG')
array.push(shariah,'EKOVEST')
array.push(shariah,'DATAPRP')
array.push(shariah,'BSTEAD')
array.push(shariah,'CITAGLB')
array.push(shariah,'GREATEC')
array.push(shariah,'AHB')
array.push(shariah,'ARTRONIQ')
array.push(shariah,'NESTCON')
array.push(shariah,'STRAITS-WA')
array.push(shariah,'KOSSAN')
array.push(shariah,'WCT')
array.push(shariah,'DESTINI')
array.push(shariah,'COCOLND')
array.push(shariah,'VS')
array.push(shariah,'CAREPLS')
array.push(shariah,'DSONIC-WA')
array.push(shariah,'PMETAL')
array.push(shariah,'HENGYUAN')
array.push(shariah,'CTOS')
array.push(shariah,'JSB-WB')
array.push(shariah,'SIMEPROP')
array.push(shariah,'EMICO')
array.push(shariah,'CRG')
array.push(shariah,'VELESTO-WA')
array.push(shariah,'ASIAPLY')
array.push(shariah,'TSH')
array.push(shariah,'PERMAJU')
array.push(shariah,'CMSB')
array.push(shariah,'TENAGA')
array.push(shariah,'XL')
array.push(shariah,'AIMFLEX')
array.push(shariah,'BAHVEST')
array.push(shariah,'SIME')
array.push(shariah,'DANCO')
array.push(shariah,'MRCB')
array.push(shariah,'MINDA')
array.push(shariah,'DIALOG')
array.push(shariah,'JAKS')
array.push(shariah,'FRONTKN-WB')
array.push(shariah,'SWIFT')
array.push(shariah,'ALAM')
array.push(shariah,'SDS')
array.push(shariah,'MAHSING')
array.push(shariah,'GPACKET')
array.push(shariah,'SCOPE')
array.push(shariah,'SPSETIA')
array.push(shariah,'VINVEST')
array.push(shariah,'LAYHONG')
array.push(shariah,'YBS')
array.push(shariah,'MESTRON-WA')
array.push(shariah,'UCREST')
array.push(shariah,'CENSOF')
array.push(shariah,'CENSOF')
array.push(shariah,'STRAITS')
array.push(shariah,'MQTECH')
array.push(shariah,'MASTEEL')
array.push(shariah,'NIHSIN')
array.push(shariah,'BSLCORP')
array.push(shariah,'MPAY')
array.push(shariah,'CORAZA')
array.push(shariah,'IOICORP')
array.push(shariah,'HWGB')
array.push(shariah,'SYSCORP')
array.push(shariah,'IFCAMSC')
array.push(shariah,'ANCOMLB')
array.push(shariah,'VC')
array.push(shariah,'OWG')
array.push(shariah,'KPOWER')
array.push(shariah,'TAFI')
array.push(shariah,'BIOHLDG')
array.push(shariah,'RSAWIT')
array.push(shariah,'HARNLEN-WB')
array.push(shariah,'PHARMA')
array.push(shariah,'ECOFIRS')
array.push(shariah,'BPURI')
array.push(shariah,'TALAMT')
array.push(shariah,'TEXCHEM')
array.push(shariah,'ALRICH')
array.push(shariah,'WPRTS')
array.push(shariah,'ECONBHD')
array.push(shariah,'NEXGRAM')
array.push(shariah,'TDM')
array.push(shariah,'EURO')
array.push(shariah,'MI')
array.push(shariah,'MEDIAC')
array.push(shariah,'MRCB-WB')
array.push(shariah,'BORNOIL')
array.push(shariah,'NYLEX')
array.push(shariah,'OCK')
array.push(shariah,'SCOPE-WB')
array.push(shariah,'FRONTKN')
array.push(shariah,'DUFU')
array.push(shariah,'BINTAI')
array.push(shariah,'MESTRON')
array.push(shariah,'JHM')
array.push(shariah,'ICON')
array.push(shariah,'DAYANG')
array.push(shariah,'G3')
array.push(shariah,'HHGROUP')
array.push(shariah,'HARBOUR')
array.push(shariah,'VERTICE')
array.push(shariah,'FIAMMA')
array.push(shariah,'TWL')
array.push(shariah,'PUC')
array.push(shariah,'OWG-WA')
array.push(shariah,'THPLANT')
array.push(shariah,'DYNACIA-WA')
array.push(shariah,'TAFI-WA')
array.push(shariah,'CAPITALA-WA')
array.push(shariah,'RL')
array.push(shariah,'AT')
array.push(shariah,'REDTONE')
array.push(shariah,'RGTBHD')
array.push(shariah,'PASUKGB')
array.push(shariah,'SCBUILD')
array.push(shariah,'VC-WC')
array.push(shariah,'MYCRON')
array.push(shariah,'MUHIBAH')
array.push(shariah,'GTRONIC')
array.push(shariah,'KGROUP')
array.push(shariah,'KRONO')
array.push(shariah,'BAUTO')
array.push(shariah,'CJCEN')
array.push(shariah,'AYS')
array.push(shariah,'MEGASUN')
array.push(shariah,'PECCA')
array.push(shariah,'CEPAT')
array.push(shariah,'SCNWOLF')
array.push(shariah,'SAUDEE')
array.push(shariah,'KAREX')
array.push(shariah,'UZMA')
array.push(shariah,'IJM')
array.push(shariah,'IOIPG')
array.push(shariah,'MTRONIC')
array.push(shariah,'PTRANS-WB')
array.push(shariah,'PETRONM')
array.push(shariah,'MFLOUR')
array.push(shariah,'SMI')
array.push(shariah,'CAB')
array.push(shariah,'MILUX')
array.push(shariah,'GADANG')
array.push(shariah,'SMTRACK')
array.push(shariah,'BARAKAH')
array.push(shariah,'JADI')
array.push(shariah,'YLI')
array.push(shariah,'CWG-WA')
array.push(shariah,'WONG')
array.push(shariah,'ANCOMNY')
array.push(shariah,'UEMS')
array.push(shariah,'CNH')
array.push(shariah,'UWC')
array.push(shariah,'ANNJOO')
array.push(shariah,'ANNJOO')
array.push(shariah,'FGV')
array.push(shariah,'MNC')
array.push(shariah,'KOBAY')
array.push(shariah,'D&O')
array.push(shariah,'MOBILIA')
array.push(shariah,'VS-WB')
array.push(shariah,'OPCOM')
array.push(shariah,'NADIBHD')
array.push(shariah,'MGRC')
array.push(shariah,'OCR')
array.push(shariah,'PWRWELL')
array.push(shariah,'BONIA')
array.push(shariah,'PENTA')
array.push(shariah,'EDUSPEC')
array.push(shariah,'MALAKOF')
array.push(shariah,'IHH')
array.push(shariah,'CENGILD')
array.push(shariah,'HARNLEN')
array.push(shariah,'ACME')
array.push(shariah,'SYF')
array.push(shariah,'TWL-WD')
array.push(shariah,'BSLCORP-WA')
array.push(shariah,'GOB')
array.push(shariah,'AJIYA')
array.push(shariah,'DIGI')
array.push(shariah,'PCHEM')
array.push(shariah,'DPS')
array.push(shariah,'LKL')
array.push(shariah,'GBGAQRS')
array.push(shariah,'SKBSHUT')
array.push(shariah,'MAXIS')
array.push(shariah,'MESB')
array.push(shariah,'TASHIN')
array.push(shariah,'MRDIY')
array.push(shariah,'VELESTO')
array.push(shariah,'MOBILIA-WA')
array.push(shariah,'COMFORT-WB')
array.push(shariah,'PESTECH')
array.push(shariah,'MKLAND')
array.push(shariah,'SOP')
array.push(shariah,'MTRONIC-OR')
array.push(shariah,'TITIJYA')
array.push(shariah,'LCTITAN')
array.push(shariah,'FITTERS')
array.push(shariah,'RGTECH')
array.push(shariah,'GPACKET-WB')
array.push(shariah,'SCIENTX')
array.push(shariah,'INNO')
array.push(shariah,'AXTERIA')
array.push(shariah,'KGB')
array.push(shariah,'EPMB')
array.push(shariah,'ECOWLD')
array.push(shariah,'LUXCHEM')
array.push(shariah,'EG')
array.push(shariah,'HWATAI')
array.push(shariah,'CCK')
array.push(shariah,'OPTIMAX-WA')
array.push(shariah,'PRIVA')
array.push(shariah,'NOTION')
array.push(shariah,'MSM')
array.push(shariah,'SCOMNET')
array.push(shariah,'AEON')
array.push(shariah,'GFM')
array.push(shariah,'GUH')
array.push(shariah,'TAANN')
array.push(shariah,'LIONIND')
array.push(shariah,'HEVEA')
array.push(shariah,'AME')
array.push(shariah,'ECOMATE')
array.push(shariah,'ATECH')
array.push(shariah,'BIG')
array.push(shariah,'LBALUM')
array.push(shariah,'SLVEST')
array.push(shariah,'VIZIONE-WE')
array.push(shariah,'WTK')
array.push(shariah,'KAB')
array.push(shariah,'PA-WB')
array.push(shariah,'DNONCE')
array.push(shariah,'CGB')
array.push(shariah,'ECOWLD-WB')
array.push(shariah,'FM')
array.push(shariah,'YB')
array.push(shariah,'CHHB-WB')
array.push(shariah,'GASMSIA')
array.push(shariah,'LBS')
array.push(shariah,'NICE')
array.push(shariah,'GDEX')
array.push(shariah,'CFM')
array.push(shariah,'TECHBND')
array.push(shariah,'POHKONG')
array.push(shariah,'TALIWRK')
array.push(shariah,'KSL')
array.push(shariah,'SCNWOLF-WA')
array.push(shariah,'JIANKUN')
array.push(shariah,'CHINWEL')
array.push(shariah,'TAMBUN')
array.push(shariah,'CUSCAPI')
array.push(shariah,'PWROOT')
array.push(shariah,'HHHCORP')
array.push(shariah,'FPGROUP')
array.push(shariah,'EDARAN')
array.push(shariah,'MISC')
array.push(shariah,'PMBTECH')
array.push(shariah,'LITRAK')
array.push(shariah,'ANNUM')
array.push(shariah,'KFIMA')
array.push(shariah,'COMFORT')
array.push(shariah,'TCS-WA')
array.push(shariah,'GAMUDA')
array.push(shariah,'L&G')
array.push(shariah,'TEKSENG')
array.push(shariah,'NCT')
array.push(shariah,'KARYON')
array.push(shariah,'KAB-WA')
array.push(shariah,'MICROLN')
array.push(shariah,'DRBHCOM')
array.push(shariah,'HEXTAR')
array.push(shariah,'SCGM')
array.push(shariah,'CSCENIC')
array.push(shariah,'TASCO')
array.push(shariah,'EASTLND')
array.push(shariah,'KPJ')
array.push(shariah,'ZELAN')
array.push(shariah,'RGTBHD-WB')
array.push(shariah,'KGB-WB')
array.push(shariah,'SERNKOU')
array.push(shariah,'LAGENDA')
array.push(shariah,'TECHNAX')
array.push(shariah,'ECOFIRS-WD')
array.push(shariah,'VIZIONE-WD')
array.push(shariah,'WONG-WA')
array.push(shariah,'CSCSTEL')
array.push(shariah,'PANTECH')
array.push(shariah,'SASBADI')
array.push(shariah,'HOMERIZ')
array.push(shariah,'MELEWAR')
array.push(shariah,'BPURI-WA')
array.push(shariah,'SERSOL')
array.push(shariah,'SALCON')
array.push(shariah,'CARIMIN')
array.push(shariah,'OPENSYS')
array.push(shariah,'CHHB')
array.push(shariah,'AVI')
array.push(shariah,'HONGSENG')
array.push(shariah,'TOPBLDS')
array.push(shariah,'MITRA')
array.push(shariah,'ENGTEX-WB')
array.push(shariah,'GDB')
array.push(shariah,'AMEDIA')
array.push(shariah,'SKPRES-WB')
array.push(shariah,'FPI')
array.push(shariah,'SKBSHUT-WA')
array.push(shariah,'TOYOVEN-WB')
array.push(shariah,'EWINT')
array.push(shariah,'PBA')
array.push(shariah,'TROP')
array.push(shariah,'ESCERAM')
array.push(shariah,'RL-WA')
array.push(shariah,'ADVENTA')
array.push(shariah,'AT-WC')
array.push(shariah,'SEALINK')
array.push(shariah,'GDB-WA')
array.push(shariah,'VIS')
array.push(shariah,'HUPSENG')
array.push(shariah,'TM')
array.push(shariah,'PUNCAK')
array.push(shariah,'JCY')
array.push(shariah,'POS')
array.push(shariah,'JAKS-WC')
array.push(shariah,'VIZIONE')
array.push(shariah,'KANGER')
array.push(shariah,'PIE')
array.push(shariah,'HPMT')
array.push(shariah,'VIS-WB')
array.push(shariah,'BURSA')
array.push(shariah,'GKENT')
array.push(shariah,'BDB')
array.push(shariah,'IVORY')
array.push(shariah,'MERIDIAN-WC')
array.push(shariah,'SAPNRG-WA')
array.push(shariah,'SUNWAY')
array.push(shariah,'MBL')
array.push(shariah,'PEKAT')
array.push(shariah,'TAKAFUL')
array.push(shariah,'NGGB')
array.push(shariah,'PRESTAR')
array.push(shariah,'ABLEGLOB')
array.push(shariah,'SCABLE')
array.push(shariah,'SYSTECH')
array.push(shariah,'ROHAS')
array.push(shariah,'TOMYPAK')
array.push(shariah,'SALUTE')
array.push(shariah,'PARKSON')
array.push(shariah,'GLOTEC')
array.push(shariah,'MFCB')
array.push(shariah,'INNATURE')
array.push(shariah,'TGUAN')
array.push(shariah,'RANHILL')
array.push(shariah,'MAGNI')
array.push(shariah,'FOCUSP')
array.push(shariah,'SMETRIC')
array.push(shariah,'3A')
array.push(shariah,'KLK')
array.push(shariah,'KRETAM')
array.push(shariah,'SENHENG')
array.push(shariah,'POHUAT')
array.push(shariah,'XINHWA-WA')
array.push(shariah,'BJFOOD')
array.push(shariah,'PELIKAN')
array.push(shariah,'HUAYANG')
array.push(shariah,'MCT')
array.push(shariah,'TMCLIFE')
array.push(shariah,'SERSOL-WA')
array.push(shariah,'QL')
array.push(shariah,'MESB-WA')
array.push(shariah,'EDEN')
array.push(shariah,'GIIB')
array.push(shariah,'TNLOGIS')
array.push(shariah,'MINHO')
array.push(shariah,'AWANTEC-WA')
array.push(shariah,'CEKD')
array.push(shariah,'HANDAL')
array.push(shariah,'TIMECOM')
array.push(shariah,'OPTIMAX')
array.push(shariah,'PPHB')
array.push(shariah,'SWKPLNT')
array.push(shariah,'UNISEM')
array.push(shariah,'VITROX')
array.push(shariah,'SUPERLN')
array.push(shariah,'GREENYB')
array.push(shariah,'AGES')
array.push(shariah,'HHGROUP-WA')
array.push(shariah,'ARBB')
array.push(shariah,'WELLCAL')
array.push(shariah,'STAR')
array.push(shariah,'KSSC')
array.push(shariah,'HSPLANT')
array.push(shariah,'SKPRES')
array.push(shariah,'PGF')
array.push(shariah,'GCB')
array.push(shariah,'MCEMENT')
array.push(shariah,'PHB')
array.push(shariah,'SWSCAP-WB')
array.push(shariah,'TELADAN')
array.push(shariah,'ZHULIAN')
array.push(shariah,'OMH')
array.push(shariah,'SUCCESS')
array.push(shariah,'PRTASCO')
array.push(shariah,'PARAMON')
array.push(shariah,'PARAMON')
array.push(shariah,'PETGAS')
array.push(shariah,'HIGHTEC')
array.push(shariah,'PICORP')
array.push(shariah,'MIECO')
array.push(shariah,'OVH')
array.push(shariah,'SOLUTN')
array.push(shariah,'KPOWER-WA')
array.push(shariah,'ADVCON')
array.push(shariah,'UCHITEC')
array.push(shariah,'TRIVE')
array.push(shariah,'T7GLOBAL-WC')
array.push(shariah,'EFORCE')
array.push(shariah,'AAX')
array.push(shariah,'AZRB')
array.push(shariah,'UOADEV')
array.push(shariah,'ESCERAM-WB')
array.push(shariah,'WEGMANS-WC')
array.push(shariah,'SMETRIC-WA')
array.push(shariah,'MPI')
array.push(shariah,'ANZO')
array.push(shariah,'ASB')
array.push(shariah,'ASTINO')
array.push(shariah,'CWG')
array.push(shariah,'PARAMON-WA')
array.push(shariah,'LEONFB')
array.push(shariah,'GCAP')
array.push(shariah,'MBMR')
array.push(shariah,'VC-WB')
array.push(shariah,'HONGSENG-WB')
array.push(shariah,'EDGENTA')
array.push(shariah,'T7GLOBAL')
array.push(shariah,'ASDION')
array.push(shariah,'MFLOUR-WC')
array.push(shariah,'FIHB')
array.push(shariah,'LIIHEN')
array.push(shariah,'KERJAYA')
array.push(shariah,'MASTEEL-WB')
array.push(shariah,'JKGLAND')
array.push(shariah,'BPPLAS')
array.push(shariah,'MHB')
array.push(shariah,'ELSOFT')
array.push(shariah,'PRLEXUS')
array.push(shariah,'TOYOVEN')
array.push(shariah,'KPPROP')
array.push(shariah,'ACO')
array.push(shariah,'ABLEGRP')
array.push(shariah,'SUNCON')
array.push(shariah,'ULICORP')
array.push(shariah,'ENGTEX')
array.push(shariah,'ENGTEX')
array.push(shariah,'MALTON')
array.push(shariah,'KAWAN')
array.push(shariah,'EITA')
array.push(shariah,'SBCCORP')
array.push(shariah,'COMPUGT')
array.push(shariah,'MCLEAN')
array.push(shariah,'MENANG-WC')
array.push(shariah,'WIDAD-WA')
array.push(shariah,'LEESK')
array.push(shariah,'THETA')
array.push(shariah,'KUB')
array.push(shariah,'SENDAI')
array.push(shariah,'YGL')
array.push(shariah,'MHC')
array.push(shariah,'KEINHIN')
array.push(shariah,'CHOOBEE')
array.push(shariah,'INTA')
array.push(shariah,'JAYCORP')
array.push(shariah,'AXREIT')
array.push(shariah,'NTPM')
array.push(shariah,'SWSCAP')
array.push(shariah,'SNC')
array.push(shariah,'TELADAN-WA')
array.push(shariah,'RESINTC')
array.push(shariah,'TCS')
array.push(shariah,'CHUAN')
array.push(shariah,'SCGBHD')
array.push(shariah,'SOLID')
array.push(shariah,'NOVA')
array.push(shariah,'VERTICE-WA')
array.push(shariah,'TJSETIA')
array.push(shariah,'KIMLUN')
array.push(shariah,'ALAQAR')
array.push(shariah,'MATRIX')
array.push(shariah,'CBIP')
array.push(shariah,'SAMAIDEN')
array.push(shariah,'UTDPLT')
array.push(shariah,'RCECAP')
array.push(shariah,'K1')
array.push(shariah,'BIMB')
array.push(shariah,'PPB')
array.push(shariah,'ARANK')
array.push(shariah,'KMLOONG')
array.push(shariah,'TRC')
array.push(shariah,'MAXIM')
array.push(shariah,'MTAG')
array.push(shariah,'OCNCASH')
array.push(shariah,'SYMLIFE')
array.push(shariah,'CAMRES')
array.push(shariah,'CAMRES')
array.push(shariah,'PERDANA')
array.push(shariah,'PESONA')
array.push(shariah,'PARAGON')
array.push(shariah,'BINACOM')
array.push(shariah,'DPS-WB')
array.push(shariah,'SLVEST-WA')
array.push(shariah,'SALCON-WB')
array.push(shariah,'BENALEC')
array.push(shariah,'FIMACOR')
array.push(shariah,'PTT')
array.push(shariah,'GCB-WB')
array.push(shariah,'GHLSYS')
array.push(shariah,'BTM')
array.push(shariah,'OCK-WB')
array.push(shariah,'KOMARK')
array.push(shariah,'CHINHIN')
array.push(shariah,'KOMARK-WC')
array.push(shariah,'SPRING')
array.push(shariah,'AWC')
array.push(shariah,'KHJB')
array.push(shariah,'KMLOONG-WB')
array.push(shariah,'PRLEXUS-WB')
array.push(shariah,'MUDA')
array.push(shariah,'PADINI')
array.push(shariah,'N2N')
array.push(shariah,'CHGP')
array.push(shariah,'E&O')
array.push(shariah,'SAM')
array.push(shariah,'WOODLAN')
array.push(shariah,'HOMERIZ-WB')
array.push(shariah,'LOTUS')
array.push(shariah,'SIGN')
array.push(shariah,'XL-WA')
array.push(shariah,'UMW')
array.push(shariah,'ANEKA')
array.push(shariah,'FLEXI')
array.push(shariah,'HOHUP')
array.push(shariah,'PWROOT-WA')
array.push(shariah,'HPPHB')
array.push(shariah,'F&N')
array.push(shariah,'ECOHLDS')
array.push(shariah,'VSTECS')
array.push(shariah,'AHEALTH')
array.push(shariah,'FAREAST')
array.push(shariah,'PNEPCB')
array.push(shariah,'RKI')
array.push(shariah,'APB')
array.push(shariah,'EUPE')
array.push(shariah,'FSBM')
array.push(shariah,'FSBM')
array.push(shariah,'KANGER-WB')
array.push(shariah,'SCOMNET-WA')
array.push(shariah,'SNC-WB')
array.push(shariah,'WATTA')
array.push(shariah,'PENERGY')
array.push(shariah,'MAGNA')
array.push(shariah,'BOILERM')
array.push(shariah,'INTA-WA')
array.push(shariah,'CRESNDO')
array.push(shariah,'HTPADU')
array.push(shariah,'CAPITALA-LA')
array.push(shariah,'BKAWAN')
array.push(shariah,'HUBLINE')
array.push(shariah,'CAELY')
array.push(shariah,'EASTLND-WB')
array.push(shariah,'PLENITU')
array.push(shariah,'SAPIND')
array.push(shariah,'GLOMAC')
array.push(shariah,'PTARAS')
array.push(shariah,'FAVCO')
array.push(shariah,'KPS')
array.push(shariah,'PETDAG')
array.push(shariah,'SLP')
array.push(shariah,'IQGROUP')
array.push(shariah,'NAIM')
array.push(shariah,'MCEHLDG')
array.push(shariah,'FAJAR')
array.push(shariah,'GENP')
array.push(shariah,'TIMWELL')
array.push(shariah,'KLCC')
array.push(shariah,'SEB')
array.push(shariah,'CABNET')
array.push(shariah,'GMUTUAL')
array.push(shariah,'HSSEB')
array.push(shariah,'MMAG-WB')
array.push(shariah,'N2N-WB')
array.push(shariah,'OMESTI')
array.push(shariah,'PASDEC')
array.push(shariah,'SEG')
array.push(shariah,'TEXCYCL')
array.push(shariah,'VINVEST-WE')
array.push(shariah,'PJBUMI')
array.push(shariah,'SPRITZER')
array.push(shariah,'BIPORT')
array.push(shariah,'OKA')
array.push(shariah,'MMSV')
array.push(shariah,'AJI')
array.push(shariah,'TOCEAN')
array.push(shariah,'HLIND')
array.push(shariah,'HLIND')
array.push(shariah,'SCIENTX-WC')
array.push(shariah,'SJC')
array.push(shariah,'GPHAROS')
array.push(shariah,'LIONPSIM')
array.push(shariah,'SAB')
array.push(shariah,'AWANTEC')
array.push(shariah,'ANCOMNY-WB')
array.push(shariah,'SENDAI-WA')
array.push(shariah,'CRESBLD')
array.push(shariah,'SURIA')
array.push(shariah,'ENEST')
array.push(shariah,'TRIMODE')
array.push(shariah,'AMWAY')
array.push(shariah,'CAELY-WB')
array.push(shariah,'SHL')
array.push(shariah,'TONGHER')
array.push(shariah,'ITRONIC')
array.push(shariah,'PESTECH-WA')
array.push(shariah,'GLBHD')
array.push(shariah,'PENSONI')
array.push(shariah,'IBRACO')
array.push(shariah,'GOPENG')
array.push(shariah,'KEN')
array.push(shariah,'SEAL')
array.push(shariah,'SMRT')
array.push(shariah,'KHIND')
array.push(shariah,'GOLDETF')
array.push(shariah,'NESTLE')
array.push(shariah,'PDZ')
array.push(shariah,'MKH')
array.push(shariah,'TGL')
array.push(shariah,'APOLLO')
array.push(shariah,'EUROSP')
array.push(shariah,'HOMERIZ-WC')
array.push(shariah,'LYC')
array.push(shariah,'UPA')
array.push(shariah,'HAILY')
array.push(shariah,'KESM')
array.push(shariah,'KNUSFOR')
array.push(shariah,'SCIB-WB')
array.push(shariah,'BTECH')
array.push(shariah,'CIHLDG')
array.push(shariah,'DIN040000223')
array.push(shariah,'MSNIAGA')
array.push(shariah,'SDRED')
array.push(shariah,'UMCCA')
array.push(shariah,'XOXTECH')
array.push(shariah,'CARZO')
array.push(shariah,'IMASPRO')
array.push(shariah,'WASEONG')
array.push(shariah,'BLDPLNT')
array.push(shariah,'DLADY')
array.push(shariah,'IHS046000824')
array.push(shariah,'ALSREIT')
array.push(shariah,'APM')
array.push(shariah,'DKLS')
array.push(shariah,'MBL-WA')
array.push(shariah,'METFSID')
array.push(shariah,'MGB')
array.push(shariah,'AASIA')
array.push(shariah,'ACEINNO')
array.push(shariah,'ACME-WA')
array.push(shariah,'ADVPKG')
array.push(shariah,'AEM')
array.push(shariah,'AEM-WB')
array.push(shariah,'AFUJIYA')
array.push(shariah,'AIM')
array.push(shariah,'ALRICH-WA')
array.push(shariah,'AME-WA')
array.push(shariah,'AMLEX')
array.push(shariah,'AMTEL')
array.push(shariah,'AMTEL-WA')
array.push(shariah,'ANZO-WB')
array.push(shariah,'AORB')
array.push(shariah,'ARK')
array.push(shariah,'ASIABRN')
array.push(shariah,'ASIAPLY-PA')
array.push(shariah,'ASIAPLY-WB')
array.push(shariah,'ATTA')
array.push(shariah,'ATTA-WC')
array.push(shariah,'AURORA')
array.push(shariah,'AWC-WA')
array.push(shariah,'AXTERIA-WA')
array.push(shariah,'AYER')
array.push(shariah,'AZRB-WA')
array.push(shariah,'BABA')
array.push(shariah,'BAHVEST-WA')
array.push(shariah,'BCB')
array.push(shariah,'BERTAM')
array.push(shariah,'BHIC')
array.push(shariah,'BORNOIL-WC')
array.push(shariah,'BORNOIL-WD')
array.push(shariah,'BPPLAS-WA')
array.push(shariah,'BTM-WB')
array.push(shariah,'BVLH')
array.push(shariah,'CEPCO')
array.push(shariah,'CETECH')
array.push(shariah,'CHGP-WA')
array.push(shariah,'CHINA100-MYR')
array.push(shariah,'CITAGLB-WA')
array.push(shariah,'CITAGLB-WB')
array.push(shariah,'CLOUD')
array.push(shariah,'CME')
array.push(shariah,'CME-WA')
array.push(shariah,'CSCENIC-WA')
array.push(shariah,'CVIEW')
array.push(shariah,'CYL')
array.push(shariah,'DBHD')
array.push(shariah,'DFCITY')
array.push(shariah,'DIN045801028')
array.push(shariah,'DKSH')
array.push(shariah,'DOMINAN')
array.push(shariah,'DPHARMA')
array.push(shariah,'EATECH')
array.push(shariah,'ECONBHD-WA')
array.push(shariah,'EDUSPEC-WB')
array.push(shariah,'EIG')
array.push(shariah,'EITA-WA')
array.push(shariah,'EMETALL')
array.push(shariah,'ENCORP')
array.push(shariah,'ENGKAH')
array.push(shariah,'ENGKAH-WB')
array.push(shariah,'ENRA')
array.push(shariah,'ENRA-WA')
array.push(shariah,'ESAFE')
array.push(shariah,'EWEIN')
array.push(shariah,'EWEIN-WB')
array.push(shariah,'FAJAR-WC')
array.push(shariah,'FARLIM')
array.push(shariah,'FBBHD')
array.push(shariah,'FIHB-PA')
array.push(shariah,'FIHB-PB')
array.push(shariah,'G3-WA')
array.push(shariah,'GBGAQRS-WB')
array.push(shariah,'GDEX-WC')
array.push(shariah,'GETS')
array.push(shariah,'GIIB-WA')
array.push(shariah,'GPP')
array.push(shariah,'GUOCO')
array.push(shariah,'HCK')
array.push(shariah,'HCK-WA')
array.push(shariah,'HIL-WB')
array.push(shariah,'HONGSENG-WA')
array.push(shariah,'HSSEB-WA')
array.push(shariah,'HUBLINE-WC')
array.push(shariah,'ICON-WA')
array.push(shariah,'ICTZONE')
array.push(shariah,'IDEAL')
array.push(shariah,'INCKEN')
array.push(shariah,'IQZAN')
array.push(shariah,'IREKA')
array.push(shariah,'JAKS-WB')
array.push(shariah,'JISHAN')
array.push(shariah,'KAMDAR')
array.push(shariah,'KERJAYA-WB')
array.push(shariah,'KGROUP-WC')
array.push(shariah,'KIALIM')
array.push(shariah,'KIMHIN')
array.push(shariah,'KIMLUN-WA')
array.push(shariah,'KKB')
array.push(shariah,'KOTRA')
array.push(shariah,'KPSCB')
array.push(shariah,'KYM')
array.push(shariah,'LBS-PA')
array.push(shariah,'LEBTECH')
array.push(shariah,'LFECORP')
array.push(shariah,'LOTUS-WB')
array.push(shariah,'LSH')
array.push(shariah,'LSTEEL')
array.push(shariah,'LTKM')
array.push(shariah,'LYSAGHT')
array.push(shariah,'MASTER')
array.push(shariah,'MCOM')
array.push(shariah,'MELATI')
array.push(shariah,'MELEWAR-WB')
array.push(shariah,'MENANG')
array.push(shariah,'MENTIGA')
array.push(shariah,'MERCURY')
array.push(shariah,'METFUS50')
array.push(shariah,'MFGROUP')
array.push(shariah,'MHCARE')
array.push(shariah,'MIKROMB')
array.push(shariah,'MINETEC')
array.push(shariah,'MITRA-WE')
array.push(shariah,'MJPERAK')
array.push(shariah,'MMAG')
array.push(shariah,'MMIS')
array.push(shariah,'MNC-WB')
array.push(shariah,'MPCORP')
array.push(shariah,'MPSOL')
array.push(shariah,'MPSOL-WA')
array.push(shariah,'MUH')
array.push(shariah,'MUIPROP')
array.push(shariah,'MYCRON-WA')
array.push(shariah,'MYETFDJ')
array.push(shariah,'MYETFID')
array.push(shariah,'NEXGRAM-WB')
array.push(shariah,'NEXGRAM-WC')
array.push(shariah,'NEXGRAM-WD')
array.push(shariah,'NHFATT')
array.push(shariah,'NICE-WB')
array.push(shariah,'NOTION-WC')
array.push(shariah,'NPC')
array.push(shariah,'NPS')
array.push(shariah,'OCB')
array.push(shariah,'OFI')
array.push(shariah,'OIB')
array.push(shariah,'OIB-WA')
array.push(shariah,'OMESTI-WC')
array.push(shariah,'ORNA')
array.push(shariah,'OWG-WB')
array.push(shariah,'PAOS')
array.push(shariah,'PARKWD')
array.push(shariah,'PASDEC-WA')
array.push(shariah,'PASUKGB-WA')
array.push(shariah,'PCCS')
array.push(shariah,'PCCS-WA')
array.push(shariah,'PDZ-WB')
array.push(shariah,'PDZ-WC')
array.push(shariah,'PEB')
array.push(shariah,'PENSONI-WB')
array.push(shariah,'PERMAJU-WA')
array.push(shariah,'PERSTIM')
array.push(shariah,'PGLOBE')
array.push(shariah,'PHB-WB')
array.push(shariah,'PJBUMI-WA')
array.push(shariah,'PLB')
array.push(shariah,'PLS')
array.push(shariah,'PLS-WA')
array.push(shariah,'PMBTECH-WA')
array.push(shariah,'PMHLDG')
array.push(shariah,'PNEPCB-WA')
array.push(shariah,'PNEPCB-WB')
array.push(shariah,'POLYDM')
array.push(shariah,'PRTASCO-WA')
array.push(shariah,'PUC-WA')
array.push(shariah,'PWF')
array.push(shariah,'QUALITY')
array.push(shariah,'RALCO')
array.push(shariah,'REX')
array.push(shariah,'RGS')
array.push(shariah,'RTSTECH')
array.push(shariah,'RVIEW')
array.push(shariah,'S&FCAP')
array.push(shariah,'S&FCAP-WC')
array.push(shariah,'SAMAIDEN-WA')
array.push(shariah,'SAPNRG-PA')
array.push(shariah,'SAPRES')
array.push(shariah,'SAUDEE-WB')
array.push(shariah,'SAUDEE-WB')
array.push(shariah,'SCIPACK')
array.push(shariah,'SCIPACK-WB')
array.push(shariah,'SCOMI')
array.push(shariah,'SCOMI-WB')
array.push(shariah,'SEACERA')
array.push(shariah,'SEEHUP')
array.push(shariah,'SEERS')
array.push(shariah,'SERNKOU-WA')
array.push(shariah,'SGBHD')
array.push(shariah,'SHH')
array.push(shariah,'SJC-WA')
array.push(shariah,'SLIC')
array.push(shariah,'SMCAP')
array.push(shariah,'SMCAP-WC')
array.push(shariah,'SMILE')
array.push(shariah,'SMILE-WA')
array.push(shariah,'SMISCOR')
array.push(shariah,'SPRING-WA')
array.push(shariah,'SPSETIA-PA')
array.push(shariah,'SPSETIA-PB')
array.push(shariah,'STELLA')
array.push(shariah,'SUNMOW')
array.push(shariah,'SUNSURIA')
array.push(shariah,'SUNWAY-WB')
array.push(shariah,'SUPREME')
array.push(shariah,'TAS')
array.push(shariah,'TCHONG')
array.push(shariah,'TECHBND-WA')
array.push(shariah,'THHEAVY')
array.push(shariah,'THRIVEN')
array.push(shariah,'TITIJYA-PA')
array.push(shariah,'TOPVISN')
array.push(shariah,'TPC')
array.push(shariah,'TRIVE-WC')
array.push(shariah,'TSRCAP')
array.push(shariah,'TURIYA')
array.push(shariah,'UMS')
array.push(shariah,'UMSNGB')
array.push(shariah,'UNIMECH')
array.push(shariah,'UNIWALL')
array.push(shariah,'UTAMA')
array.push(shariah,'VERSATL')
array.push(shariah,'VOLCANO')
array.push(shariah,'WAJA')
array.push(shariah,'WANGZNG')
array.push(shariah,'WARISAN')
array.push(shariah,'WEGMANS')
array.push(shariah,'WEGMANS-WB')
array.push(shariah,'WTHORSE')
array.push(shariah,'XINHWA')
array.push(shariah,'Y&G')
array.push(shariah,'YKGI')
array.push(shariah,'YNHPROP')
array.push(shariah,'YONGTAI-PA')
array.push(shariah,'YSPSAH')
array.push(shariah,'ZECON')

//End of Code Required Frequent Update Referring to Bursa Malaysia Website....................................................

pn17_listed = array.includes(pn17_gn3, syminfo.ticker)? 1 : 0
pn17ctr = pn17_listed == 1 ? "PN17" : ""

shariah_listed = array.includes(shariah, syminfo.ticker)? 1 : 0
shariahctr = shariah_listed == 1 ? "S" : ""

var table t = table.new(_tablePos, 2, 1, border_width = 1)
 
if (barstate.islast)          
     
    table.cell(t, 0, 0, pn17_listed ? update_date:shariah_listed?update_date:"", width = 7, bgcolor = pn17_listed ? #FFFFFF : shariah_listed?#FFFFFF:na, text_color = #000000, text_size = _size)
    table.cell(t, 1, 0, pn17_listed ? pn17ctr : shariahctr, width = 4, bgcolor = pn17_listed ? #FF0000 : shariah_listed?#00B050:na, text_color = #FFFFFF, text_size = _size)
    
