Sir I have stomach ulcer since 5years what is the best treatment of this. I have pain in stomach 24hour?

See below. Stomach ulcers, like any other tissue injury, will heal on its own. Ulcers don't last 5 years. Ulcers should heal withing 2 months and if not have a high risk for being cancerous. Most who are told they have ulcers, (without an endoscopy to prove it) don't have ulcers. If you have persistent pain for 5 years you need to see your doctor and have an endoscopic evaluation.
Right treatment. Most important step is accurate diagnosis! if an md has confirmed pain comes from an ulcer & determined the kind, treatment likely included antibiotics (if the bacteria called h. Pylori was present) + a proton pump inhibitor (e.g., omeprazole) to reduce acid. If your ulcer didnt heal, other problems will need to be looked for, so it is important to let the treating doctor know. Do not handle alone.
Ulcers. Ulcers are typically treated with proton pump inhibitors such as omeprazole. If you have them occurring frequently, you need to see your doctor to get checked for h. Pylori and have a scope done to check for other problems. Contrary to myth, alcohol and spicy foods will not affect ulcers, however they will affect esophageal reflux. See your doctor as soon as possible.