The BBMod strategy is a trading strategy that uses various indicators to determine entry signals in the market. Here's a breakdown of what the strategy does:
It calculates Bollinger Bands with two standard deviations (bb_lowerband2, bb_middleband2, bb_upperband2) and with three standard deviations (bb_lowerband3, bb_middleband3, bb_upperband3). It calculates the width of the Bollinger Bands (bb_width) as the percentage difference between the upper and lower bands divided by the middle band.
It calculates the delta between the lower bands of Bollinger Bands with two and three standard deviations (bb_delta).
It calculates the absolute difference between the closing prices of consecutive periods (closedelta).
It calculates the Simple Moving Averages (SMA) with periods of 15 and 28 (sma_15, sma_28). It calculates the Commodity Channel Index (CCI) with various lengths (cci_length_X). It calculates the Relative Momentum Index (RMI) with various lengths (rmi_length_X). It calculates the Stochastic RSI (srsi_fk) with parameters (15, 20, 2, 2). It calculates the True Range (trange). It calculates the Keltner Channels with a period of 28 (kc_upperband_28_1, kc_lowerband_28_1). It calculates the Highest High (hh_20) and Lowest Low (ll_20) over a period of 20. It calculates the average of the Highest High and Lowest Low (avg_hh_ll_20). It calculates the average of the closing price and the average of the Highest High and Lowest Low (avg_close_20, avg_val_20). It calculates the linear regression value of the difference between the closing price and the average value (linreg_val_20). It calculates the 12-period and 24-period rolling averages of volume (volume_mean_12, volume_mean_24). It calculates the Williams %R (r_14). It calculates the Stochastic Fast %D (fastd) and %K (fastk). It calculates the Average Directional Index (adx). It calculates the T3 moving average (T3). The strategy then uses these indicators to define entry conditions in different trend scenarios. The conditions include checks on Bollinger Bands, Keltner Channels, linear regression values, Exponential Moving Averages (EMA), EWO, RSI, and other factors specific to each scenario. Please note that the strategy code provided might be incomplete or might have errors, as it's only a portion of the complete code.