No, but there are things you can do help your chances.
The first, and most obvious, is to leave a machine while you are ahead. If you always keep playing while you are ahead you will always leave behind. If you think you have a hot machine it is natural to want to keep playing it. One rule you can try is set a loss limit. For example, if you put a $100 bill into a machine and get it up to $500 in credits leave while you still have at least $400 in credits on the machine,
A second thing you can do is always play the maximum credits on a machine. Many, but not all, machines put additional "good: symbols on the reals if you play the maximum. Of course, doing this increase the rate at which you will lose money it you do not get some good wins.
Avoid machines with huge jackpots. You are so unlikely to hit a huge jackpot that they are not worth it. However, a small amount of each bet goes into building up cash to pay the lucky person that hits it, making you less likely to have enough smaller wins to come out ahead.