the best way to quit gambling is not visiting the place or browsing to the sites and its better you stay away from any of device you use to connect internet and doing another activity before you can start new things. i think it will works if you have a friends that is beside you when you start new things so you don't thinking about playing gambling and then after you can calm down your minds from gambling, you can go to trading sites and register and start to trading. maybe this is not work but at least you can try to quit from gambling and start new habit.
I agree , the best way is to completely stay away from gambling and engage in other activities that are somewhat addicting too and i think with a psychologist you should be fine after making the concious effort to stay away from gambling.