3Commas Bollinger StrategyThis strategy is intended for use as a way of backtesting various parameters available on 3commas.io composite bot using a bollinger band type trading strategy. While it's primary intention is to provide users a way of backtesting bot parameters, it can also be used to trigger a deal start by either using the {{strategy.open.alert_message}} field in your alert and providing the bot details in the configuration screen for the strategy or by including the usual deal start message provided by 3commas. You can find more information about how to do this from help.3commas.io
The primary inputs for the strategy are:
// USER INPUTS
Short MA Window - The length of the Short moving average
Long MA Window - The length of the Long moving average
Upper Band Offset - The offset to use for the upper bollinger offset
Lower Band Offset - The offset to use for the lower bollinger offset
Long Stop Loss % - The stop loss percentage to test
Long Take Profit % - The Take profit percentage to test
Initial SO Deviation % - The price deviation percentage required to place to first safety order
Safety Order Vol Step % - The volume scale to test
3Commas Bot ID - (self explanatory)
Bot Email Token - Found in the deal start message for your bot (see link in previous section for details)
3Commas Bot Trading Pair - The pair to include for composite bot start deals (should match format of 3commas, not TradingView IE. USDT_BTC not BTCUSDT)
Start Date, Month, Year and End Date, Month and Year all apply to the backtesting window. By default it will use as much data as it can given the current period select (there is less historical data available for periods below 1H) back as far as 2016 (there appears to be no historical data on Trading view much before this). If you would like to test a different period of time, just change these values accordingly.
Known Issues
Currently there are a couple of issues with this strategy that you should be aware of. I may fix them at some point in the future but they don't really bug me so this is more for informational purposes than a promise that they may one day be fixed.
Does not test trailing take profit
Number of safety orders and Safety Order Step Scale are currently not user configurable (must edit source code)
Using the user configuration to generate deal start message assumes you are triggering a composite bot, not a simple bot.