If you write great programs, programs that are accurate, that are bug free, that exactly do what the requirements specification clearly specify, Yes you can make a lot of money.
Once you enter the world of programming, where you came from doesn't matter. As long as you are a good coder, and you consistently deliver great code that works perfectly to the requirements specification, without bugs, programs that are easy to maintain, then you can make a lot of money.
But let us say you want to leverage your Petroleum Engg back ground as well, then you could code in a area where your coding skills will eventually help you get into learning the Petroleum business and with the combined Petroleum business knowledge and programming knowledge you could make even more money, especially if you get into a consulting type of role, where a customer could pay you $100 to $200 per hour, let us say for example Implementing complicated SAP modules for petroleum clients. Or if you are smart you could even extend it further, now you know the petroleum business, and you also know programming, you see several technology changes that are happening and you also see a major problem in all these companies that deal in this petroleum business, you could come up with a product that solves that major problem and make millions or even sell that company for millions to another big company.
So these are different ways how you can make a lot money with your programming skills and petroleum egg background.
Also check out my book Puga Sankara's Supply Chain Blog - that is a must read before spending Hundreds & Thousands of $$$ on your MBA or Masters Degree to get the best ROI or before starting your Entrepreneurial journey.