You could just make the argument optional. However, I'd recommend adding a few more features:
- Make the symbol bold if the ambient text is.
- Use
\mathchoice to make the symbol adjust its size in, say, a subscript.
\documentclass{article}
\usepackage{amsmath,amsfonts}
\usepackage{tikz}
\makeatletter
\DeclareRobustCommand{\checkbold}[1]{% https://tex.stackexchange.com/a/24635/121799
\edef\@tempa{\math@version}\edef\@tempb{bold}%
\ifx\@tempa\@tempb%
\def#1{1}%
\else
\def#1{0}%
\fi}
\makeatother
\newcommand{\excl}[1][]{\checkbold\tmp%
\ensuremath{\operatorname{%
\mathchoice{%
\begin{tikzpicture}[#1]
\draw[line cap=round,line width=(1+0.33*\tmp)*0.06em] (0,0) --(1.4ex,0) -- (2.2ex,0.6ex)
(1.4ex,0) -- (2.2ex,-0.6ex);
\end{tikzpicture}}{%
\begin{tikzpicture}[#1]
\draw[line cap=round,line width=(1+0.33*\tmp)*0.06em] (0,0) --(1.4ex,0) -- (2.2ex,0.6ex)
(1.4ex,0) -- (2.2ex,-0.6ex);
\end{tikzpicture}}{%
\begin{tikzpicture}[#1]
\draw[line cap=round,line width=(1+0.33*\tmp)*0.045em] (0,0) --(1.05ex,0) --
(1.6ex,0.45ex)
(1.05ex,0) -- (1.6ex,-0.45ex);
\end{tikzpicture}}{%
\begin{tikzpicture}[#1]
\draw[line cap=round,line width=(1+0.33*\tmp)*0.035em] (0,0) --(0.85ex,0) --
(1.4ex,0.35ex)
(0.85ex,0) -- (1.4ex,-0.35ex);
\end{tikzpicture}}}}}
\newcommand{\oldexcl}[1][]{\operatorname{\begin{tikzpicture}[#1]
\draw[line cap=round] (0,0) --(1.4ex,0) -- (2.2ex,0.6ex);
\draw[line cap=round] (1.4ex,0) -- (2.2ex,-0.6ex);
\end{tikzpicture}}}
\begin{document}
$A\excl B$ $X_{A\excl B}$ \boldmath $A\excl B$ $X_{A\excl B}$\unboldmath\par
$A\oldexcl B$ $X_{A\oldexcl B}$ \boldmath $A\oldexcl B$ $X_{A\oldexcl B}$\unboldmath\par
$A\excl[baseline=-0.65ex,purple] B$
\end{document}

The first line shows how the symbol behaves with these additional features, the second line shows what happens without them, and the third line illustrates what the optional argument(s) can be used for.
[1]and[#1]but if then seems big or small for you try placing at the deleted[#1]'s position something like[scale=0.8]or similar... – koleygr Aug 28 '19 at 01:49\newcommand{\excl}[1][]{\operatorname{ \begin{tikzpicture}[#1] \draw[line cap=round,line width=0.07em] (0,0) --(1.4ex,0) -- (2.2ex,0.6ex); \draw[line cap=round,line width=0.07em] (1.4ex,0) -- (2.2ex,-0.6ex); \end{tikzpicture} }}, i.e. make the argument optional by adding[]. These optional arguments can be useful if you want, say, to change the baseline of the picture. BTW, I'd specify the line width in scalable units, too, hence theline width=0.07em. That way the symbol really adjusts to the font size. – Aug 28 '19 at 01:54