The TuplaBollinger strategy is a trading strategy that uses Bollinger Bands and EMA (Exponential Moving Average) indicators to generate buy and sell signals. Here is a breakdown of what the strategy does:
Calculates Bollinger Bands:
Calculates the inner Bollinger Bands using a window of 20 and standard deviation of 1. Calculates the outer Bollinger Bands using the same window of 20 but with a standard deviation of 2.
The inner Bollinger Bands consist of lower and upper bands.
The outer Bollinger Bands consist of lower and upper bands as well.
Calculates EMA 200:
Calculates the Exponential Moving Average (EMA) with a time period of 200. The EMA 200 is used as a trend indicator. Buy Signal:
Generates a buy signal when the close price is below the inner lower band of the Bollinger Bands, and the previous close price is also lower than the current close price. Sell Signal:
Generates a sell signal when the close price is above the inner upper band of the Bollinger Bands, and the previous close price is also higher than the current close price. ROI (Return on Investment) and Stop Loss:
Defines a minimal ROI (return on investment) configuration for the strategy. It specifies different ROI percentages at different time periods. Sets the stop loss at -0.25, indicating the maximum loss tolerance before selling a position. Timeframe:
Sets the optimal timeframe for the strategy as 5 hours. Overall, the strategy aims to capture potential buying opportunities when the price is below the inner lower band and selling opportunities when the price is above the inner upper band of the Bollinger Bands. The EMA 200 is used to determine the overall trend.