Error 40. CategoryRemoveSymbol: Removing from sector is unsupported, remove from industry instead

Occurs when categorySector is used in CategoryRemoveSymbol function. You can not remove symbol from sector because symbols are linked to industry groups only and industry groups are then assigned to sectors. One sector usually includes several industry groups and if you set the industry then sector is implict. Refer to AmiBroker Users Guide for more information about categories.

CategoryRemoveSymbol( "", categorySector, 2 ); // wrong, you can not use categorySector

CategoryRemoveSymbol( "", categoryIndustry, 2 ); // correct