Bollinger Bands, Fibonacci Retracement and MACD Explained With Interactive Charts for PSX Investors
Learn Bollinger Bands, Fibonacci retracement and MACD with accessible SVG charts and three live simulators you can change yourself, for PSX investors.
Moving averages and RSI are only the start. Three more tools show up on almost every chart platform used for PSX shares: Bollinger Bands (how volatile is the share?), Fibonacci retracement (where might a pullback pause?) and MACD (is momentum building or fading?). This guide explains the formula behind each one, shows a labelled chart, and then gives you a live simulator so you can change the settings and watch the chart react. If you are new to the basics, read technical analysis basics and the SMA and RSI lab first.
All prices on this page are simulated for teaching. They are not real PSX quotes and say nothing about any listed company or the KSE-100.
Bollinger Bands: measuring volatility
Bollinger Bands, developed by John Bollinger, draw three lines around price:
- Middle band: the 20-day simple moving average (SMA) of closing prices.
- Upper band: the middle band plus 2 standard deviations of the last 20 closes.
- Lower band: the middle band minus 2 standard deviations.
Standard deviation measures how widely prices have been scattered around their average. When daily moves get bigger, it rises and the bands move apart. When prices go quiet, it falls and the bands pinch together. Two helper numbers are widely used:
- %B shows where the latest close sits inside the bands: 0 is the lower band, 1 the upper band, above 1 is outside the top.
- Bandwidth is (upper minus lower) divided by the middle band. A bandwidth near the bottom of its recent range is called a squeeze.
Text version of Figure 1
| Reading | Value |
|---|---|
| Latest close | Rs 133.04 |
| Middle band (20-day SMA) | Rs 119.42 |
| Upper band (+2 SD) | Rs 131.35 |
| Lower band (-2 SD) | Rs 107.49 |
| %B | 1.07 (above the upper band) |
| Bandwidth | 20.0%, wider than 89% of readings shown |
How to read it, and what goes wrong
- A squeeze is about volatility, not direction. Quiet markets tend to be followed by bigger moves, but the band alone cannot tell you whether the break will be up or down. Wait for price to close beyond a band, and check volume.
- Touching a band is not a sell or buy signal. In a strong trend price can ride the upper band for weeks.
- Statistics assume a bell curve, and prices are not one. With 2 standard deviations, you would expect about 95% of closes inside the bands if returns were normally distributed. Real prices have fatter tails, so spikes outside happen more often than that.
Bollinger Bands lab
Pick a regime, then change the period and the multiplier. A smaller multiplier makes the bands hug price (more touches, more false signals). A larger one makes touches rare and late.
Show the numbers behind the chart
| Day | Close | Middle | Upper | Lower | Width % |
|---|
Fibonacci retracement: planning around a pullback
After a rally, price often gives back part of the gain before continuing or reversing. Fibonacci retracement divides the last swing, from a swing low to a swing high, into fractions: 23.6%, 38.2%, 50%, 61.8% and 78.6%. The ratios come from the Fibonacci number sequence (the 50% level is a simple half and is added by convention). The levels are simple arithmetic:
Level price = swing high - (swing high - swing low) x ratio
For a rally from Rs 100 to Rs 200 the 38.2% level is 200 - 100 x 0.382 = Rs 161.80. Many traders treat pullbacks of under 38.2% as a sign of a strong trend, 38.2% to 61.8% as normal, and deeper ones as a warning that the trend may be failing. A close below the swing low breaks the structure altogether.
Text version of Figure 2
| Level | Price (Rs) |
|---|---|
| 0% (swing high) | 200.00 |
| 23.6% | 176.40 |
| 38.2% | 161.80 |
| 50% | 150.00 |
| 61.8% | 138.20 |
| 78.6% | 121.40 |
| 100% (swing low) | 100.00 |
The honest way to use it
- Levels are reference points, not magnets. Price may reverse at one, pause at another, or ignore all of them. Many traders watch the same levels, which may help or may not.
- Swing choice is subjective. Two traders can draw different swings on the same chart and get different levels.
- Use the levels to size risk. If you buy near a level, the next level down gives a natural place for a stop and the next level up a first target. The ratio of potential reward to risk is what matters. Many traders look for at least 2 to 1. See risk management and position sizing.
Fibonacci explorer
Type your own swing low, swing high and pullback price (or drag the slider). The explorer highlights the zone price is testing and calculates reward-to-risk for you.
Show the numbers behind the chart
| Level | Price (Rs) |
|---|
MACD: momentum from two moving averages
MACD (moving average convergence divergence), created by Gerald Appel, has three parts:
- MACD line = 12-day exponential moving average (EMA) minus 26-day EMA. An EMA is like an SMA but weights recent days more heavily, so it reacts faster.
- Signal line = 9-day EMA of the MACD line.
- Histogram = MACD line minus signal line, drawn as bars.
When the fast EMA is above the slow one, MACD is above zero. When MACD crosses above its signal line, the histogram turns positive: a bullish crossover. A cross below is bearish. A growing histogram means momentum is strengthening, a shrinking one means it is fading.
Text version of Figure 3
| Reading (latest day) | Value |
|---|---|
| Close | Rs 132.83 |
| EMA 12 | 138.08 |
| EMA 26 | 142.41 |
| MACD (EMA 12 minus EMA 26) | -4.33 |
| Signal (9-day EMA of MACD) | -3.60 |
| Histogram (MACD minus signal) | -0.73 |
Signals and traps
| Signal | What it means | Common trap |
|---|---|---|
| MACD crosses above signal | Momentum turning up | Many false crosses in sideways markets |
| MACD crosses above zero | Fast EMA has moved above slow EMA: a trend change | Slow, so a lot of the move may be over |
| Histogram shrinking | Momentum fading even if price still rising | Can reverse within days |
| Bearish divergence | Price makes a higher high but MACD makes a lower high | Can persist a long time before price turns |
MACD simulator
Choose a scenario and move the trend acceleration slider. Try the flat consolidation scenario to see how many crossovers appear when nothing is trending.
Show the numbers behind the chart
| Day | Close | MACD | Signal | Histogram |
|---|
Putting the three together
The tools overlap less than you might expect, which is why they work better as a team than alone:
- Volatility (Bollinger): is the share quiet or stretched?
- Location (Fibonacci): where are the nearby reference prices for a stop and a target?
- Momentum (MACD): is the move gaining or losing strength?
A reasonable process is to check the trend first, use Fibonacci levels to plan an entry, stop and target, and look for MACD and Bollinger context to confirm or warn. If they disagree, that is useful information too: it often means waiting. Also consider tax and costs: see capital gains tax on PSX stocks. To see more charts, visit the charts page, and look up unfamiliar terms in the glossary.
Pre-trade checklist
- Is the trend up, down or sideways on a longer timeframe?
- Are the Bollinger Bands tight (squeeze) or wide (after a spike)?
- Which swing am I measuring, and does the pullback hold the 38.2% to 61.8% zone?
- What is my stop, my first target, and is reward-to-risk at least 2 to 1?
- Is MACD supporting the idea, or showing divergence or a shrinking histogram?
- Is the share liquid enough to exit at my stop? Check volume and price limits.
- Is the position small enough that being wrong is affordable?
Educational content only, not investment advice. All prices in the examples and simulators are simulated and do not represent any real company or index. Indicators do not predict future prices, and you can lose money trading. Consider speaking to a licensed adviser before investing.
Frequently asked questions
What do Bollinger Bands tell me?
They show how far price is from its recent average in standard-deviation terms. Narrow bands mean recent volatility is low and wide bands mean it is high. They do not tell you which way price will move next.
Is a close outside the Bollinger Band a sell signal?
Not by itself. In a strong trend price can keep closing at or beyond a band, which is called walking the band. Many traders use it as a sign of strength, and look for other evidence before acting.
Which Fibonacci retracement level is the most important?
None is guaranteed. The 38.2%, 50% and 61.8% levels are watched most often, so some traders react there, but price frequently passes straight through. Use them to plan risk, such as a stop below the next level, rather than to predict a reversal.
How do I pick the swing low and swing high?
Use clear, recent turning points on the chart you trade, a swing low followed by the swing high it led to. Different traders choose different swings, which is one reason retracement levels are subjective.
What are the standard MACD settings?
12, 26 and 9: the difference between the 12-day and 26-day exponential moving averages, a 9-day EMA of that difference as the signal line, and the gap between them as the histogram. Shorter settings react faster and give more false signals.
Can I use these on PSX shares?
The maths works on any price series. Thin trading, price limits and announcements can distort signals on illiquid PSX shares, so be extra cautious and check volume.
Sources and further reading
Facts in this guide were last checked against these sources on 22 November 2026.
Found an error or an out-of-date detail? See our editorial policy or tell us.
About Sherjeel Islam
Sherjeel Islam is the founder and lead developer behind PakGains. With an extensive background in software engineering, database architecture, and enterprise data systems, he specializes in building real-time market tracking tools and analytical models for Pakistani investors. Sherjeel focuses on bridging the gap between raw market data and practical financial tools, writing in-depth guides on market indicators, cryptocurrency frameworks, and cross-border financial technology.
Keep reading
Disclaimer: The content on PakGains is for informational and educational purposes only and does not constitute financial, investment, legal, or tax advice. Financial markets, cryptocurrencies, and banking services involve inherent risk. Always conduct your own research or consult with a licensed financial professional before making financial decisions.