It's a function, not a stock. Stocks should be defined only in include files and they are compiled in the binary (.amxx) only if they are called in code. So if you have an include file with 100 stocks but your plugin only calls one of them (and that one stock does not use any of the other stocks), then 99 of them are excluded in the .amxx at compile time.
If you want a variable accessible throughout your plugin then you declare it globally at the top of your plugin. If you want the variable accessible in only one function, then you declare it within the function.