This is the script I used in BITMEX for auto trading XBTUSD using great Chrome extension called Auto4mex. Default settings are good for 1h candle nowadays (September October 2018 period for Bitcoin). If more volatility comes adjusting needed. Enjoy !
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.