This script is using Average True Range (ATR) and works very well on the Bitcoin 4 hour timeframe to determine when to stop and start your bots. It has a very similar visual to the EMA RSI Indicator found here: https://www.tradingview.com/script/N5fOzdKC-EMA-RSI-Pump-Drop-Swing-Sniper-With-Alerts This 'ATR Start & Stop Bot' is better because it has less confusion during sideways market movement.
As an example - You are using 3commas and have a Composite bot setup with several alt coins, you can use this indicator with the 'Stop bot' alert to disable your composite bot from taking trades at times when the market is on a trend that looks in the red.
Alternatively you can use the 'Start bot' alert to turn your bot back on during the green uptrends.
Using this indicator with these alerts on the Bitcoin 4-Hour chart add a great layer of automation to your already existing bots.
Updates: + Added setting to change the timeframe of the script. (Now you can stay on a 1H Chart but still see the settings as if it were on a 4H chart)