Need help with running my bot

Hi guys, I was wondering if anyone could help me. I’ve created a simple bot and everything seems to be working perfectly. The problem is when I use setInterval or setTimeout to re-run the bot then my program wont execute the buy or sell orders on the exchange. It works fine if I run the program once without setInterval or setTimeout.
I tried a different method where I called the starting function at the end of the program but that gave me errors.

So basically I’m stuck with a bot that works but I have to manually run it every time for it to work correctly.

you should paste your code here in order to get help