This is based on the bot found here. It isn't as smart as gunbot due to limitations of pinescript, but I am posting up for anyone using gunbot as it might help with finding good pairs to trade and good settings for those pairs as you can use this to backtest. Also, I am only guessing at some things that his strategy does, based off the instructions and examples he gave in this thread.
Script protegido
Este script se publica con código cerrado, pero puede utilizarlo libremente. Márquelo como favorito y podrá usarlo en un gráfico. El código fuente no se puede ver ni modificar.
Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?