TradingView
mmoiwgg
Aug 27, 2021 5:55 AM

ATR Start & Stop Bot 

Bitcoin / TetherUSBinance

Description

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.

Credits:
Original 'ATR Stops' indicator belong to the user failathon and that script is found here:
https://www.tradingview.com/script/mZiKRKQA-ATR-Stops/
Also credits to Dradian for the alert additions.

Release Notes

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)
Comments
Max_Pain_
Fantastic Indicator exactly what I was looking for. Thanks!
responsibleZeb7063
What is the right option please - once per bar or once per bar close?
MrXtream
Is this only for stop and start a bot on 3commas? or you can start a deal and close at market?
floppinggroperw
@MrXtream, To also close at market you just copy the message from 3commas that says to both close all deals for that bot at market and stop that bot. Then you paste it into the Trading View alert you create, which sends a webhook to 3commas as your signal.
MrXtream
@floppinggroperw, Thanks I will use this to stop further DCA on a major market dip on a 4hr chart. It may work better on longer timeframes...
bfdfix
@mmoiwgg, great indicator! I think it also seems good on the 1D chart for Bitcoin? Also it's warning me when I set an alert that it may act differently due to repainting? (1d & 4h)

Thanks!
mmoiwgg
@bfdfix, The repainting is from the use of the security function - using this on a higher timeframe like 1D is a great idea - I haven't noticed any negative issues with the repainting errors.

If you want to learn a little more about the security function and repainting, I suggest you look at this one:

tradingview.com/script/cyPWY96u-How-to-avoid-repainting-when-using-security-PineCoders-FAQ/
Jimmylboy22
Great job
avkoa
Great job, tell me how to combine Start Bot 'and Top Bot into one alertcondition?
mmoiwgg
@avkoa, Thanks! I don't think you should have a single alert for both start and stop - it's best to have a separate alert for each one. If you are using 3commas for example, you would grab your 'Message to stop bot' for use with the Stop bot alert, and then use the 'Message to start bot' for the Start bot alert.

It's important to remember this doesn't affect any of your existing or already started trades, only future trades from starting/stopping.
More