This took a while to figure out with this new client server trading bot approach. I detail this with 4 trading strategy styles that you will have control over its entry and exits.
Free trading books https://quantlabs.net/
or learn algo trading https://quantlabs.net/dvd