I created a trading algorithm which I want to sell. People would be able to buy the "bot" at my website and it would run from there on (if this is even safe to do).
What is the best way to secure my algorithm its code? I created it in Javascript so if I run it straight on the website itself people could just F12 and see my code. I want to make it at least hard for hackers to steal my algorithm since I know that as good as everything is hackable but just not very easy.
I've been thinking of running my bot on a different server, from there all the trading for all accounts would be made. When bought or sold it would send my website a message with "buy" or "sell" so I could show users the bot bought etc. Is this a safe way?