My customer asked my to write an EA optimized for gold trading. But I cannot find the symbol for gold in Meta trader 5.
Does the gold is supported in Metatrader5?
Besides this problem, is it neccesary to switch to MT5/MQL5?
Can I continue to use MT4/MQL4 for at least 2 years without a problem or MQL4 will be obselete soon?
Gold can be found on Broco and Admiral Markets, that I know of so far. I mentioned for ATC2011 the addition of these symbols to the MetaQuotes demo server. I believe MQ are considering this possibility on their servers -- but either way you can add the server addresses for these brokers to your existing MT5 installation. I'm going to compile a list of those addresses here once I get a little more time to search around.
For now, link up to the Admiral Servers using this address: mt5.fx.ee:443
In the terminal, follow File > Open an Account...
Just click the line "Add new server ..." and add the above address.
And on your second concern, MT4 won't go away any time soon. I base that estimation on the plain fact brokers are still pouring money into new technologies for their MT4-related services. You will see an ongoing competition for MT4 customer base by most of the major brokers.
Maybe for other reasons, though, it is necessary to switch. More robust features and program control can be delivered through MT5 platform, period.