Creating a Robust Trading Strategy with Bollinger Bands and Psychological Levels
Written on
Chapter 1: Introduction to Trading Strategies
In the quest for a solid trading system, merging different strategies often proves beneficial. This article focuses on the renowned Bollinger Bands and their synergy with psychological levels to develop an effective trading methodology.
I recently published a new book following the success of my previous one, which includes advanced trend-following indicators and strategies. It also features a GitHub page for continuously updated code. For those interested, you can find the Amazon link below, or if you prefer a PDF version, feel free to reach out to me on LinkedIn.
Chapter 2: Understanding Bollinger Bands
Bollinger Bands are rooted in fundamental statistical concepts, primarily averages and volatility. Averages help forecast the next probable value based on historical trends, while volatility indicates the average deviation of values from their mean.
Suppose we have a hypothetical dataset represented as a time series. If we were to guess the next value after 10, a reasonable estimate would be the average of the dataset. For instance, for the values {5, 10, 15, 5, 10}, the average is calculated as follows:
# Importing the required library
import numpy as np
# Creating the array
array = np.array([5, 10, 15, 5, 10])
# Calculating the mean
average = array.mean()
After calculating the mean, we observe that no individual value equals 9. To understand the dataset's dispersion, we use Standard Deviation, which quantifies how far individual values are from the mean.
# Calculating the standard deviation
std_dev = array.std()
This code snippet yields a Standard Deviation of approximately 3.74, indicating that on average, individual values deviate from the mean by this amount.
The normal distribution curve illustrates how values are distributed around the mean. Although financial data typically doesn't follow a normal distribution, this model can still provide valuable insights when using indicators.
Chapter 3: The Mechanics of Bollinger Bands
Bollinger Bands consist of a moving average that adapts to price fluctuations, allowing traders to gauge market positioning relative to this average. The concept of volatility is crucial in financial markets, as it aids traders in decision-making.
Bollinger Bands create two boundaries derived from a constant multiplied by the rolling Standard Deviation. The lower band acts as dynamic support, while the upper band serves as dynamic resistance. The bands are calculated using these straightforward formulas:
To formulate the bands, we compute the 20-period simple moving average and two standard deviations from the price, providing insights into statistical extremes.
For practical application, we can visualize the EUR/USD chart with the 20-period Bollinger Bands.
This video tutorial will guide you through utilizing RSI and Bollinger Bands to enhance your trading profits.
Chapter 4: Psychological Levels in Trading
Psychological levels play a significant role in market analysis because they are often more memorable to traders than other price points. For example, which price is more likely to stick in your mind: 1.1500 on the EUR/USD or 1.3279 on the GBP/USD? Clearly, round numbers hold greater psychological significance.
Our goal is to create an algorithm that trades when prices reach these critical psychological levels. This can be achieved through a simple loop function in Python.
def psychological_levels_scanner(data, close, where):
# Adding buy and sell columns
data = adder(data, 10)
# Rounding for ease of use
data = rounding(data, 4)
# Threshold
level = 0
# Scanning for Psychological Levels
for i in range(len(data)):
if data[i, close] == level:
data[i, where] = 1
level = round(level + 0.01, 2)
if level > 5:
break
return data
Chapter 5: Developing the Combined Strategy
For any proper research approach, back-testing is essential to determine the viability of a trading strategy. Below, we outline a strategy that combines Bollinger Bands with psychological levels.
The trading conditions are as follows:
- Enter a long position when the market reaches or falls below its lower Bollinger Band at a psychological level.
- Enter a short position when the market rises above its upper Bollinger Band at a psychological level.
This approach uses hourly data since January 2010 and incorporates a theoretical risk-reward ratio based on the Average True Range.
This video exposes the truth behind using Bollinger Bands and RSI together, offering deeper insights into their effectiveness.
In summary, while the results presented are theoretical, they suggest that tweaking Bollinger Bands can enhance the psychological levels strategy, assisting traders in making informed decisions.
If you're interested in more trading strategies, consider subscribing to my DAILY Newsletter for insights, coding lessons, and more.
Remember to consistently conduct your back-tests. It's vital to explore and refine your strategies, tailoring them to your unique trading style.
One Last Word
I have recently launched an NFT collection aimed at supporting humanitarian efforts. The Society of Light is a series of limited collectibles, with proceeds benefiting various charities.
- High-potential gain: Focusing on marketing to maximize value in the secondary market.
- Art collection and portfolio diversification: Investing for good while collecting unique art pieces.
- Flexibility in donations: Allocate funds to your preferred causes.
- Free copy of my book in PDF: NFT buyers receive a complimentary copy of my latest work.
Click here to buy Jesse and support his cause with Doctors Without Borders.