0% found this document useful (0 votes)
347 views268 pages

Bolinger Bands Everything-Compressed

bolinger Bands

Uploaded by

fotmagi.ex
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
347 views268 pages

Bolinger Bands Everything-Compressed

bolinger Bands

Uploaded by

fotmagi.ex
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 268

ENTROPY TRADING SERIES

How to
Day Trade
with
Bollinger Bands

AMIT GHOSH
Bollinger
Bands!
EntroPy

Amit Ghosh

1
hr 14 mins left in book 0%
Amit Ghosh
E: [email protected]

W: www.amitghosh.net

All Rights Reserved. No part of this publica


tion may be reproduced, stored in a retrieval
system, or transmitted by any means, elec
tronic, mechanical, photocopying, recording,
or otherwise, without the prior written per
mission of the publisher and the copyright
holder.
Copyright © 2018-2023, Aeronz Inc.

First eBook edition: 17th March, 2018


Second eBook edition: 16th August, 2023
Third eBook edition: 16th September, 2023

1
hr 15 mins left in book 0%
Dedication
"This book is dedicated to the love of my life
Kavita who took immense pressure looking
after my other businesses actively to spareme
time to engulf knowledge and experience in
this Stock market industry."

1 min left in chapter 0%


Preface
Dear Readers,
I'm Amit Ghosh, CEO of Unofficed, a com
munity dedicated to the pursuit of financial
independence through the concept of earning
money from the comfort of your home. The
stock market presents an incredible avenue
for achieving financial freedom, allowing you
towork independently without the constraints
of a boss. Like many of you, I've been cap
tivated by rags-to-riches stories, perhaps in
a situation similar to mine during my early
days when I avidly read about individuals like
Rakesh Jhunjhunwala and their journeys to
wealth and suCcess.
However, soon realized that there was no
I

clear roadmap for achieving such financial


goals. As an online entrepreneur, my fascina
tion with stock market trading grew because
it offers a means of generating income using
capital. Unfortunately, most of the valuable
resourcesand books were centered around the
US markets, and I couldn't find a like-minded
community. My journey led me to Forex trad
ing, where I began my exploration.

Subsequently, my engagement on Quora,


though it got me banned due to my habit

1 min left in chapter 1%


of sharing affiliate links in my responses, al
lowed me to connect with numerous individ
uals who shared my interests. It was through
these interactions that I founded the Unof
ficed community.

In contrast to the wealth of resources avail


able for the US market, there's a notable
scarcity of comprehensive materials on prof
itable trading strategies in the Indian Stock
Market. Many of us become overwhelmed by
attempting to master countless strategies, be
coming jacks of all trades but masters of
none, often resulting in losses.This book aims
to provide insights into the practical utiliza
tion of Bollinger Bands-a profitable, easily
graspable, and implementable strategy with a
strong focus on risk management.
Moreover, one of its key benefits is that it
demands relatively less of your time. So, wel
come aboard our journey tofinancial indepen
dence.

Amit Ghosh
17 Mar 2018

1 min left in chapter 1%


Table Content
Contents
Dedication
Preface
Table Content
Continuous Compounding
Understanding Continuous Compounding
Continuous Compounding in the Stock
Market
Understanding Logarithmic Return
Calculating Logarithmic Returns
Random Variable
Discrete Random Variable:
Continuous Random Variable:
A
Stock Prices: Discrete World
Stock Market Returns: A
Continuous
Perspective
Price Action
The Essence of Price Action
Price Action Strategies

Indicators and Price Action


Trailing Stops and Trigger Points
Indicator
Indicator Types

1 min left in chapter 1%


Moving Average
The Simple Moving Average (SMA)
The Exponential Moving Average (EMA):
DEMA: Double Exponential Moving Average
EMA: The Middle Path
Moving Averages and Their Extended
Utility
The Practical Application: Calculating
MovingAverages
Bollinger Bands
The Bollinger Bands Indicator
The Bollinger Bands Indicator and Volatility
Changing the Bollinger Settings - Period
Changing the Bollinger Settings - Standard
Deviation
Summary
Frequently Asked Questions
Standard Deviation
The numbers 68 and 95
The Dual Nature of Bollinger Bands
The Genesis of Bollinger Bands
Bollinger Bands as Lagging Indicators
Bollinger Bands as
Leading Indicators
The Dual Role of Bollinger Bands: Mean
Reversion and Breakout Strategies
Riding the Bollinger Bands

1 min left in chapter 2%


Standard Deviations
of
Example of Calculation Standard
Deviation
Volatility in the Stock Market
Measuring Volatility
with Standard
Deviation
Risk Assessment with Standard Deviation
Portfolio Diversification with Standard
Deviation
Volatility Trading with Standard Deviation
Limitations and Caveats
Probability Distribution
Dispersion
Normal Distribution
Mean, Median, Mode
Skewness
Kurtosis
Tail Risk
Log Normal Distribution
Stock Market and Probability Distributions
Common fat-tailed distributions
Normal Distribution:
Cauchy Distribution:
Log-Normal Distribution:
The Entropy Trade Setup
Entropy Trading Setup: The Four Indicators

1 min left in chapter 3%


Customized Bollinger Bands Setup:
Modifving Entropy Trade Setup with
%
Bollinger Bands
The New Entropy Setup
BB %B Indicator: The Key Component
How BB %B Works:
Utilizing BB %B in
the Entropy Strategy:
BRS Bollinger Bands Trading Strategy
BRS Strategy
Gail Futures Trade Using Bollinger Bands
SunTV Futures Trade Using Bollinger Bands
3BB Bollinger Band Trading Strategy
Analyzing Bank of India with Bollinger
Bands Trading Strategy
BRS Strategy in Bank of India
3BB Strategy in Bank of India
Failed 3BB Retracement Strategy
Volume Profile Barrier
Bollinger Bands Trading Strategy - F3BB
Alpha Bollinger Band Trading Strategy
What is the Entropy Alpha Strategy?
Identifying Profitable Trades on Exit:
Predicting Trades at Risk of Hitting Stop
Loss:
Regression Analysis:
K-means Clustering:

1 min left in chapter 4%


Machine Learning Models in the Entropy
Alpha Strategy
Scalping with Bollingers
Doji Example
Doji Example #2
Price Action
Live Trade Case Study 1: Titan May Fut
Live Trade Case Study 2: ICICI May Fut
Trade Psychology
Synergistic Trading Strategies Entropy Course
Live Trade
OverLotting Condition
Managingthe Trailing Stop Loss
Revisiting the ORB Strategy
Case Study: MRF Buy Setup
Revisiting Inside Bar Theory
Revisiting ReTest Theory
Revisiting Bounce Theory
Short Covering and Long Buildup in Relation
to Wick Patterns
Short Covering
Long Buildup
Connection with Wick Patterns
Long Lower Wick

Long Upper Wick

The Reversal Buy Trade

1 min left in chapter 5%


Revisitingthe Importance of Volumne

The outcome of
the Buy Trade
Entropy Alpha Strategy
Levels are Eternal
AppendixA - 3BB Scanner
- Modified
2BB Scanner
- Modified
3BB Scanner
Beware Fundamental News!
of

Appendix - Backtest Entropy Alpha Strategy


B

Micro Conditions For Stabilizing the


Strategy
# Global Conditions
# Trade Specific Conditions
The KiteConnect APIs
Step 1
-Initialization of Kite Object
Step 2- Breaking It Apart
Step 3- Coding the Trade Specific Conditions
4 - Coding
Step the Global Conditions
- Let's
Step 5
long with target
6-
Step Simulate the Trades
Step 7- Lot Sizes and Cosmetic Changes
Step 8 - Calculate the Money
The Final Trade Log
Calculate Trading Metrics
Calculate the Profit/Loss over the Time
Plot the Cumulative Profit/Loss Over Time

1 min left in chapter 6%


Detailed Analysis
Conclusion

1 min left in chapter 7%


Continuous
Compounding
In the world of finance, the concept of
compounding interest plays a pivotal role in
determining the growth of investments and
the cost of loans.Interest can be compounded
at various intervals, such as monthly, quar
terly, or semiannually. However, there exists
a mathematical wonder known as continu
s
compounding, where interest is calculated
and added to the principal continuously, at
every infinitesimally small instant.

This method leads to a higher effective in


terest rate, making it a significant concept in
the stock market. In this comprehensive ex
ploration, we willdelve into the intricacies of
continuous compounding, its applications in
the stock market, and its implications for in
vestorS.

Understanding Continuous
Compounding
Continuous compounding is a financial con
cept that defies traditional periodic interest
calculations. Instead of adding interest to
the principal at fixed intervals, it considers

1 min left in chapter 7%


an infinite number of compounding moments
over a specified time period. This results in
a
continuously growing investment, making it
a powerful tool for investors seeking to maxi
mize their returns.

The formula for calculating the total account


value with continuous compounding is:
T=Px(1 + (i/n)) ^ (nxt)
Where:
Tis the total account value
Pisthe principal invested
e is the mathematical constant, approxi
mately equal to 2.7183
iis the interest rate
t is the time
Now, let's illustrate this concept with a prac
tical example. Suppose you invest 10,000 INR
at an annual interest rate of 15%. We can cal
culate the total account value based on differ
ent compounding frequencies:
Annual Compounding:
T= 10,000x (1 +(15%/ 1)) x
(1 x 1)= 11,500
Semi-Annual Compounding:
T = 10,000 x (1 + (15% 2)) x (2 x 1) =
11,556.25

1 min left in chapter 7%


Quarterly Compounding:
T = 10,000 x (1 + (15%/ 4)) x (4 x 1) =
11,586.50
Monthly Compounding:
T = 10,000 x (1 + (15% / 12)) x (12 x 1) =
11,607.55
Daily Compounding:
T= 10,o00 x (1 + (15%/ 365)) × (365 x 1) =
11,617.98

In continuous compounding, the number of


compounding periods (n) tends towards infin
ity, reflecting the ever-changing nature of the
stock market.

nt
lin
Px =Pxe it

Continuous Compounding
in the Stock Market
As we can see, the choice of compounding
frequency can significantly impact the total
account value. But how does continuous co
pounding fit into the chaos of the stock mar
ket, where investments and trading activities
Occur on diverse timescales?

1 min left in chapter 8%


Quarterly Compounding:
T = 10,000 x (1 + (15%/ 4)) x (4 x 1) =
11,586.50
Monthly Compounding:
T = 10,000 x (1 + (15% / 12)) x (12 x 1) =
11,607.55
Daily Compounding:
T= 10,o00 x (1 + (15%/ 365)) × (365 x 1) =
11,617.98

In continuous compounding, the number of


compounding periods (n) tends towards infin
ity, reflecting the ever-changing nature of the
stock market.

nt it
Lia
P = Px e

Continuous Compounding
in the Stock Market
As we can see, the choice of compounding
frequency can significantly impact the total
account value. But how does continuous co
pounding fit into the chaos of the stock mar
ket, where investments and trading activities
Occur on diverse timescales?

1 min left in chapter 8%


Quarterly Compounding:
T = 10,000 x (1 + (15%/ 4)) x (4 x 1) =
11,586.50
Monthly Compounding:
T = 10,000 x (1 + (15% / 12)) x (12 x 1) =
11,607.55
Daily Compounding:
T= 10,o00 x (1 + (15%/ 365)) × (365 x 1) =
11,617.98

In continuous compounding, the number of


compounding periods (n) tends towards infin
ity, reflecting the ever-changing nature of the
stock market.

nt
lin
Px =Pxe it

Continuous Compounding
in the Stock Market
As we can see, the choice of compounding
frequency can significantly impact the total
account value. But how does continuous co
pounding fit into the chaos of the stock mar
ket, where investments and trading activities
Occur on diverse timescales?

1 min left in chapter 8%


Continuous Compounding: 11,618.34

The difference is a mere 0.36 INR. Even if we


increase the initial investment toa substantial
1 crore
INR, the difference remains relatively
small at 358 INR.

Understanding
Logarithmic Return

I= logarithmic return or continuously com


pounded return or force of interest
P = Principal Invested
T=Total Account Value
i=logarithmic rate of return iover a period of
time t

Assuming reinvestment, we can express the


relationship between logarithmic return ()
and logarithmic rate of return (i) for a dura
tion of t as:
I=it
Logarithmic return essentially measures the
return achieved over a period t. When t is
equal to corresponds to the annualized
1, it
logarithmic rate of return.

1 min left in chapter 8%


Putting the value ofI,

t
a)
P

T= Pxeit

This concept aligns with our previous defini


tion but in a reversed manner.
In the realm of finance, logarithmic return,
denoted as "I," plays a vital role in assessing
investment performance. It is also known as
continuously compounded return or the force
of interest. Logarithmic return reflects the
rate at which an investment grows over time,
assuming that earnings are reinvested.
To establish the relationship between loga
rithmic return ([) and the logarithmic rate of
return (i) over a specific time period (t), we
use the formula:

I=ixt
In simpler terms, logarithmic return repre
sents the return on an investment over a pe
riod of time (t). When I = 1 and t
=
1,
it is
as
referred to the annualized logarithmic rate
of return.

1 min left in chapter 9%


In the context of stock market returns, the
primary focus is often on the annualized log
arithmic rate of return. This aligns with ou
previous definition of continuous compound
ing, where i represents the interest rate of
continuously compounded return and is syn
onymous with the logarithmic rate of return.

Calculating Logarithmic Returns


Let's apply the concept of logarithmic return
to a practical scenario. Suppose you have
made an investment with the following de
tails:
Principal (P): 1,193,403.12 INR
Profit (P' = P+1- P): 163,957.99 INR
Time (t): 40 days
To calculate the simple return, we can use the
formula:
• Simple Return (%) = (Profit/ Principal) x
100
Simple Return (%) = (163,957.99 /
1,193,403.12) x 100 13.7386%
Now, let's calculate the logarithmic return for
the same data. In this case, "t" represents the
fraction of a year (40 days out of 365 days).
The formula for logarithmic return is:
LogarithmicReturn = log(P' /P)

1 min left in chapter 9%


However, as "t" is relatively small, we can ap
proximate log(1) as O, and log(t) as 0 as well.
Therefore, the rate of return in 40days can be
simplified to:

Logarithmic Return in 40 days = log(P/ P)


Calculating this:
Logarithmic Return in 40 days
log(1,193,403.12 + 163,957.99/ 1,193,403.12)
The logarithmicreturn in this case is approxi
mately 12.8733%.
The concept of continuous compounding in
troduces a fascinating dimension to financial
calculations, offering a glimpse into the world
of exponential growth. In practical terms, it
allows investors to envision the potential of
their investments when interest is applied
continuously.
In the stock market, where chaos reigns and
investments occur on various timescales, con
tinuous compounding serves as a theoretical
framework that approximates the dynamics
of wealth accumulation. While investors may
not experience true continuous compounding,
the concept provides valuable insights into the
potential growth of investments.
Logarithmic return, on the other hand, offers
a precise way to measure the rate of invest

1 min left in chapter 10%


ment growth over time, accounting for rein
vestment. It is a valuable tool for comparing
different investment strategies and assessing
the performance of investment portfolios.
In summary, continuous compounding and
logarithmic return are essential concepts in
finance that shed light on the power of com
pounding and the intricacies of investment
growth. While the stock market may be a
realm of chaos, these mathematical principles
provide a foundation for understanding and
optimizing financial decisions.

1 min left in chapter 10%


Random Variable
A random variable, often denoted as X, is a
variable that represents the potential numer
ical outcomes of a random event or proceSs.
Random variables come in two main types:
discrete and continuous.

Discrete Random Variable:


A diserete random variable is one that can
only assume a countable number of distinct
values. These values are typically whole num
bers and can be listed, such as 0, 1, 2, 3,
4, and so on. Discrete random variables are
commonly associated with situations involv
ing counts or whole units. Ifa random variable
can take only a finite number of distinct val
ues, it is categorized as discrete. Examples of
discrete random variables include:
The number of children in a family.
The attendance on a Friday night at a
cinema.
Thecount of patients in a doctor's surgery.
The number of defective light bulbs in a
box of ten.

1 min left in chapter 10%


Continuous Random Variable:
continuous random variable is one that can
A

take on an infinite number of possible values.


These values form a continuous range, often
involving measurements with decimal points.
Continuous random variables are frequently
used to represent quantities that can vary
across a broad spectrum. Examples of contin
uous random variables include:

Height of individuals.
Weight of objects.
The amount of sugar in an orange, which
can take any value within a range.
The time required to run a mile, which can
be measured with high precision.
NSEprice changes in 0.05
We are referring to a specific example of a
continuous random variable, where the ran
dom variable represents the changes in the
National Stock Exchange (NSE) prices, and
the typical change is 0.05 units. This repre
sents a continuous random variable as it can
take on an infinite number of possible price
change values.
Stock prices or values are diserete and
Stock market returns are continuous
variables.*

1 min left in chapter 11%


Stock Prices: A Discrete World
The heart of any stock market is, undeniably,
stock prices. These prices represent the cur
rent value of a company's shares at any given
moment. In the context of INR, it's important
to understand that stock prices are inher
ently discrete.
They move in predefined tick levels, each step
representing a specific INR denomination.
For instance, you might observe a stock trad
ing at 100, 100.05, 7100.10, and so forth.
This discrete movement is in line with the
nature of financial markets, where stockS are
bought and sold in whole units.

Stock Market Returns: A


Continuous Perspective
Stock market returns are often calculated
using formulas like (Current Price - Previ
ous Price)/ Previous Price. The outcome of
this calculation is a continuous variable that
reflects the rate of change, expressed as a
percentage. While theunderlying stock prices
may be discrete, the returns they yield, espe
cially when viewed as percentages, span a con
tinuous spectrum of values.

1 min left in chapter 11%


Furthermore, when financial professionals
discuss returns in a more holistic, long-term
perspective, they often employ continuously
compounded returns. These returns are
articulated as logarithmic returns and are
symbolized as ln(T/P), where "T" signifies the
final price, and 'P' represents the initial price.
As Log(T/P) is a continuous variable; stock
market returns are continuous. It factors
in the compounding effect achieved through
reinvesting gains over time.
In practical terms, continuously compounded
returns offer a more precise depiction of how
investments grow over extended periods, as
they account for the continuous, compound
ing nature of returns.

1 min left in chapter 11%


Price Action
In the complex world of financialmarkets, one
concept stands out as a cornerstone of analy
sis and strategy: Price Action. It's a term you'l
often hear in trading circles, and it's vital for
understanding how asset prices move. In this
article, we'lldelve into the fascinating realm of
Price Action, exploring what it is, how it's ana
lyzed, and why it matters to traders.

The Essence of Price Action


At its core, Price Action is the study of a
security's price movements over time. It en
capsulates the raw, unadulterated data of an
asset's value as it ebbs and flows in the mar
ket. What makes Price Action distinct is that it
doesn't concern itself with the underlying fun
damentals of the security, such as earnings re
ports, economicindicators, or company news.
Instead, it focuses solely on the historical data
of price changes and market behavior.
This simplicity is what gives Price Action its
unique character. It is often deseribed as a
"chartless" method because it doesn't rely on
intricate charts cluttered with indicators and
overlays. All one needs to engage in Price Ac
tion analysis isaccess to recent historical price

1 min left in chapter 12%


data and an understanding of past price move
ments.

Price Action Strategies


Within the realm of Price Action, a subset
of strategies emerges, aptly named Price
Action Strategies. These strategies revolve
around the analysis of historical prices, pri
marily using candlestick charts. Candlestick
charts provide a graphical representation of
price novements over time, making it eas
ier for traders to identify critical patterns and
trends.
One of the fundamental concepts in Price Ac
tion Strategies is the identification of swing
lows and swing highs. These are pivotal
points in price movement that signal potential
trend reversals. While it's p0ssible to recog
nize these points without charts, the visual
representation of candlestick patterns simpli
fies the process and reduces the risk of misin
terpretation.

Indicators and Price Action


In the world of trading, indicators are often
used to supplement analysis. While some indi
cators, like Bollinger Bands, are considered
Price Action indicatorsbecause they are con

1 min left in chapter 12%


structed based on historical price data, others,
such as the Volume Profile, are not.
The distinction lies in the interpretation of
the data. Price Action indicators derive their
signals directly from past prices, whereas indi
cators like the Volume Profile incorporate ad
ditional information, such as trading volume
at specific price levels. This added dimension
can impact trading decisions, making it im
portant for traders to understand the differ
ences between various indicators.

Trailing Stops and


Trigger Points
In practical trading, Price Action plays a cru
cial role in decision-making. Traders often use
Price Action to set trailing stop-loss levels.
This involves adjusting the stop-loss order
based on recent price movements. For exam
ple, a trader might place a trailing stop at the
high of the last candle. If the price moves in
their favor, the stop level adjusts accordingly,
allowing for potential profit-talking while min
imizing losses.
Moreover, Price Action is often employed to
identify trigger points. These are specific
price levels that, when breached, can initiate
significant market movements.

1 min left inchapter 12%


O Search symbol 30m v Views v Display v Studies Layout +
:
ASHOKLEY
10700

106.00

105.00

10400

103.00

10200

101.00

1200 1200 710 711 1200 1200 7/13 1200

For instance, a long wick on a candlestick


chart can indicate strong buyer presence, and
traders might say, "Crossing this level will
trigger Price Action." This means that if the
price surpasses that level, it signals a change
in market sentiment, potentially leading to a
rally.

However, it's essential to note that these trig


ger points can also lead to stop-loss orders
being activated. If traders place stop-loss or
ders near these levels, a breach could trigger
a cascade of orders, leading to abrupt market
movements.
We want to ride that!

1 min left in chapter 13%


Indicator
Doyou know that most of the Technical analy
sis are either done by price action or are done
through indicators. Well, it may sound confus
ing but some indicators are created based on
price action itself.
By here indicators I put those data as well
which can not be derived from historical price
of the security.
An indicator is anything that can be used to
predict future financial or economic trends.
Change of price of a security falls into finan
cial trend. I will come to the economic trend
later on.
There are 16 major economic trends based
on which we trade on international currency
pairs in forex market. It costed me over huge
burnings of 400K$+ tomaster them. But here
we shall stick to financial trends.

Indicators are in fact a great help for making


informed trading decisions and an informed
trading decisions carry less risk.

So in a short it gives buy, sell or do nothing


signals. So indicators have more weightage
than others. So we combine more indicators to
increase our probability of profit.
1 min left in chapter 13%
R
05-05-17 09:44 ARA BOUGHT ICICIBANK1ZMAYFUT NFO 299.0

05-05-17 09:38 URSA MAJOR BOUGHT ICICIBANK1ZMAYFUT NEO


299.45

05-05-17 09:27 HYDRA SOLD ICICIBANK NSE


299.7

Zerodha Opentrade is a platform where start


traders of Zerodha share their trades live and
you can followthem paying somne respect to
wards Zerodha.
As you can see, different weightage given to
different indicators caused a tension ful trade
on the same very stock. But the weird thing
is they allare right in their trade setup. Yes
terday people bought Bank of India as well as
sold it. In some cases some made money in
both case. In some case some got slaughtered
in both case.
It's because of the exit strategy.
So price action indicators is constructed with
-
four elements of the securities Open, High,
Low, Close. Non price action indicators have
privilege to add volume and open interest of
the securities.
Q. By slaughtering you mean they exit
at wrong time?
A. By slaughteredI meant loss. There are four
cases of loss - Wrong entry, wrong exit. Both
entry andexit depends. It's proven in last ses
sion with the Titan Futures that people tend
to not enter the same trade which they have

1 min left in chapter 13%


exited in loss. So if someone has exited a trade
and is not entering in the same trade to com
plete the whole trade cycle is also an example
of loss.
If one is exiting with price action in the middle
of the trade. He must enter again with price
action or whatever method his trade setup
follows during the time frame of his trading
opportunity.
Q. We are
talking entry and exit based
on bollinger? Or is it some general the
ory?

A. General. In our Bollinger Trade Setup, we


are entering based on Bollinger's and exiting
based on price action. But if exited in the mid
dle and there exists trade opportunity win
dow, we are entering the same trade with price
action.

But if you see our ICICItrade, there is a case


of trailing stop loss. This case of trailing stop
loss arises when the main trading opportu
nity is gone and another trading opportunity
arises based on other indicators or the other
timeframe of the sanme indicator which
has less probability of profit. In such case
you're risking your past profit made and mov
ing ahead.

1 min left in chapter 14%


Indicator Types
There are two types of indicators: leading and
lagging.
A leadingindicator gives a signal before
the new trend or reversal occurs.
A lagging indicator gives a signal after
the trend has started and basically informs
you "Hey buddy, pay attention, the trend
has started and you're missing the boat."
You're probably thinking, "Ooooh, I'm going
to get rich with leading indicators!" since you
would be able to profit from a new trend right
at the start.
You're right.
You would "catch the entire trend every sin
gle time, IF the leading indicator was correct
every single time. But it won't be.

When you use leading indicators, you will ex


perience a lot of fakeouts. Leading indicators
are notorious for giving bogus signals which
could "mislead" you.
Get it? Leading indicators that “mis
lead" you?
The other option is to use lagging indicators,
which aren't as prone to bogus signals.

1 min left inchapter 14%


Lagging indicators only give signals after the
price change is clearly forming a trend. The
downside is that you'd be a little late in enter
ing a position.

Often the biggest gains of a trend occur


in the first few bars, so by using a lag
ging indicator you could potentially mis
out on much of the profit. And that sucks.
While the two can be supportive of each other,
they're more likely to conflict with each other.
We're not saying that one or the other should
be used exclusively, but youmust understand
the potential pitfalls of each.
Without getting into more deep, if you look at
the definitions of them, you can see all oscilla
tors like RSI, Stoch, PSAR are leading indica
tors.
Bollinger Bands, Moving Averages (SMA,
EMA, DEMA,.), MACD are lagging indica
tors.
Typically, I look for my lagging indicator or
coincident indicators on a higher time frame.
Then I combine that indicator with my leading
indicators on a lower time frame.
There is a huge battle over the definition of in
dicators. Famous technical analysis trader (fi
bonacci trader) Joe DiNapoli. puts RSI, Stoch
as lagging indicators.

1 min left in chapter 15%


That's why we use Stochastics in our trade
setup. The whole story is just because of this
line.

1 min left in chapter 15%


Moving Average
At its core, a moving average (MA) isa techni
cal indicator that tracks the average price of a
security over a specified number of time peri
ods. MAs are often classified as trend-follow
ing or lagging indicators because they rely on
historical price data to provide insights into
potential future price movements. They are
invaluable tools for traders seeking to identify
trends, reversals, and key support or resis
tance levels.

The Simple Moving


Average (SMA)
One of the foundational MAs is the simple
moving average (SMA). As its name sug
gests,the SMA is a straightforward calculation
that involves taking the average of a security's
closing prices overa defined number of time
periods. This results in a line that smooths out
price fluctuations, making it easier tospot un
derlying trends.
Contrary to the simplicity of its calculation,
SMAS offer valuable insights. They are par
ticularly effective for identifying long-term
trends and are a favorite among investors who
prefer a more stable and less volatile approach
to trading.
1 min left in chapter 15%
The Exponential Moving
Average (EMA):
While the SMA is a robust choice for trend
analysis, theexponential moving average
(EMA) takes a slightly different approach.
EMA assigns more significant weight to recent
prices, making it more responsive to short
term price changes. This characteristic allows
EMA to adapt quickly to shifts in market sen
timent and provides traders with a more dy
namictool for decision-making.
For traders seelking a balance between the
stability of SMAs and the responsiveness of
EMAs, the EMA is often the go-to choice. It
strikes a middle ground that captures both
short-term fluctuations and long-term trends.
DEMA: Double Exponential
Moving Average
In the world of moving averages, there exists
less commonly known yet intriguing option
known as the Double Exponential Mov
ing Average (DEMA). DEMA combines el

ements of both a single exponential moving


average (EMA) and a double EMA. The
sult is an indicator that exhibits heightened
volatility, making it ideal for certain trading
Scenarios.

1 min left in chapter 15%


DEMA's increased sensitivity to price changes
makes it a valuable tool for traders working
with low-beta stocks that tend to move at
a slower pace. For instance, stocks like Coal
India, known for their relatively stable price
movements, can benefit from DEMA's ability
to capturesubtle shifts in market dynamics.
EMA: The Middle Path
While DEMAoffers unique advantages in spe
cific situations, the EMA often occupies the
Sweet spot for many traders. It sits between
the stability of the SMA and the volatility
of DEMA in terms of price responsiveness.
This positioning makes EMA a versatile choice
suitable for various trading styles and prefer
ences.

Traders often opt for the EMA when


they require an indicator that can adapt
to changing market conditions without
sacrificing stability.
Moving Averages and Their Extended Utility
Moving averages go beyond merely identify
ing trends; they also form the basis for several
other critical indicators used in technical anal
ysis.One such indicator is the Moving Aver
age Convergence Divergence (MACD),
which leverages moving averages to reveal po

1 min left in chapter 16%


tential changes in the strength and direction
of a trend.

Another prominent indicator built upon mov


ing averages is the Bollinger Bands. These
bands consist of an SMA at the center and
upper and lower bands based on standard de
viations. Bollinger Bands helps traders iden
tify volatility and potential reversal points,
making them a valuable tool in market analy
sis.

The Practical Application:


Calculating Moving Averages
Here are the settings of the Moving Average.

1 min left in chapter 16%


Moving Average

Period 10

Field Close

Type simple

Offset

Underlay

MA

DONE

This is a representation of SMA (1o) which


signifies a simple moving average caleu
lated over ten time periods. In this context,
the average considers the closing prices of the
last ten data points. If you're working with
daily data, this translates to the last ten trad
ing days.
Type = Simple means it's a Simple Moving
Average.

1 min left in chapter 16%


Let's calculate the moving average of the
Bank of India. Calculate me SMA(10) on
24/04/2017 -
Date |Close

J07/04/2017 15:30:00 140.8


|10/04/2017 15:30:00 146
|11/04/2017 15:30:00 149.15
12/04/2017 15:30:00 1476
13/04/2017 15:30:00 149.3
17/04/2017 15:30:00 147
18/04/2017 15:30-00 |152.6
|19/04/2017 15:30:00 149.3
20/04/2017 15:30:00 152.2
|21/04/2017 15:30:00 150.45
|24/04/2017 15:30:00 |153.15
25/04/2017 15:30:00 158.45
|26/04/2017 15:30:00 164.15
|27/04/2017 15:30:00 181.1

|28/04/2017 15:30:00 185.4


02/05/2017 15:30:00 179.55
03/05/2017 15:30:00 |184.8
04/05/2O17 15:30:00 191.8
05/05/2017 15:30-00 182.8

When we mention SMA (10) it is generally as


sumed to be in a daily timeframe over a close
field (We take close prices here). So the last 10
prices from 24/04/2017 are
10/04/2017 15:30:00 146
11/04/2017 15:30:00 149.15
|12/04/2017 15:30:00 1476
13/04/2017 15:30:00 149.3
17/04/2017 15:30:00 147
18/04/2017 15:30:00 152.6
19/04/2017 15:30:00 149.3
20/04/2017 15:30:00 152.2
21/04/2017 15:30:00 150.45
|24/04/2017 15:30:00 153.15

So the average of the dataset (146, 149.15,


147.6, 149.3, 147, 152.6, 149.3, 152.2, 150.45,
153.15 ) is 149.675

1 min left in chapter 16%


Bollinger Bands
In this section. you willlearn

What the Bollinger Bands indicator is.


What the Bollinger Bands indicator shows.
How to use the Bollinger Bands indicator.
How altering the Bollinger Bands indica
tor settings affects it.

The Bollinger Bands Indicator


Amit_Ghosh published on TradingView.com, Apr 28, 2023 13:39 UTC-5:30
AXIS BANK, 1D, NSE 0885. 10 H890.05 L853.65 Ca59.40 -22.00 (-2.505) INR

900.00

895.00

890.00

885.00

880.00

875.00

870.00

865.00
Oscillating Indicator

855.00

850.00

845.00

840.00

835.00

830.00

825.00

820.00

815.00

810.00

13 20 Apr 10 May 15

1/ TradingView

The Bollinger Bands Indicator is an oscillating


indicator.

Traders use it to measure the volatility of a


market.
The Bollinger Bands can help you to identify
pointsat which the price of an asset is high or
lowrelative to its recent average. This can in

1 min left in chapter 17%


turn help you topredict when price might rise
or fall to its average level.
Amit_Ghosh published on TradingView.com, Apr 28, 2023 13:43 UTC-5:30
AXIS BANK, 1D, NSE O885. 10
H890.05 L853.65 C858.50 -22.90 (-2.60%1) INR

900.00
Line 2
895.00

890.00
Upper Band
885.00

880.00

875.00

870.00

865.00
Moving Average

|38.50

Line 1

850.00

845.00

840.00

Lower Band
825.00

830.00

Line 3 825.00

820.00

815.00

810.00

13 20 27 10 24 Ma

17 TradingView

Three main lines make up the Bollinger Bands


indicator.
The first of these, the central band, is a simple
moving average.

The second and third, the upper and lower


bands, represent levels at which price is rel
atively high or low, compared to this moving
average.

1 min left in chapter 17%


Amit_Ghosh published on Trading
Vie com, Apr 28, 2023 13:47 UTC-5:30

AXIS BANK, 1D, NSE O885.10 H890.05 L853.65 C859.30 -22.10 (-2.518) INA

980.00

970.00

960.00

950.00

940.00

930.00

920 00

910.00

900.00

890.00

880.00

870.00

859.30
01-43-28

850.00

840.00

830.00

820.00

810.00

800.00
2023 16 13 3 22 May

1 TradingView

Most of an asset's price action will take place


within two outer bands, mneaning they can be
used to predict reversals.
Amit_Ghosh published on TradingView.com, Apr 28, 2023 13:51 UTC-5:30
AXIS BANK, 1D, NSE INF
O885.10 H890.05 L853.65 C858.75 -22.65 (-2.57%)
980.00

970.00

960.00

950.00

940.00

930.00

920.00
Asset could be OVERBOuGHT
910.00

900.00

890.00

880.00

870.00

858.75

850 00

840.00

830.00

820.00
Asset could be OVERSOLD
810.00

E 800.00
23 16 Feb 13 21 Mai 13 21 Ap May

17 TradingView

If price reaches the upper band, this


means it is relatively high and the asset
could be overbought.
You could look to sell an overbought asset
on the assumption that its price will fall to
wards moving average.

1 min left inchapter 17%


Amit_Ghosh published on TradingView.com, Apr 28, 2023 13:59 UTC-5:30

AXIS BANK, 1D, NSE O885.10 H890.05 L853.65 C859.50 -21.90 (-2.485) INF

900.00

896.00
Relatively HIGH Price
892.00

Upper Band 888.00

884.00

880.00

876.00

872.00

868.00

864.00
Moving Average

01:30-08
856.00
1
Line 852.00

848.00

844.00

840.00

Lower Band 836.00

832.00
Relatively LOW Price
828.00
Line 3
824.00

820.00
27 Ap 24 Mav 15

17 TradingView

Conversely, if price reaches the lower


band, this means it is relatively low and
the asset could be oversold.
You could look to buy an oversold asset on
the assumption that its price will rise to
wards the central moving average.
Amit_Ghosh published on TradingView,
dingView.com, Apr 28, 2023 13:55 UTC-5:30
AXIS BANK, 1D, NSE O8810 H890.05 C859.50 -21.90 (-2.485)
s3.65 INF

940,00

930.00

920.00

910.00

Price did not reverse.


900.00

890.00

880.00

870.00

850.00

840.00

830.00

820.00

Price did not reverse.


810.00

E
23 Feb 13 20 Mat 13 20 17 24 May

17 TradingView

It is important to remember that just because


price may reach the outer bands does not al
ways mean it will reverse.

1 min left in chapter 17%


Always look for further confirmation
from another indicator, or by using
candlestick analysis before you place
your trade.

The Bollinger Bands


Indicator and Volatility
Amit_Ghosh published on TradingView.com, Apr 28, 2023 14:05 UTC-5:30
AXIS BANK, 1D, NSE O885. 10 H890.05 L853.65 C858.45 -22.95 (-2.60%5) INR

980.00

970.00

High Volatility
960.00

950.00

940.00

920 00

920.00

910.00

890.00

880.00

870.00

858.45

850.00

840.00

830.00

820.00
Low Volatility
810.00

800.00
2023 16 Feh 13 22 Ap 17 Ma

TradingView

You can also use the distance between the


bands to indicate how volatile the price of an
asset is.
If the distance between the bands is large,
this indicates high volatility.
Conversely, if the distance between the
bands is small, this indicates low volatility.

Changing the Bollinger


Settings - Period
You can change the settings of the Bollinger

1 min left in chapter 18%


bands indicator to suit your own personal
strategy. The first setting you can change is
the period setting.
Altering the period setting will alter the num
ber of periods on which the Bollinger band is
calculated. The standard period setting is 20.
If you change this to a lower setting, 10 pe
riods for example, then the indicator will be
more sensitive toprice movements.

This will result in choppy and narrower


bands that price will reach and break
through more often.
This will offer more trading opportunities,
but the signals will be less reliable.
BB X
Inputs Style Visibility

Length 20

Source close

StdDev

Offset

MULTI TIMEFRAME

Timeframe Chart

v Wait for timeframe closes

Defaults v Cancel Ok

1 min left in chapter 18%


com, Apr 28, 2023 14:14 UTC-5:30
Amit_Ghosh published on TradingVie
AXIS BANK, 1D, NSE O885.10 H890.05 L853.65 C859.00 -22.40 (-2.54%) INR

910.00
MORE trading oppurtunities
905.00

5 Periods Bollinger Bands 900.00


LESS reliable signals
895.00

More Sensitive Indicator 890.00

885.00

880.00

875,00

870.00

865.00

01:15:19

850.00

845.00

840.00

835.00

830.00

825.00

820.00

815.00

810.00
E
Fe 13 20 Mar 13 20 17 May

1T/ TradingView

Conversely, if you change this to a higher set


ting, 30 periods, for example, then the indica
tor will be less sensitive to price movements.
This will result in smoother and wider
bands that price will reach and break
through less often.
Thiswill offer less trading opportunities,
but the signals will be more reliable.
Amit Ghosh published on TradingView. com, April 28. 2023 03:46:08 EST
NSE:AXISBANK, 1D 858.85 V -22.55 (-2.56%) o:885.10 H:890.05 L:853.65 C:858.85
AYIS RANK. 1D. NSE INR

910.00
LESS trading oppurtunities
905.00

30 Periods Bollinger Bands 900.00


MORE reliable signals
895.00

Less Sensitive Indicator 890.00

885.00

880.00

875.00

870.00

B65.00

01:13-5

850.00

845.00

840.00

835.00

830.00

825.00

820,00

815.00

810.00
E
Feb 20 ApI May

17 TradingView

As our Entropy strategy's watchlist is pre


pared using the theory of Bollinger Bands

1 min left in chapter 18%


Indicator, We can improve our win ratio by
changing this period setting. This will gener
ate fewer trades and correct trades but the
number of trades will be drastically reduced.
Sowill net profit.

Changing the Bollinger Settings


-
Standard Deviation
The second setting you can change is the stan
dard deviation setting.
Changing the normal deviation setting will
alter how much of the data from the moving
average's normal distribution pattern is in

cluded in the bands.


A standard deviation setting of 1 means
that 68% of price action will be contained
within the bands.
A standard deviation setting of 2 means
that 95% of price action will be contained
within the bands.
The default standard deviation setting
for Bollinger bands is 2.
So, increasing the settings from 2 to 3 will
likely give you less frequent but more reli
able signals.
Decreasing this setting to 1 for exanmple
will make the bands narrower, meaning
less price action will be contained within
1 min left in chapter 18%
them. This will likely give you more fre
quent but less reliable signals.
BB X
Inputs Style Visibility

Length 30

Source close

StdDev 2

Offset

MULTI TIMEFRAME

Timeframe Chart

Wait for timeframe closes

Defaults Cancel Ok

Summary
So far you have learned that –
1. The Bollinger bands indicator is an
oscillator indicator.
2. It can present selling opportunities
when an asset is overbought or buying
opportunities when an asset is over
sold.
3. Youl can change both the period set
ting and the standard deviation set
ting.
4. Depending on how you change these
settings, the Bollinger Bands indica
tor will give you "m
"more number of less
reliable signals" or "less number of
more reliable signals".

1 min left in chapter 19%


Frequently Asked Questions
Standard Deviation
Standard deviation is a measure of how much
the values in a set of data vary from the ay
erage value of that data set. In the context of
Bollinger bands, the standard deviation set
ting refers to the amount of price action that is
included in the bands.
If you set the standard deviation to 1, it means
that 68% of the price action will be contained
within the Bollinger bands. This means that
the bands will be relatively tight around the
moving average line, and they willnot include
as much of theprice action as they would if the
standard deviation were set to 2.
To put it simply, when the standard deviation
is set to 1, the bands will be closer to the mov
ing average line and will include less of the
price action. When the standard deviation is
set to 2, the bands will be wider and willin
clude more of the price action.
The numbers 68 and 95
The numbers 68 and 95 come from the empir
ical rule, also known as the 68-95-99.7 rule.
This rule states that for a normal distribution
(also known as a bell curve), approximately:

1 min left in chapter 19%


68% of the data falls within one standard
deviation of the mean
95% of the data falls within two standard
deviations of the mean
99.7% of the data falls within three stan
dard deviations of the mean
So when we use a standard deviation setting
of 1 for Bollinger Bands, we are saying that we
want the bands tocontain approximately 68%
of the price action (which follows a normal
distribution). Similarly, when we use a stan
dard deviation setting of 2, we are saying that
we want the bands to contain approximately
95% of the price action.

1 min left in chapter 20%


The Dual Nature of
Bollinger Bands
In the realm of technical analysis and trading,
certain tools have achieved legendary status.
One such tool is the Bollinger Bands, a cre
ation of the brilliant John Bollinger. Initially
designed to measure overbought and oversold
levels, the Bollinger Bands have evolved into a
multifaceted indicator that can not only signal
reversals but also identify trends before they
materialize.
In this article, we'l dive into the fascinating
world of Bollinger Bands, exploring their ori
gins, their role as lagging and leading indica
tors, and how traders harness their power for
both mean reversion and breakout strategies.
The Genesis of Bollinger Bands
John Bollinger, a renowned technical analyst
and author, introduced the world to Bollinger
Bands in the early 1980s. His primary objec
tive was to create a tool that could gauge over
bought and oversold conditions in the market.
At its core, the Bollinger Bands consist of a
simple moving average (SMA) surrounded by
two standard deviation channels. These chan
nels, often referred to as the upper and lower

1 min left in chapter 20%


bands, expand and contract in response to
market volatility.
Bollinger Bands as Lagging Indicators
Initially, Bollinger Bands were regarded
as lagging indicators. This classification
stemmed from their reliance on moving aver
ages, which inherently incorporate past price
data.

The upper and lower bands, calculated


based on standard deviations from the
SMA, provided traders with a visual rep
resentation of price volatility and potential
reversal points.
Traditional usage dictated that when
prices touched or crossed the upper band,
it was an indication of potential over
bought conditions, suggesting a reversal
might be imminent.
Conversely, prices touching or crossing
the lower band signaled potential oversold
conditions and a potential bullish reversal.
Bollinger Bands as Leading Indicators
Here lies the twist in the tale: while Bollinger
Bands were designed
designed as lagging indicators,
they possess an unconventional capability. By
tweaking the settings and using different stan
dard deviations, traderscan harness the same
Bollinger Bands to anticipate trends before

1 min left in chapter 20%


they materialize. This transforms them into
leading indicators, offering a new dimension
to trading strategies.

Imagine the power of being able to identify


a trend in its early stages, well before most
market participants catch wind of it. This is
precisely what makes the Bollinger Bands a
potent tool for traders seeking an edge in the
markets.
The Dual Role of Bollinger Bands: Mean
Reversion and Breakout Strategies
Traditionally, traders have been schooled in
the art of mean reversion when it comes
to Bollinger Bands. The prevailing wisdom
has often been to "short on the top of the
Bollinger" when prices touch the upper band
and to "buy on the low of the Bollinger" when
prices interact with the lower band. This ap
proach plays into the Bollinger Bands' role as
lagging indicators, capitalizing on the princi
ple that price tends to revert to the mean over
time.
However, what if we told you that the same
indicator could be a valuable tool for breakout
strategies as well? Yes, you read that right. By
recognizing that Bollinger Bands can serve as
leading indicators, traders can also use them
toidentify potential breakouts. It's a dual role

1 min left in chapter 21%


that adds a layer of complexity and versatility
to the Bollinger Bands.
Riding the Bollinger Bands
The idea of "riding the Bollinger Bands" might
not be a common refrain among traders, yet
it encapsulates the essence of mastering this
indicator. To ride the Bollinger Bands means
toleverage their unique ability to signal both
mean reversion and breakouts.
For instance, when prices ride the upper
band, it doesn't merely suggest an over
bought condition; it can also imply the po
tential for a strong uptrend. Traders who
recognize this can position themselves to
ride the wave of a breakout, capitalizing
on the leading indicator aspect of Bollinger
Bands.
Conversely, when prices cling to the lower
band, it hints at potential oversold condi
tions and the chance for a bullish reversal.
This is where mean reversion traders step
in, capitalizing on the indicator's lagging
aspect.

The Verdict: Duality of Bollinger


Bands
In the world of technical analysis, few tools
the versatility and duality of Bollinger
Bands.

1 min left in chapter 21%


Created with the intention of measuring mar
ket extremes, they have evolved into a trading
maestro with the ability to both signal rever
sals and anticipate trends.
Traders who master the art of "riding the
Bollinger Bands" can tap into a unique blend
of mean reversion and breakout strategies, all
within the confines of a single indicator.
So, the next time youhear someone say "short
on the top of the Bollinger" or "buy on the low
of the Bollinger," remember that the same in
dicator can be your guide to capturing trends
before they unfold. In the ever-evolving world
of trading, Bollinger Bands remain an icon of
technical analysis, constantly surprising and
delighting those who dare to explore their
depths.

1 min left in chapter 21%


Standard Deviations
Standard deviation is a critical tool in
understanding and managing risk in
the stock market. It helps investors as
sess the volatility of individual stocks,
indices, and portfolios, aiding in in
formed decision-making and the con
struction of well-balanced investment
strategies.
Isuspect that the majority of market partici
pants haven't thought much about the statisti
cal concept of standard deviations since their
university days. While statistics may have
seemed dry and dreary in college, a necessary
evil on the way to aneducation, when applied
to the markets that we all have a passion for
trading they are really quite fascinating.
Standard deviation measures the spread of a
data distribution. The more spread out a data
distribution is the greater its standard devia
tion. For example, the blue distribution on the
bottom has a greater standard deviation (SD)
than the green distribution on top:

1 min left in chapter 22%


SD = 1.59

SD = 2.79

.:.:::::
01 2 3 4 5 6 7 8
9 10

Standard deviation is a statistical measure


that quantifies the amount of variation or dis
persion in a set of data points. In the context
of the stock market, it is commonly used to
gauge the volatility of a stock's or an index's
returnsover a specific period. A higher stan
dard deviation indicates greater price variabil
ity or volatility, while a lower standard de
viation suggests more stability and less price
fluctuation.
Dispersion is the difference between the ac
tual value and the average value. The larger
this dispersion or variabilityis, the higher the
standard deviation. The smaller this disper
sion or variability is, the lower the standard
deviation.

Example of Calculation of
Standard Deviation
Interestingly, the standard deviation cannot
be negative. A standard deviation close to o
indicates that the data points tend to be close
to the mean (shown by the dotted line). The

1 min left in chapter 22%


further the data points are from the mean, the
greater the standard deviation.
Mean means the average of the numbers.
First,we need a data set towork with. Here's a
good one: 6, 2, 3, 1

The formula for standard deviation (SD) is

SD =

where> means 'sum ofl,z is a value in the data set, is the mean of the

data set, and n is the number of data points.

6+2+3+1 12
4 4
=3

1 min left in chapter 22%


Data point z Distance from the mean squared z-

6
6-==9
2
2-==1
3
3-==0
1

1-==4
Divide the sum from Step 3 by the number of data points (n = 4):

C-_ 14
=3.5
4

The standard deviation is the square root of


3.5 is 1.87.

The higher the deviation, the more it tends to


get attracted towards the mean. In this case, it
is the median Bollinger. But it's not actually a
median. It's mean.

Volatility in the Stock Market


Volatility is a fundamental characteristic of
the stock market. It refers to the degree of
variation in the prices of stocks or indices over
time. Stock prices do not move in a linear
or predictable fashion; instead, they fluctu

1 min left in chapter 22%


ate due to various factors, including economic
news, corporate earnings, geopolitical events,
and investor sentiment.
Measuring Volatility with Standard Deviation

Standard deviation is a powerful tool for


quantifying this volatility. When applied to
historical stock returns, it helps investors and
analysts understand how much a stock's or a
market's returns have deviated from their ay
erage (mean) returns.

The larger the standard deviation, the


wider the range of price movements, indi
cating higher volatility.
Conversely, a smaller standarddeviation
Suggests more stable, lessvolatile returns.

Risk Assessment with Standard Deviation

In the world of investing, risk is a central


concern. Investors generally seek a balance
between risk and return. Standard deviation
assists in assessing and comparing the risk
associated with different stocks or portfolios.
A higher standard deviation implies greater
risk, which may translate into the potential for
higher returns but also the possibility of sig
nificant losses. A lower standard deviation in
dicates lower risk but may offer mnore modest
returns.

1 min left in chapter 23%


Portfolio Diversification with
Standard Deviation
Standard deviation also comes into play when
building diversified investment portfolios. By
including assetswith low or negative correla
tions, investors can reduce the overall port
folio standard deviation. This diversification
helps mitigate the impact of individual stock
or asset volatility and enhances the risk-re
turn profile of the portfolio.
Volatility Trading with Standard Deviation

In addition to its role in risk assessment


and portfolio management, standard devia
tion is integral to volatility trading strategies.
Traders and investors use volatility indices
(such as the INDIAVIX for the NIFTY 50) and
related financial instruments to take positions
based on their expectations of future market
volatility. These strategies rely on standard
deviation and other statistical tools to make
informed decisions.

Limitations and Caveats


While standard deviation is a valuable metric
for understanding stock market volatility, it
does have limitations. It assumes that returns
follow a normal distribution, which may not
always hold true, especially during extreme

1 min left in chapter 23%


market events. Additionally, past volatility
may not necessarily reflect future volatility ac
curately.

1 min left in chapter 23%


Probability Distribution
probability distribution is a statistical func
A

tion that describes allthe possible values and


likelihoods that a random variable can take
within a given range.
There are many different types of probability
distributions. One of them is a normal dis
tribution. A probability distribution has a
number of factors which is used to describe
it - mean, standard deviation, skewness, and
kurtosis.
We are already aware
awa of the mean and stan
dard deviation. But let's get inside of kurtosis
and skewness.

Dispersion
Standard deviation is a measure of the
dispersion of a set of data from its mean. If
the data points are further from the mean,
there is a higher deviation within the data
set.
Dispersion is a statistical term describing
the size of the range of values expected for
a
particular variable.
Like, beta is a familiar risk measurement
which measures the dispersion of a secu
rity's returns relative to a particular
benchmark or market index. You can see
1 min left in chapter 23%
how it is calculated in more detail here
https://unofficed.com/how-to-caleulate
beta-for-indian-stock-market/

Normal Distribution
The standard normal distribution or normal
distribution is a symmetrical data distribution
where most of the results lie near the mean.
A standard normal distribution is divided
symmetrically using the mean of the distribu
tion. (interpret as the average of the data set)
99.7% of the data are within
3 standard deviations of the mean
95% within
2 standard deviations
68% within
1
standard
deviation

u-3o l-2a 4to u+ 2o u+ 3o

In this context:
the mean of the distribution.
Murepresents
Sigma represents the standard deviation.
If we take into account the settings of
ollinger Bands as described below:

Period: 20

1 min left in chapter 24%


Standard Deviations: 2
Moving Average Type: Simple
This implies that if we gather the last 20 price
data points and calculate their average, we ob
tain the median Bollinger value.
Here is how it is calculated if you abide by the
-
settings of our 2 SD Bollinger Bands

* Middle Band = 20-day exponential moving


average (EMA)
* Upper Band = 20-day EMA + (20-day stan
dard deviation of price x 2)
* Lower Band = 20-day EMA - (20-day stan
dard deviation of price x 2)
Upon closer examination of the formulas, We
can assume based on the definition of Stan
dard Deviation that approximately 95% of a
stock's prices from the stock market tend to
fall within the Bollinger Bands set ata 2-stan
dard deviation range.
Similarly, around 68% of a stock's prices from
the stock market typically remain within the
Bollinger Bands configured with a 1-standard
deviation range.

Isn't that amazing?

1 min left in chapter 24%


But we are assuming here that stock market
prices follow a standard normal distribution,
do they?
Q: Isour assumption that stock market
prices follow a standard normal distri
bution accurate?
A: Let's illustrate this with a practical example
using the 1 Standard Deviation (SD) Bollinger
band. These bands, which include upper and
lower limits, adjust as the mean changes. Ac
cording to theory, prices should fall within
these limits about 68% of the time.
Q: Can you explain why the Bollinger
Bands might not always conform to the
68% and 95% expectations based on a
normaldistribution?
A: You'reabsolutely right. While theory sug
gests that roughly 68% of data should stay
within one standard deviation, and about
95% within two standard deviations, Bollinger
Bands work best in stable, range-bound mar
kets. In trending markets, their performance
can be less reliable. When we examine histor
ical price charts, such as those for indices like
Nifty, we often find that the numbers for 1SD
and 2SD are closer to 65% and 90%, respec
tively.

1 min left in chapter 25%


Q: How does Bollinger Band Riding
Strategy (BRS) operate in a trending
market?
A: BRS primarily thrives in a ranged market,
focusing on the 1 SD to 2 SD range. It signals
that a stock has shifted from one range to an
other. How you trade it and whether you con
tinue to ride it if it crosses 2 SD depends on
your exit strategy.

Let's take an example: Infibeam rises from


1000 to 1010 in a single day. On a linear scale,
it appears as a 10-point change, but on a log
arithmic price scale, it's represented as a per
centage (or fraction), specifically a 1% change.
Now, if Infibeam rises from 101O to 1020 on
another day, it's still a 10-point move on the
linear scale, but on the logarithmic scale, it's
approximately a o.99% change. The logarith
mic scale is crucial because it factors in rela
tive changes, unlike the linear scale.
Q: So, can we conclude that the BRS
strategy lacks mathematical backing
and relies solely on trader intuition and
experience?
A: That's not accurate. BRS is firmly rooted
in mathematical principles. When a stock
moves beyond 1 SD, it essentially establishes
a new trading range, and the probability of it
following the same trend is notably high. This

1 min left in chapter 25%


strategy is not just based on intuition or expe
rience; it's supported by mathematical foun
dations.

Mean, Median, Mode


The mean is the average of all numbers.
The statistical median is the middle num
ber in a sequence of numbers. If there is an
even set of numbers, average the two mid
dle numbers.
• The mode is the number that occurs most
often within a set of numbers. Mode helps
identify the most common or frequent oc
currence of a characteristic. It is possible
tohave two modes (bimodal), three modes
(trimodal) or more modes within larger
sets of numbers.

Consider the following series as an example:


1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 7, 7, 8. This

series is described as trimodal because it ex


hibits three modes, which are 2, 3, and5. In
contrast, a series like 1, 2, 2, 3, 4, 4 is termed
bimodal since it has two modes, specifically 2
and 4.

Skewness
Skewness describes how a data distribution
leans. (i.e. describes asymmetry from the nor
mal distribution)
1 min left in chapter 25%
In a normal distribution curve, the data is dis
tributed symmetrically to the both side of the
peak which is the mean here. The curve de
scribing normal distribution is also called Bell
curve.
Skewness can be positive or negative.

The standard normal distribution has a skew


ness of zero, and therefore, it is said to be
symmetric.
-
Negative Skewness

If the distribution of a data set has a


skewness less than zero, the data is skewed
to the left
In case of negative skewness (red curve
here), the data piles up on the peak on the
right side and the tail points left.
A negatively skewed returns means fre
quent small gains and few large losses.
Positive Skewness -

1 min left in chapter 26%


Conversely, data that has a positive skew
ness is said to be skewed to the right.
In case of positive skewness (green curve
here), the data piles up on the peak on the
left side and the tail points right.
A positively skewed returns means fre
quent small losses and few large gains.
Skewness is extremely important to finance
and investing. It helps an investor to choose
investment options based on their growth and
risk appetite.
Most sets of data, including stock prices and
asset returns, have either positive or nega
tive skew, rather than following the balanced
normal distribution, which has a skewness of
zero.
So to optimize it maximum, an investor
should ch0ose mix of positively and negatively
skewed investments.
Every equity investors try to make invest
mentsin companies that have a positive skew.
Reliance, Maruti, Eicher are exxamples of posi
tively skewed companies whereas our stra
on Hydrapoint was negatively skewed.

Well asset prices follow a lognormal distri


bution, which is skewed to the right because
asset prices are non-negative. Hence they are

1 min left in chapter 26%


positively skewed! Most good stocks are posi
tively skewed.

What is returns when you invest in a stock?


Consider the yearly returns; the reason they
are big companies is most of the year they
end in positive and very few times they end in
negative.

Kurtosis
Kurtosis is sometimes confused with a mea
sure of the peakedness of a distribution. How
ever, kurtosis is a measure that describes the
shape of a distribution's tails in relation to its
overall shape. There are three categories of
kurtosis that can be displayed by a set of data.
A data set that shows kurtosis sometimes also
displays skewness, or a lack of symmetry.
However, kurtosis can be evenly distributed
so that both its tails are equal.

(+) Leptokurtic General


Forms of
(0) Mesokurtic Kurtosis
(Normal)

(-) Platykurtic -

1. Leptokurtic distribution Lepto


means skinny. Here kurtosis is less

1 min left in chapter 27%


than 3, it has extremely thick tails and
avery
thin and tall peak.
2. Mesokurtic distribution - Distribu

tions with zero excess kurtosis are


called mesokurtic. The standard nor
mal distribution has a kurtosis of3,
which indicates data that follow
Gaussian distribution haye neither fat
nor thin tails.
3. Platykurtic distribution - Platy means
broad. Here kurtosis is more than 3,
it has extremely thin tails and a very
broad and short peak.
Gaussian distribution is another term of nor
mal distribution.

Neither Stock prices nor stock price returns


follow a standard normal distribution. Stock
price returns consists of lots of extremely high
returns and extremely low returns. So while
normal distribution has very thin tail (i.e.
not many extreme values), stock price returns
have fat tail.
Stock price returns have had price action out
side of 3 SD. Still they're assumed to follow
normal distribution.

Tail Risk
In the realm of financial markets, the pursuit
of profit often goes hand in hand with the
1 min left in chapter 27%
acceptance of risk. However, not all risks are
created equal. One particularly elusive and
potentially devastating form of risk is known
as "tail risk."

The Foundation: Traditional Portfolio


Strategies and Normal Distribution
Traditionally, investors and financial models
have operated under the assumption that
market returns follow a normal distribution.
This conventional wisdom forms the basis of
various financial theories and models, includ
ing Harry Markowitz's modern portfolio the
ory and the Black-Scholes Merton option pric
ing model.
According tothis assumption, market returns
are distributed symmetrically around the
mean, forming a bell-shaped curve.

Under the normal distribution framework,


it is widely accepted that the probability of
returns moving between the mean and three
standard deviations, either positively or neg
atively, is approximately 99.97%. In simpler
terms, the likelihood of returns straying more
than three standard deviations fromn the mean
is a mere o.03%. This notion has been a fun
damental pillar in risk assessment and invest
ment decision-making.

2 mins left in chapter 28%


The Challenge: Stock Market Returns
and Excess Kurtosis
However, when we shift our focus to the world
of stock market returns, we encounter a signif
icant deviation from the idealized normal dis
tribution. Stock market returns tend toexhibit
excess kurtosis, which means that the tails of
the distribution are fatter than what the nor
mal distribution would suggest.
In essence, this implies that extreme events,
or tail events, occur more frequently than the
0.03% probability implied by the traditional
normal distribution.
Understanding Tail Risk
Tail risk, as the name suggests, refers to the
risk associated with events occurring in the
tails of the return distribution curve. These
events are rare but can have profound and
often negative consequences for investors.
Tail risk encompasses scenarios where mar
ket returns move beyond three standard devi
ations from the mean, which was traditionally
considered highly improbable.
One prime example of tail risk materializing
is during major fundamental events or geopo
litical upheavals, such as the Brexit referen
dum. Such eventscan trigger massive market
volatility and sharp price declines that extend

1 min left in chapter 28%


far beyond what conventional models would
anticipate. Investors who are unprepared for
these tail risk events can suffer significant
losses.
Mitigating Tail Risk: The Importance of
Hedging
Given the potential severity of tail risk events,
prudent investors often employ risk mitiga
tion strategies, and one of the most prominent
among these is hedging. Hedging involves tak
ing positions or employing financial instru
ments that offset potential losses in the event
of adverse price movements.
One common approach to hedging against tail
risk is to use options. Options provide the
holder with the right, but not the obligation, to
buy (call option) or sell (put option) a specific
asset at a predetermined price (strike price)
within a defined time frame. By holding op
tions, investors can protect themselves from
extreme price movements. For instance, dur
ing market downturn, holding put options
can limit losses by allowing the sale of assets
at a higher, predetermined price.
Tail Risk in Gap Downs and Gap Ups
Another facet of tail risk is associated with
gap downs and gap ups in the stock market.
Gap downs occur when the opening price of

1 min left in chapter 28%


a security is significantly lower than its pre
vious closing price, while gap ups are the
opposite, with the opening price substantially
higher. These gaps in price can be the result of
overnight news, earnings reports, or other un
foreseen events.
Investors holding positions in securities that
experience gap downsor gap ups can face sub
stantial losses or gains depending on the di
rection of the gap. To mitigate the impact of
these events, it is advisable to employ hedging
strategies, such as options or stop-loss orders,
which can limit losses in the case of gap downs
and lock in gains for gap ups.
BankNifty and Tail Risk
The BankNifty, a key benchmark index in the
Indian stock market, is not immune to the dy
namics of tail risk. In fact, given the inherent
volatility of financial stocks and the broader
economic factors influencing the banking sec
tor, tail risk can manifest in particularly sig
nificant ways for BankNifty investors.
Consider the scenario of a major financial cri
sis, where banking stocksplummet due to sys
temic issues. In such cases, tail risk events can
lead to substantial declines in the BankNifty
index, causing significant losses for investors.
Toprotect against such tail risk scenarios, in
vestors in the BankNifty may choose to im

1 min left in chapter 29%


plement hedging strategies, including the use
of options or diversification into less volatile
assets.

Taleb's Turkey Reference: Preparing


for the Unexpected
Nassim Nicholas Taleb, a prominent figure in
the world of risk management, introduced the
concept of the "turkey problem" to illustrate
the dangersof over-reliance on historical data
and the failure to anticipate rare but cata
strophic events. In Taleb's analogy, a turkey is
fed and cared for by a farmer for a thousand
days, leading the turkey to believe that it will
always be well-fed and safe. However, just be
fore Thanksgiving, the turkey's expectations
are shattered as it faces an unexpected and ir
reversible fate.
Time vs. happiness of a turkey from birth until Thanksgiving

Happiness

Surprise!

100 200 300 400 500 600 700 800 900 1000 Days

This parable serves as a stark reminder that


relying solely on historical data and conven
tional models may lead investors to underes

1 min left in chapter 29%


timate tail risk. Like the turkey, investors may
become complacent and fail to prepare for
rare but high-impact events that can have dev
astating consequences for their portfolios.

Conclusion
Tail risk is a phenomenon that underscores
the unpredictable and occasionally perilous
nature of financial markets. While it may be
rare, the impact of tail risk events can be se
vere,making it a critical consideration for in
vestorS

Log Normal Distribution


"Well asset prices follow a lognormal distri
bution, which is skewed to the right because
asset prices are non-negative. Hence they are
positively skewed! Most good stocks are posi
«
tively skewed.

Let's revise abit with Positive Skewness


Conversely, data that has a positive skew
ness is said to be skewed to the right.
In the case of positive skewness (green
curve here), the data piles up on the peak
on the left side and the tail points right.
Positively skewed returns mean frequent
small losses and few large gains.

1 min left in chapter 29%


In probability theory,a log-normal (or lognor
mal) distribution is a continuous probability
distribution of a random variable whose loga
rithm is normally distributed. Thus, if the ran
dom variable X is log-normally distributed,
then Y = Log (X) has a normal distribution.
The log-normal distribution is often consid
ered a better choice than the normal (Gauss
ian) distribution in the context of stock mar
ket returns for several reasons:
re
1. Positive Returns: Stock market
turns are inherently positive or zero
(stocks cannot have negative prices),
which is not the case for the normal
distribution, which extends from neg
ative infinity to positive infinity. The
log-normal distribution is defined for
positive values, making it a more ap
propriate choice for modeling returns
on stocks and other financial assets.
2. Multiplicative Nature of Re
turns: Stock returns are often mul
tiplicative rather than additive. This
means that investors care more about
the percentage change in asset prices
(i.e., relative returns) rather than the
absolute change. The log-normal dis
tribution naturally models multiplica
tive returns because the logarithm of

1 min left in chapter 30%


multiplicative return becomes an
additive return.
3. Skewness and Kurtosis: Empiri
cal evidence shows that stock market
returns exhibit skewness (asymmetric
distribution) and kurtosis (fat tails)
more frequently than what a normal
distribution would suggest. The log
normal distribution can capture some
of thisskewness, making it more suit
able for modeling the observed char
acteristics of stock returns.
4. Volatility Clustering: Stock mar
ket volatility tends to cluster, mean
ing that periods of high volatility
are often followed by more high
volatility and vice versa. The nor
mal distribution assumes constant
volatility, which does not reflect this
real-world phenomenon. Models like
the GARCH (Generalized Autoregres
sive Conditional Heteroskedasticity)
model are often used to account
for time-varying volatility in financial
data, but these models work well in
conjunction with the log-normal dis
tribution.
5. Empirical mar
Fit: Historical stock
ket data often exhibits a better fit with
the log-normal distribution when
compared to the normal distribution.
1 min left in chapter 30%
Whileneitherdistribution is a perfect
fit,the log-normal distribution tends
to provide a closer approximation to
actual stock returns.
6. Option Pricing: In option pricing
models like the Black-Scholes-Mer
model, the log-normal distribu
tion is assumed for the underlying as
set's price. This assumption has been
widely accepted in options trading
and derivatives markets.
7. Portfolio Theory: The log-normal
distribution is also commonly used in
portfolio theory, where investors need
to estimate the distribution of returns
for different assets and portfolios. It
simplifies calculations involving ex
pected returns and risk assessments.
A random variable that is log-normally dis
tributed takes only positive real values as Log
(X)cannot return a negative value. The distri
bution isoccasionally referred to as the Galton
distribution.

1 min left in chapter 30%


Log Normal Distribution
Nomal Distribution

Stock market returnsare defined by Log (T/P)


and hence followa log-normal distribution.
It's important to note that the log-normal
distribution is still a simplification, and real
world financial data can exhibit complex be
havior that may not be perfectly captured by
any single probability distribution.

Additionally, the log-normal distribution as


sumes constant volatility, which is an over
simplification of market dynamics. More ad
vanced models, such as those incorporating
stochastic volatility, are often used for a more
accurate representation of financial markets.
Insummary, while neither the normal nor the
log-normal distribution perfectly captures all
aspects of stock market returns, the log-nor
mal distribution is considered a better choice
in many cases due to its ability to account
for the positive nature, multiplicative re
turns, and some characteristics of stock mar
ket data. However, sophisticated nodels and

1 min left in chapter 31%


techniques are often needed to address the
nuances and complexities of financial markets
accurately.

1 min left in chapter 31%


Stock Market and
Probability Distributions
Stock markets do not follow a simple proba
bility distribution like the normal distribution
(also known as the Gaussian distribution) that
is often assumed in classical statistics., In
stead, the price movements of stocks and fi
nancial markets are characterized by a more
complex and dynamic distribution.
The probability distribution followed by stock
markets is typically better described by a fat
tailed distribution. This means that extreme
events, such as large price swings or mar
ket crashes, occur more frequently than what
would be expected in a normal distribution.
This characteristic is often referred to as "lep
tokurtosis" or "kurtosis," indicating that the
tails of the distribution are fatter or have
higher peaks than a normal distribution.

Common fat-tailed distributions


When it comes to modeling stock market re
turns, various probability distributions can be
considered, depending on the specific char
acteristics of the data and the assumptions
made. Common fat-tailed distributions used
to model financial markets include:

1 min left in chapter 31%


Normal Distribution:
Characteristics: The normal distri
bution, often referred to as the Gaussian
distribution, assumes a symmetric, bell
shaped curve with no heavy tails. It im
plies that extreme events are rare.
Applicability: While stock market re
turns do not strictly follow a normal dis
tribution due to their tendency to exhibit
fat tails (more extreme events), the normal
distribution is often used as an apprOX
imation for daily or monthly returns in
certain situations. It is particularly useful
when returns are approximately normally
distributed over a short period or when
modeling changes in returns (returns on
returns).

Student's t-Distribution:
Characteristics: The t-distribution is
similar to the normal distribution but al
lows for heavier tails, making it suitable
for capturing occasional extreme events.
Applicability: The t-distribution is use
ful when dealing with smaller sample sizes
or when estimating parameters such as
the mean or variance of stock returns. It
provides a more realisticrepresentation of
stock market returns than the normal dis

1 min left in chapter 31%


tribution, especially in cases with limited
data.
Cauchy Distribution:

Characteristics: The Cauchy distribu


tion has extremely heavy tails, meaning it
allows for frequent and extreme fluctua
tions.
Applicability: The Cauchy distribution
may be used when modeling extreme price
movements or "black swan" events in the
stock market. However, it is rarely used in
practice because it assumes even heavier
tails than typically observed.
Log-Normal Distribution:
Characteristics: The log-normal distri
bution is not characterized by heavy tails
but by asymmetry, as it models the distri
bution of the logarithms of returns. It im
plies that returns are multiplicative rather
than additive.
Applicability: Thelog-normal distribu
tion is often used to model the prices of in
dividual stocks and other financial assets.
It accounts for compounding returns over
time, making it suitable for asset pricing
and portfolio theory.
GARCH Models:

1 min left in chapter 32%


Characteristics: GARCH (Generalized
Autoregressive Conditional Heteroskedas
ticity) models do not specify a spe
cificprobability distribution. Instead, they
model the volatility of stock returns over
time, capturing the clustering of volatility
and changes in volatility.
Applicability: GARCH models are par
ticularly useful for modeling the time
varying volatility in financial markets.
They provide a framework to deseribe the
changing risk environment in stock mar
kets.

Inpractice, stock market returns often exhibit


a mixture of these characteristics.

While the normal distribution is commonly


used for simplicity, models that incorporate
heavier-tailed distributions like the t-distribu
tion or GARCH models areoften better at cap
turing the observed behavior of stock market
returns, especially during periods of market
turmoil when extreme events become more
frequent.

1 min left in chapter 32%


The Entropy Trade Setup
In the Entropy trading setup, traders typically
rely on four key indicators, with specific set
tings tailored to optimize their strategy. These
indicators include Bollinger Bands, Volume
Histogram, Stochastic (Stoch), and Money
Flow (MFlow). While the default settings are
maintained for most indicators, customiza
tion is crucial, particularly in the Bollinger
Bands setup, to enhance trading effectiveness.

Entropy Trading Setup:


The Four Indicators
1. Bollinger Bands: Bollinger Bands
play a central role in the Entropy
strategy. However, the configuration
of the Bollinger Bands differs from
the default settings to better align
with the trading objectives.

2. Volume Histogram: Volume His


togram provides insights into trading
volume dynamics. Default settings
typically retained for this indicator.

3. Stochastic (Stoch): The Stochas


tic oscillator helps identify potent
overbought and oversold conditions.

1 min left inchapter 32%


Default settings are used for this indi
cator.

4. Money Flow (MFlow): Money


Flow assesses the flow of money into
or out of a security. Default settings
are maintained for Money Flow.

Customized Bollinger
Bands Setup:
The customization of the Bollinger Bands
setup is pivotal in the Entropy strategy. The
Bollinger Bands parameters are adjusted to
better suit the strategy's objectives and market
conditions. Customization may include modi
fying parameters such as the number of stan
dard deviations, moving average type, and
channel fill settings. These adjustments aim to
optimize the use of Bollinger Bands for trend
identification and trade execution.
The settings that will be used for Bollinger
Bands indicator is
Field - Close
Period -20
Standard Deviations - 2
Moving Average Type - Exponential
Channel Fill - Yes

1 min left in chapter 33%


The settings that will be used for the Stochas
tic indicator are
Type - Smooth
• Period - 14
The settings that will be used for the Money
Flow indicator are
Period - 14
3m v v Studiesv
O
Search symbol Views Display Layout

TITAN17MAYFUT CURRENT STUDIES


491.21
500.0096)
490.50 0.15( x 400 50
Volume 480 o0

Studies
Stoch (14) x 48859

M Flow (14)
<x
487.50

Bollinger Bands (20,2,em.. X

CLEAR ALL -485.00

Mass Index
+48250
Median Price
VOLUME 150k
Momentum Indicator - 100.0k
-
50 0k
Money Flow Index

STOCHIL4L4 Moving Average

Moving Average Deviation

Moving Average Envelope


MFOt4 56 20
Negative Volume lndex -20

13:30 14:00 14:30 15:00 5/4 10:00 On Balance Volume 12-00

Modifying Entropy Trade Setup


with Bollinger Bands %
The Entropy trading strategy was originally
developed by Amit Ghosh during discussions
about Bollinger Bands in the Unofficed forum.
Over time, the strategy has undergone refine
ment and adaptation with the aim of enhanc
ing profitability and precision.

1 min left in chapter 33%


TheNew Entropy
Setup
One of the significant changes in the strat
egy involves the replacement of the Stochastic
(Stoch) and Money Flow (Mflow) indicators
with BB %B, also known as Bollinger Bands
Percentage B.
Amit Ghosh published on TradingVew.com, Sep 11, 2023 19:14 UTC+5:30

JINDAL STEEL & PWR, 15, NSE O


BB (20, close, 1, 0) 712.03 714.63 709.42

718.00
SAR(0.02, 0.02, 0.2) 715.75
Vol 167.262K
716.00

714.00

712.75
712.00

710.00

708.00

706.00

704.00

702.00

700.00

698.00

696.00

BB SB (20, close, 2) 0.57

1.0

0.50

11:00 12:00 13:00 14:00 11 11:00 12:00 13-00 14-00

17 TradingView

BB %B Indicator: The
Key Component
BB %B is a crucial component of the Entropy
trading strategy. It's a technical indicator
that measures a security's position relative to
the Bollinger Bands. Specifically, it quantifies

1 min left in chapter 34%


where the last price is in relation to the upper
and lower Bollinger Bands.
You can copy the setup using the "Make it
Mine" feature of Tradingview.

How BB %B Works:
BB %B is calculated as follows: BB %B =
(Last Price - Lower Band)/ (Upper Band
Lower Band)
BB %B provides a value between0 and 1.
When BB %B is close to 0, it indicates that
the last price is near the lower Bollinger
Band, suggesting potential oversold condi
tions. Conversely, when BB %B is close to
1, it signifies that the last price is near the
upper Bollinger Band, implying potential
overbought conditions.

Utilizing BB %B in the
Entropy Strategy:
The replacement of Stochastic and Money
Flow indicators with BB %B in the Entropy
strategy introduces several advantages:
• Simplicity: BB %B simplifies the analysis
by providing a clear and straightforward
measure of a security's position relative to
its Bollinger Bands. In contrast, Stochastic

1 min left in chapter 34%


and Money Flow indicators often involve
more complex calculations and interpreta
tions.
Focused on Bollinger Bands:
BB %B directly leverages the information
provided by Bollinger Bands, aligning it
closely with this well-established technical
indicator. Stochastic and Money Flow in
dicators may not have the same direct con
nection to Bollinger Bands, making them
less integrated into the trading strategy.
Clarity
in Overbought and Oversold
Conditions: BB %B's value ranges be
tween o and 1, offering a clear indication
of whether a security is trading near its
upper or lower Bolinger Bands. A value
close to0 suggests potential oversold con
ditions,while a value near 1 implies poten
tial overbought conditions. Stochastic and
Money Flow indicators might not provide
as straightforward signals regarding over
bought and oversold levels.
Versatility: BB %B can be effectively
used across various time frames and mar
kets, malking it a versatile tool for traders.
Stochastic and Money Flow indicators may
have limitations or varying effectiveness in
different trading scenarios.
Alignment with Bollinger Bands:
Since Bollinger Bands are widely recog
nized and utilized by traders, BB %B's in

1 min left in chapter 34%


tegration with this indicator enhances the
strategy's credibility and relevance. Sto
chastic and Money Flow indicators may
not have the same degree of alignment
with popular technical analysis tools.
Consistency in Strategy: By replac
ing Stochastic and Money Flow indicators
with BB %B, the strategy achieves greater
consistency as it focuses on a single, well
defined indicator that directly relates to
Bollinger Bands. This simplification can
lead to more straightforward and consis
tent trading decisions.
Optimization for Current Market
Dynamics: The decision to replace indi
cators reflects a commitment to optimiz
ing the strategy for current market con
ditions and insights. As markets evolve,
strategies must adapt, and BB %B's inclu
on demonstrates this adaptability.

In summary, BB 6B is favored over Stochastic


and Money Flow indicators due to its sim
plicity, alignment with Bollinger Bands, clar
ity in identifying overbought and oversold
conditions, versatility, and overall consistency
within the trading strategy.
Theevolution of the Entropy trading strategy
demonstrates the dynamic nature of trading.
Traders and developers continuously refine
and adapt their strategies to changing market
1 min left in chapter 35%
conditions and new insights. The decision to
replace Stochastic and Money Flow indicators
with BB %B reflects the strategy's commit
ment to optimizing performance and staying
aligned with current market dynamics.

BRS Bollinger Bands


Trading Strategy
-
Revisiting Bollinger Bands
Bollinger Bands consist of three lines: a
middle line representing the simple mov
ing average (SMA) of the price, and upper
and lower bands that are typically set at
two standard deviations from the SMA.
These bands help identify potential sup
port and resistance levels, as well as mar
ket volatility.
Bollinger Bands are a popular technical anal
ysis tool, but it's essential to use them wisely.
Here's how to employ the Bollinger Bands in
dicator effectively and choose the right trading
strategy:

The First Step is to Avoid Common Mis


conceptions:
Bollinger Bands should not be viewed
as strict sell or buy signals when the price

1 min left in chapter 35%


touches the upper or lower band, respec
tively.
Prices often "walk the band," which means
they can ride along the band's edge with
out a clear trend reversal.
Types of Bollinger Bands Strategies:
1. Mean Reversion Strategies:
These strategies focus on oscillations
around a baseline, such as the median
Bollinger Band.
When the price touches the upper
band, it doesn't necessarily mean it's
time to sell, and vice versafor the lower
band.
Mean reversion strategies aim tO cap
italize on price reverting to its baseline
after deviating.
2. Breakout Strategies:
Breakout strategies look for significant
price movements breaking out of the
Bollinger Bands.
Riding a Bollinger Band breakout is an
example of a breakout strategy.
Breakout and mean reversion strate
gies can complement each other, but
their effectiveness depends on the time
frame.
Using Bollinger Bands to Identify
Trends:

1 min left in chapter 35%


Bollinger Bands can also help identify trends
in the market. In most markets, prices
tend to consolidate (range) about 80%
of the time, and trends are relatively rare.
You can define a trend as a deviation from the
norm (range).
Constructing a Bollinger Bands Indica
tor for Trend Identification:
Let's make the construction of an indica
tor close to Super trend with the help of
Bollinger Bands. To identify trends, you can
add another Bollinger Band on top of the one
you already have.

Set the new Bollinger Band with the following


parameters:
Field: Close
Period: 20
Standard Deviations: 1
Moving Average Type: Exponential
Channel Fill: No (To avoid confusion and
messiness, we make Channel Fill as No
to previously plotted Bollinger Bands)
By combining these insights with your trading
strategy, you can use Bollinger Bands effec
tively to identify trends and make informed
trading decisions.
So Breakout and Mean Reversion Com
plement each other. However, it is time

1 min left in chapter 36%


frame-specific. What is a breakout in a
1-minute time frame can fall into Mean
Reversion in a higher time frame
Let's open the Bank India May Futures in our
trade setup. Also, color 1 SD Bollinger yellow
to spot them better.
You can enhance clarity by coloring the 1
SD Bollinger Bands as yellow. Additionally,
to achieve a more effective exit strategy, it's
advisable to use the Simple Moving Average
(SMA) as the Moving Average Type for the
1
SD Bollinger. Your 15-minute time frame
chart should then appear as follows:
v
O Search symbol 15m v Views Display v Studiesv Layout

BANKINDIA17MAYFUT 195.12
179.10 0.90 (-0.5096)

+ Compare.. 191.05
F190.00
Studies

185.79

184 00

18052

179 10o

172 88

VOLUME
f5.00m
250m

STOCH (14) t80

MFLOW (14) 80

20.18

10-00 12-00 14:00 5/4 12:00 14:00 S/5 12-00 1400 5/8

Here is our Bollinger Bands Trading Strategy


#1

BRSStrategy
The strategy is called BRS (Bollinger Riding

1 min left in chapter 37%


Strategy). To spot an uptrend and a potential
buy signal:
Look for a green candle whose close is
1.

outside the 1 SD Bollinger Band.


2. The next candle should open and
close above the upper band of the 1 SD
Bollinger Band.
3. Enter trade at the "close" of the sec
ond green candle upon the formation
of the third candle.
4. Close the trade when the candle

touches the median of the 1 SD


Bollinger Band.

This is similar to the Famous Three Crow


Strategy of Price Action.
The Entropy BRS Strategy was developed by
Amit Ghosh in early 2018 while discussing
Bollinger Bands and Probability Distribution
in the Unofficed Trading Forum.

Gail Futures Trade Using


Bollinger Bands
Just have a look with your common sense yOu
can tell Gail is high beta and hence we can
not find any much trading opportunity amidst
the noise of lower timeframes

1 min left in chapter 37%


Q suntv may 15m v
Views y Display v Studiesv Layout

GAIL17MAYFUT 43250
420,25 4025(0.0606)
430.00
Compare...

Studies 43603

424 63

420
41804
t417.50

415.12
VOLUME 1000k

SFOCH(4) 80

MAOW(t4)

12:00 5/ 12-00 5R 12-00 5/4 12-00 5/5 12-00 5/8

v
O suntv may 1H Y Views Displayv Studies Layout v
+
GAIL17MAYFUT 421 2
428.70
419.55 0.45 (-0.1195)

Combäre.." 419.55
415,65
Studies
-410.00

F400.00

390.00

f380.00

2.50m
VO UME

STOCH (14)

MALOWK14)

4/11 4/13 A/18 4/20 ADA aD6 4/28 5/0

VT
Share 1D 5D 1M 3M 6M 1Y 5Y All

In case you are confused with the sell signal


part -
To spot downtrend and trading oppor
tunity for a sell signal,
One red candle has its close outside 1 SD
Bollinger.
The next candle closes and opens below
lower bands of 1 SD Bollinger.
You enter at the “close of the second red
candle on the time of formation of the 3rd
candle.

1 min left in chapter 37%


• You close when the candle touches the me
dian of 1 SD Bollinger.
Here is another tricky condition to min
imize loss (and well maximize profit):
So far you have entered in the 3rd can
dle. If the candle ended as green after your
entry. (You have entered the trade in the
middle of 3rd candle formation right?)
Here is what you do stay on the 4th
candle - Immediately put 2 buy orders at
the "high" of the last candle.Because it will
not only exit you from the sell order; it will
also open a buy position.
The art of balancing risk and reward in this
intricate situation constitutes a strategy of its
own, which I've aptly named the 3BB strat
egy. It derives its moniker from the distinctive
"green-green-red" or "red-red-green" pattern
formation.

1 min left in chapter 37%


SunTV Futures Trade
Using Bollinger Bands
Q suntv may 15m v Views v Displayv Studies v
Layout +
SUNTV17MAYFUT oPEN: 873.05 HIGH: 873.85 VOL: 398 K

CLOSE:871.80 LOW: 867.00 DATE: 05-05 10:30


858.90 2.75(0.329%)
+
900.00

Compare..
890.00
Studies

880.00

F870.00

858

VOLUME -250k

SFOEH{14)

MFOWiI4
38.07

11:00 12:00 13:00 14:00 5/5 10:00 11:00 12:00 13:00 1400

Candle 1 is red.
Candle 2 is red.
Candle 3 is green but we have entered into
sell order on Candle 2's close i.e. 883.95
Candle4 - Now our candle 3 is green. We
are waiting to fire two buy orders on Can
dle g's high i.e 885 expecting a gBB trading
opportunity. But well, it didn't come.
Hence, it adhered to the established Bollinger
Band Ride (BBR) trade setup. The sell order
remains active, currently holding an unreal
ized profit.
It's worth noting that while Ihave previously
utilized Sun TV May Futures on a 1-hour time
frame, the latest chart is based on a 15-minute
timeframe. To avoid any confusion, you can

1 min left inchapter 38%


refer to the discussion regarding the Titan
May Futures exanmple.
When you enter a trade with the standard
BBR setup, your exit point is determined
by the median Bollinger crossover. This ap
proach inherently limits potential losses, as
the absence of a median Bollinger crossover in
a BBR trade typically signifies the potential for
substantial profits.
In contrast, entering a trade with the 3BB
setup involves placing the initial stop loss at
the high (for buy scenarios) or low (for sell
scenarios)of the third candle.
Given the higher likelihood of a 3BB setup
crossing the median Bollinger with confi
dence, the stop loss is not adjusted until this
crossover occurs. Subsequently, a trailing stop
loss is implemented based on price action,
specifically the high (for buy scenarios) or low
(for sell scenarios) of the previous candle.

1 min left in chapter 38%


3BB Bollinger Band
Trading Strategy
Here is another tricky condition to minimize
loss (and maximize profit):
1. After entering the trade in the mid
dle of the 3rd candle formation (as
discussed earlier), you should closely
monitor the candle's color.
2. If the 3rd candle ends as a red can
dle, indicating a potential reversal or
downward movement, take the fol
lowing action:
3. Stay in the trade and immediately
place twO sell orders at the "low" of
the last (3rd) candle. This action ac
complishes two objectives:
It exits youfrom the initial buy order.
It opens a new sell position, align
ing with the 3BB (3 Bollinger Bands)
strategy previously discussed with live
trades.
The 3BB strategy carries a high probability of
breaking the median Bollinger Band with a
98.5% confidence level.
To enhance the likelihood of a 3BB scenario,
look for specific conditions in the 2nd candle:

1 min left in chapter 38%


The 2nd candle should close above the
upper band of the 2SD (2 Standard Devia
tions) Bollinger Band, indicating potential
upward momentum.
To further confirm the 3BB case, pre
fer the closure of the 2nd candle with
the following criteria: The opening and
close of the green candle should fall
within both the 1 SD Bollinger Band
and the 2 SD Bollinger Band.
When the second candle concludes its session
above the upper band of the 2SD Bollinger,
it signals a robust potential for a gBB sce
nario. Therefore, my preference is for the sec
ond candle to conclude its session within the
upper boundaries of both the 1 SD Bollinger
and 2 SD Bollinger.
By 'closure,'I mean that both the opening and
closing prices of the green candle fall within
the range defined by the 1 SD and 2 SD
Bollinger bands.
By following this strategy, you aim to mini
mize losses by responding to potential rever
sal signals and maximize profits by taking ad
vantage of the 3BB strategy's high-confidence
breakout opportunities.

1 min left in chapter 39%


Analyzing Bank of India
with Bollinger Bands
Trading Strategy
BRS Strategy in Bank of India

Here are the first two trades in the given scrip


using Bollinger Bands Trading Strategy -
O Search symbol 15m v Views Displayv Studies Layout

BANKINDIA17MAYFUT 10512
179.10 0.90 (-0.509%)

T Compare.. 191.05
190.00
Studies

185.79

180.52
179.10

VOLUME
5.00m

2.50m

STOCH (14) -
8C

MFLOW(14)

10:00 12:00 14:00 12:00 14:00 5/ 12:00 14-00 5/8

Bought at 182.10; Sold at 185.30. Profit of


3.2points
Bought at 188; Sold at 187.5. Loss of .5
points
Bank India is already a high beta script but
still taking a 15-minute time frame creates so
much noise.
So the higher the time frame for this strategy;
the better.
We already know this Strategy - Bollinger
Ride Strategy (1SD - MA, 2SD - EMA)
1 min left in chapter 39%
Q Search symbol
v

15m Views Displayv Studies Layout v

BANKINDIA17MAYFUT 10512

179.10 0.90 (-0.509%)

+ Compare.. 191.05
F190.00
Studies

185.79
1R400

180.52
179 1o

172 88

VOLUME
5.00m
-2.50m

HOCH{14) 80

O14) - g0

12:00 5 12:00 12:00 1200

Q. OnoO5/03 at 14:25there is a huge red


candle, Why didn't we close our first
trade there?
A.In the provided chart, the red candle failed
to reach the median of the 1 SD Bollinger
Band, although it did touch the median of the
2 SD Bollinger Band (as illustrated above). It's
worth noting that EMA can exhibit erratic be
havior during volatile spikes due to its higher
sensitivity to recently formed candlesticks.
Consequently, I place my trust in SMA as my
preferred exit strategy, opting for it over EMA.
Conversely, one can devise a complementary
approach for identifying downtrends and gen
erating sellsignals.
However, if you do not consider the
case of 3BB there are two trades -

1 min left in chapter 40%


O Search symbol 15m v Views v Display v Studiesv Layout

BANKINDIA17MAYFUT
179.10 0.90 (-0.5096)

+ Compare. 101.0s
F190.00
Studies

185 7g

18400

180.52

179.10

VOLUME
-5.00m

2.50m

STOCHH4 80

MELO4) 80

14:00 5/4 12:00 14.00 12:00 14:00

Bought at 194.20 Sold Exit Complete at


190.1. Loss of 3.1 points
Sold at 188.05

As you see the first trade went to loss.

The following sell trade is as of now open.


This strategy is extremely dangerous (so is all
breakout strategies) in lower time frames as
mean reversion happens most of the time. So
you need to be highly alert if you choose a
lower time frame to day trade.
3BB Strategy in Bank of India

Additionally, it's important to observe that


the 3rd candle, the point at which we en
tered the trade, is a red candle, aligning with
the parameters of the 3 BB strategy setup. By
complementing this approach with the price
action method for implementing stop losses,
as demonstrated in the live example of Titan
May Futures,

1 min left in chapter 40%


-
Then here is your trade
In this instance, our selling price was 194, and
we closed the position at 179.20. It's worth
noting that in our day trader setup, we adhere
to aclosing time of 15:29.
Q Search symbol 15m v Views Display v Studiesv Layout

BANKINDIA17MAYFUT 105 12

179.10 0.90 (-0.509%)

101 05
+ Compare... F190.00

Stuqies

185.7g

18400

180.52
179.1o

172 8g

VOLUME
5.00m
2.50m

STOCH (14)

MFLOft4

5/4 10:00 11:00 12:00 13:00 14:00 5/5 10:00 11:00 12:00 13:00 14:00

Share 1D 5D 1M 3M 6M YTD 1Y 5Y All

Here is one more setup with SunTVMay Fu


tures. Here you can see why I call the name
3BBinstead of 4BB and 5BB. Also, you can
see the reason why we are not exiting
based on price action unless the trade
setup led us to a 3BB opportunity.

1 min left in chapter 40%


Q suntv may 1H Views Displayv Studies v Layout +
SUNTV17MAYFUT
858.50 4 2.35 ( 0.279%)
f925.00

t Compare.
RO6 o1
Studies
881.89

f825.00

+800.00

VOLLUMF 2.00m
1000k

STOCH (14)

MPOW(T47

A18 4/19 4/20 4/2 4/24 AD6 AD7 5/2 5B 5/4 5/5

Share ZM 6M 1Y 5Y A

Failed 3BB Retracement


Strategy
You might recall our discussion about the
Bollinger Ride Strategy and its occasional fail
re, known as the gBB setup. It's important
to acknowledge that even the gBB strategy
can have its moments of disappointment. In
fact, it happens quite frequently. Let's exam
ine some illustrative examples:
Search symbol
Q
1Om Views Display Studies v Layout +

BANKNIFTY17MAYFUT
22812.10 + 0.85 0.009t
(

+ Compare
Studie

MFLOW(14)

STOCH(14)

13:00 14:00 15-00 5/11 10-00 11:00 12-00 13:00 14:00 15:0 S/12

Share 1D IM 3M 6M YTD 1Y 5Y

This is BankNifty's case.

1 min left inchapter 40%


O Search 5ymbol 1mv Views v Displayv Studiesv

BANKÍNDIA17MAYFUT 180.00
,128 254035 2096) 170 B0

t Compar
179.50

179.1

17841
17825

17800

VOLUME
200%

100.0

STOCH (14)

This is the Bank India case that we were


talking about.
O Search symbol 1Om y
Views Displayv Studies y Layout

HINDUNILVR17MAYFUT 999.09

996.00 2.85 ( -0.296)

t Compare.
988.57
Studies

980.00

- 970.00

960.00

VOLUME
500%

STOCH(14)

12:00 13:00 14:00 5/10 10:00 11:00 12:00 13:00 14:00 5/11

Share 1M 3M 6M YTD 1Y 5Y All

This is Hindustan Unilever Futures


which was shorted today.

1 min left in chapter 41%


Q Search symbol 15m v
Views v Display v Studies Layout

BHARATFORG17MAYFUT
1129.00 44 0.20 (0.0296) 1135.00

1133.60
+ Compare
1132.36
Studjes

1120 00

1127.50

1125.14

1122.50

F1120.0O

1117.50

1115.00

VOLUME
F100.0k

/10 10-00 11-00 12-00 13-00 1400 G/11

This is the case of Bharat Forge May Fu


tures. These are all examples of where 3BB
went invalid and we got the double loss. So
to
how trade this?

Reference:
1. Bollinger Bands Trading Strategy
BRS, 3BB
2. Examples of Bollinger Bands Trading
Strategy
As we delve into historical backtested results
and factor in volume profiles and Fibonacci
analysis, it becomes evident that there's a po
tential trade opportunity in this scenario. In
terestingly, the Bollinger Ride Strategy (BRS)
boasts a higher Probability of Profit (POP)
compared to the 3BB strategy. Surprisingly,
even the 3BB failed strategy exhibits a higher
POP than the standard 3BB strategy.

1 min left in chapter 41%


When we turn our attention to the volume
profile, we observe that this particular area
has witnessed significant trading activity. The
last three candles have been engaged in a tug
of-war, with conflicting movements. This tus
sle indicates that there may be an intriguing
trade setup to explore in this context.
Whenever the 3BB strategy fails, it tends to
give rise to a breakout spike. In the case of
Bank of India, this breakout manifested it
self as a downward movement. Traders who
had initially taken long positions in the stock
began to close their positions due to mount
ing apprehension. However, let's not delve too
deeply into the specifics of this particular case
for noW.
Q Search symbol 1mv Views v Display v Studies v Layout v

BANKINDIA17MAYFUT
180.00
128 25
+
0.35 (-0.205)

Campa
179.50
Studies

1784
17825

178.00

VOLUME
200

100.0

STOCH(14)

The trade here in the case of Bank of India is


that you can long it from the lower level and if
youdraw a line from the 3BB formation; the
scrip is bound to touch there from the down
side.
1 min left in chapter 41%
So for the Bank India case, we get a failed 3BB
breakout at point A. Now tricky point is to
find the B point. There are many theories you
can use to find point B. Many people like
the approach of Fibonacci; many peo
ple like the approach of Volume Profile.
Ilike toexplain using Volume Profile analysis.
It didn't manage to break that Volume Profile
barrier here which is confirmed by the huge
green candle of point B. So we entered long in
the next candle of this. (i.e. after confirmation
that it is unable to break the Volume Profile
barrier)
I prefer to elucidate this with a Volume Pro
file analysis. At this juncture, the price failed
to breach the Volume Profile barrier, as af
firmed by the substantial green candle at point
B. Consequently, we entered a long position

in the subsequent candle. This decision was


made only after receiving confirmation that
the price was unable to penetrate the Volume
Profile barrier.

It's worth noting that failed 3BB cases often


result in a higher STOCH value, indicating
an impending overvaluation. However, in the
case of Bank of India, the STOCH reading
showed that it was oversold.
By Volume Profile barrier, I meant the large
spike of volume profile which you can see

1 min left in chapter 41%


here. It means people have entered that posi
tion and hence it will create temporary sup
port or resistance.

Volume Profile Barrier


As the reversal happens,where is the
next volume profile barrier? The line
where failed 3BB happened. It creates a huge
barrier! Now, two cases can happen -
1.Either it will break that barrier.
2. Or, it won't! And it will reverse from
there.
But we don't bother in those cases. We just are
happy about the fact that it willreach that line
and we exit it safely.
In summary, I am using the Bank of India
-
trade as an illustrative example to explain
1. We initiated a short position using the
Bollinger Ride Strategy (BRS) on the
A.
candle just before Candle
2. Subsequently, we opened a long po
sition using the 3 Bollinger Bands
(3BB) strategy on the candle immedi
ately following Candle A.
3. Since we were employing the 3BB
strategy, we closed our position when
the low of the second candle after
Candle A was lower than the low of

1 min left inchapter 42%


the candle following Candle A, where
we had entered using the 3BB strat
egy. (Please note
that the 3BB strat
egy uses price action to determine exit
points.)
4. We entered a long position again on
the candle following Candle B and ex
ited when the price reached the high
of Candle A.

Bollinger Bands Trading


Strategy– F3BB
Let's name this strategy as F-3BB. Let's intro
duce weights now.
The Probability of Profit (POP) or F3BB
surpasses that of 3BB, which, in turn, ex
ceeds the POP of BRS. Consider this scenario:
if we initially entered with 1 lot in BRS and
it eventually triggered the 3BB condition, why
not increase our exposure to 2 lots? Similarly,
if the 3BB trade results in a stop loss, why not
escalate to 3 lots?
This approach bears similarities to the con
cept of martingale, which involves 'doubling
exposure' on losing trades. It's important to
understand that Martingale doesn't enhance
the odds of winning; your long-term expected
return remains the same and depends on your

1 min left in chapter 42%


ability to select winning trades and the right
market conditions.
What this strategy achieves is the postpone
ment of losses. Under specific conditions,
losses can be deferred to the extent that they
appear almost certain. We'll delve into this as
pect later.
Q Search symbol 1mv Views
v

Display Studiesv Layout v

BANKINDIA17MAYFUT 180 00

Comdar 179 62
129 50
StudieS

178.9g

17855

7800

F177.50

11211

VOLUME
200k
100.Ok

STOCH (14)

1000 10-05 10:10 10:15 10-20 10-25 1030 1035 10-40

In our case, we increase the position size as


probability of profit rises. This feature
makes it valuable, especially when combined
with a stringent stop loss mechanism, in this
instance, the low of candle B.
Having entered a long position in Bank of
India Futures with 3 lots, our focus now shifts
to crafting an exit strategy aimed at maximiz
ing profit, beyond merely exiting on the failed
3BB condition.

1 min left in chapter 42%


This weightage is not a necessity. It is an arbi
trary greedy idea to maximize profit. Conser
vative investorscan always opt out.

From the above image, yOu can see


where I have plotted the appropriate
-
take profit lines
The first exit is as per the rule of
1.

F-3BB.
2. The second exit is the median
Bollinger.
3. The third exit is the upper band.
1st entry's SL is at the entry candle's low. ( but
choose SL at candle's high in reverse
case) 2nd entry's SL is at the first exit. 3rd
entry's SLis at the third exit. This is the simple
trailing loss setup for the martingale case of
F-3BB.

1 min left in chapter 43%


Alpha Bollinger Band
Trading Strategy
The Entropy Alpha Strategy is an exclu
sive trading approach based on the princi
ples of the Entropy System, which revolves
around probability distribution theories, with
Bollinger Bands serving as its primary tool.
Although We are not going into deep
into the strategies' definitive principles
let's discuss the basic core of the strat
egy to show how new strategies can be
modeled with the principles of the En
tropy System.
The 3BB (3 Bollinger Bands) strategy isa trad
ing approach that combines Bollinger Bands
with specific candlestick patterns to mini
mize losses and capitalize on high-confidence
breakout opportunities, particularly when the
3rd candle in a formation indicates a potential
reversal or downward mnovement.
In the chart example featuring Grasim, you
can observe two successful 3BB trades that
unfolded seamlessly.

1 min left in chapter 43%


Amit_Ghosh published on TradingView. com, Sep 12, 2023 00:19 UTC+5:30

GRASIM INDUSTRIES, 15, NSE O


B8 (20, close, 1, 0) 1859.04 1862.63 1855.45
RB 20, cose, 2, 0)
+
3B8 42
3RR #1
Vol 71.534K
1866.00

1864.00

1860,90
1860,00

1854.00

1852.00

1850.00

1848,00

1846.00

1844,00

B8 38 (20, close, 2) 0.22

12:00 13:0 11 10-0 11:00 12:00 13:0 14:45 10-00

T7 TradingView

Upon zooming out, the broader perspective


reveals a discernible uptrend in the market.
Amit_Ghosh published on TradingView.com, Sep 11, 2023 22:35 UTC+5:30
GRASIM INDUSTRIES, 15, NSE O H INR
B8 (20, close, 1, 0) 1859.04 1862.63 1855.45
1851.8 1867.50
HA 201 1RSB.88

SAR (0.02, 0.02, 0.2) 1853.70 1865.00


Vol 21.524K
1862.50
1860.90

1857.50

1855.00

1852.50

1850.00

1847.50

1845.00

1842,50

1840,00

1837.50

1835.00

1832.50

1830.00

1827,50

1825.00

1822.50

1820.00

1817,50

BB SB(20, close. 2) 0.22


1.00

12:00 13:45 12:00 13:45 12:00 13:45 11 12:00 13:4

T7 TradingView

The gBB strategy excels in offering sell entry


signals at the market's peaks, effectively cap
turing mean reversion trades, and then pro
viding exit signals near the median Bollinger
Band. But, after a period of consolidation, the
stock once again breaks out of the previous

1 min left in chapter 43%


Amit_Ghosh published on TradingView. com, Sep 12, 2023 00:19 UTC+5:30

GRASIM INDUSTRIES, 15, NSE O


B8 (20, close, 1, 0) 1859.04 1862.63 1855.45
RB 20, cose, 2, 0)
+
3B8 42
3RR #1
Vol 71.534K
1866.00

1864.00

1860,90
1860,00

1854.00

1852.00

1850.00

1848,00

1846.00

1844,00

B8 38 (20, close, 2) 0.22

12:00 13:0 11 10-0 11:00 12:00 13:0 14:45 10-00

T7 TradingView

Upon zooming out, the broader perspective


reveals a discernible uptrend in the market.
Amit_Ghosh published on TradingView.com, Sep 11, 2023 22:35 UTC+5:30
GRASIM INDUSTRIES, 15, NSE O H INR
B8 (20, close, 1, 0) 1859.04 1862.63 1855.45
1851.8 1867.50
HA 201 1RSB.88

SAR (0.02, 0.02, 0.2) 1853.70 1865.00


Vol 21.524K
1862.50
1860.90

1857.50

1855.00

1852.50

1850.00

1847.50

1845.00

1842,50

1840,00

1837.50

1835.00

1832.50

1830.00

1827,50

1825.00

1822.50

1820.00

1817,50

BB SB(20, close. 2) 0.22


1.00

12:00 13:45 12:00 13:45 12:00 13:45 11 12:00 13:4

T7 TradingView

The gBB strategy excels in offering sell entry


signals at the market's peaks, effectively cap
turing mean reversion trades, and then pro
viding exit signals near the median Bollinger
Band. But, after a period of consolidation, the
stock once again breaks out of the previous

1 min left in chapter 43%


resistance and continues on the path of Up

trend.
Now thequestion arises
1. So, What if We enter a Buy trade at the
end of the 3BB trade?
2. Or, What if We can predict that the 3BB
trade will hit the stop loss and will resume
theUptrend?
What is the Entropy
AlphaStrategy?
The Entropy Alpha Strategy employs ad
vanced Machine Learning techniques to aug
ment its trading capabilities. This innovative
approach leverages historical trade data from
the gBB Strategy to make informed trading
decisions.
Identifying Profitable Trades on Exit:
The Machine Learning model sifts through the
trade history to pinpoint trades that would
have been more profitable if one had entered
them at the time of the original trade's exit.
This valuable insight helps traders recognize
opportunities to maximize profits by timing
their entries strategically.
Predicting Trades at Risk of Hitting Stop Loss:
Equally important, the model identifies trades
with a high probability of hitting the stop
loss. This risk assessment empowers traders

1 min left in chapter 43%


to exercise caution or consider alternative
strategies when approaching potentially risky
trades.

The Entropy Alpha Strategy harnesses the


predictive power of Machine Learning to re
fine trading decisions. TwO notable models
play pivotal roles in this strategy:
Regression Analysis:
Regression analysis is a core component of
the Machine Learning framework employed
within the Entropy AlphaStrategy. Thisstatis
tical method is used to examine relationships
between variables, making it an invaluable
tool for identifying profitable trades and man
aging risk.

Profitable Trade Identification: Through


regression analysis, the model scrutinizes
historical trade data from the 3BB Strat
egy. It assesses factors such as entry and
exit points, trade durations, and mar
ket conditions to determine which trades
would have been more profitable if the
entry had occurred at the time of the
trade's exit.
Risk Assessment: Regression analysis is
also instrumental in predicting trades at
risk of hitting stop loss. It considers vari
ous data points, including market volatil
ity, trade volume, and historical perfor

1 min left in chapter 44%


mance, to gauge the likelihood of stop-loss
triggers.
K-means Clustering:
In addition to regression analysis, the Entropy
Alpha Strategy employs k-means clustering as
part of its machine-learning arsenal.
Cluster-Based Insights: K-means clus
tering is used to segment trade data into
distinct clusters based on similar charac
teristics. This clustering process enhances
the model's ability to categorize trades ef
fectively and identify patterns within the
data.
Trade Profiling: By clustering trades
with similar attributes, the model can
file trades with shared characteristics. This
aids in recognizing specific trade scenarios
and making data-driven predictions about
entry timing.
The Synergy of Regression Analysis and k
Means Clustering:
These two Machine Learning techniques work
in tandem within the Entropy Alpha Strategy:
Regression analysis refines trade entries
based on historical data and relationships
between variables,optimizing profitability
and risk management.
K-means clustering aids in categor
ing and profiling trades, enhancing the

1 min left in chapter 44%


model's ability to identify patterns and
similarities among trades.
Machine Learning Models inthe
Entropy Alpha Strategy
# entropy (ROJ Don't talk anything that is not important and urgent. https://unofficed.com/entropy-scanner/

Q 2 Pinned Entropy +
Entropya APP 10:07 AM
-
DRREDDY Yesterday
Triggered
Buy Drreddy Futures at 5645.1| Stoploss -5620.6 | Target1 - 5674.5 | Lotsize - 125|
Max Loss - 3062.45

Fut Zerodha Fut Angel Eq Zerodha Eq Angel

Entropya APP 10:14 AM


Triggered - TATACONSUM
- - -
Buy Tataconsum Futures at 863.1 Stoploss
|
856| Target1 866.4 | Lotsize 900|
Max Loss - 6390.0

Fut Zerodha Fut Angel Eq Zerodha Eq Angel

-
Triggered SBICARD
844.4 |Target1 - 858.7 |Lotsize - 800| Max
-
Buy Sbicard Futures at 853.9 | Stoploss
-
Loss 7599.95

Fut Zerodha Fut Angel Eq Zerodha Eq Angel

The Entropy Alpha System openly shares live


trade entries and exits on the Unofficed Dis
cussion Forum, providing transparency and
insights into real-time trading decisions.

Confidential CoreStrategy: While live


trades are accessible for evaluation, the
core strategy remains confidential. This
strategic safeguard isin place due to its re
markable profitability and the definition of
the models afforded by Machine Learning,
making it challenging to trace back to the
original source logic.
Promoting Innovation: The system
actively encourages traders to delve into
the vast realm of entropy and develop
their unique custom strategies. This ap
1 min left inchapter 45%
proach fosters creativity and collaboration
within the trading community, as individ
uals explore new avenues and adapt their
approaches.
Complementary Strategy: The En
tropy Alpha System seamlessly comple
ments the 3BB Strategy, offering traders
a comprehensive toolkit for navigating
various market conditions and optimiz
ing their trading endeavors. As both are
high-yield trading strategies with high
drawdowns, the combination reduces the
standard deviationof the portfolio!
By combining live trade sharing, confiden
tiality, a spirit of innovation, and strategic
synergy with the 3BB Strategy, the Entropy
Alpha System enhances trading effectiveness
and promotes growth within the trading com
munity.

1 min left in chapter 45%


Scalping with Bollingers
This servesas a simple illustration of the com
prehensive application of Bollinger Bands. We
don't expect you to fully grasp it at this point,
as we willdelve into the intricacies in upcom
ing sessions. However, take note of the inher
ent potential for simplicity within this trading
setup.
Currently, we have successfully achieved our
initial twotargets. Our third position remains
active, guided by a trailing stop loss set at the
median Bollinger Band.
In this context, "scalping'" refers to a trad
ing strategy where traders aim to profit from
small price movements in the market by mak
ing a large number of trades within a short
timeframe. Scalpers typically seek to capture
minimal price differentials multiple times a
day, capitalizing on brief price fluctuations to
generate profits.

1 min left in chapter 45%


Q Search symbol 1mv Views v Displayv Studies Layout

BANKINDIA17MAYFUT 180.00
178.45 0.25(-0.14%5)

Compare
179.48

179.00

1784

17800
1778

VOLUME
2005

100.0

STOCH (14

10:15 1020 1025 1030 1035 10.40 10:45

To effectively navigate this scenario, it's es


sential to employ a combination of differ
ent timeframes, Volume Price Analysis (VPA),
and support setup. Currently, the breach of
that specific line has the potential to trigger a
significant price spike.
When it crossed the lower boundary of the
price action range, it experienced a sharp
downside movement. This type of price ac
tion often forms around the median Bollinger
Band when a trade reverses. This is precisely
why we select the median Bollinger Band as
the Trailing Stop Loss.
Until a new Price Action range is established,
it acts as a barrier influenced by Volume Price
Analysis (VPA), and this can result in a trade
reversal. This is also why we use the median
Bollinger Band as the Target Price.

1 min left in chapter 45%


However, it's worth noting that our trailing
stop loss was activated. Despite all positions
ending in profit, we plan to reopen the last po
sition if the price breaches the upper bound
ary of the price action range.

In advanced Bollinger Bands trading, this is


akin to a Stop and Reverse (SAR) setup, where
a stop loss transitions into a trailing stop
loss. In the current scenario, the script is ex
pected to experience a brief downward move
ment until it breaks through the upper barrier.
Therefore, it makes sense to capitalize on this
opportunity, given our priorprofitable trades.

In essence, we are now profiting from both


upward and downward trends at a micro
scopic level. In summary, when a trailing stop
loss is triggered, it signifies a SAR trade - a
strategy that involves seizing opportunities on
both sides of the market.
Q Sesrchsymbol Views Displayv Studies Lavout

BANKINDIA17MAYFUT 180 00

178.10

179 50

1721
179.00

17800

17752

VOLUME
200k

1000k

STOCH4

1020 10-25 1030 1035 1040 10-45 10-50

1 min left in chapter 46%


At this moment, the high of the current can
dle serves as our Stop-Loss level. However,
we observe a Doji candlestick pattern forming.
This signals an opportunity to closethe trade.
Consequently, we are exiting the trade with a
slight profit, surpassing the breakeven point.
QSearchsymbol Views Displayv Studies V
Layoutv

BANKINDIA17MAYFUT OPEN: 178.70 HIGH 178.70 VOL 18OK +180.00


CLoSE 17845 LOW t7845 DATE: OS09 10-47
177.9 0.15(-0. 0896)

170.50

17900

179%

VOLUME
200

100Ok

SToEH(I4)

20 1024 1030 1035 1040 1045 10-40

Chace 1Y

We've experienced six stop-loss hits in total


up to this point. To better understand these
trades, please refer to the provided image.
Now, we encounter a doji candlestick pattern.
The appearance of a doji suggests it's time to
close the trade. A doji signals marlket indeci
sion, indicating that price action might lead
to a substantial move, but it doesn't provide a
clear indication of the direction that move will
take.

DojiExample
Now, let's dive into how to utilize the Doji

1 min left in chapter 46%


setup effectively. In cases where the Doji lacks
any tails and persists for 4-5 consecutive bars,
we implement a specific strategy.

During this scenario, we place both buy and


sell orders at the High (H) and Low (L) of the
candle that forms the spike following the Doji.
This approach is based on the premise that
the breakout of the spike-confirming candle
signifies the direction of the impending move.
Therefore, we ride the market in the direction
it chooses.
Having initiated our trade at the median
Bollinger band, we now have two potential
exit options:
1.Exiting at the upper band of the 1 SD
Bollinger.
2. Exiting at the upper band of the 2 SD
Bollinger.
O Search symbol 1m Views v Display StudiesV Layout

BANKINDIA17MAYFUT OPEN: 178.55 G 178.55 VOLL 6.00 K


CLOSE: 17820 LOW 178 20 DATE: 0509 10:49
178.95 0.40(O.00o 17950

17895

17874

17840

17750

VOLUME
200k
f1000k

STOCH (14)

1 min left in chapter 46%


To accommodate our exit strategy, we enter
the trade with two lots. As demonstrated, the
first target has been achieved. We then adjust
our trailing stop loss to the level of the first
target while pursuing the second target.
a Serch sybol Views Display v Studies v Layout Y

BANKINDIA17MAYFUT WOL 1295


179 50-+ o35 (020%) CLOE DATE:
17925

17800
1778
127

1750

17725
VoLUM:
200k

100k

STOCH (14)

1030 1035 1040 1045 1050 1055

Our original stop loss is positioned at the


lower spike of the preceding candle, which
corresponds to the level at which we initiated
the trade based on the DojiPrice Action levels.
As demonstrated in this scenario, our second
trade has also achieved its intended target.
However, when employing the Bollinger Ride
Strategy (BRS), there is an option to keep the
final lot active while implementing a trailing
stop loss based on price action, instead of ter
minating the trade immediately upon reach
ing the upper band.
This approach enables traders to continue
riding the trend and potentially maximize

1 min left in chapter 46%


profits as long as market conditions remain
favorable, demonstrating the flexibility and
adaptability of the strategy to different trading
situations.
Q Sesrch symbol 1my Views Displayv StudiesV Layout v

BANKINDIA17MAYFUT OPEN: 178.95 HIGE 178.95 VOLL 240 K


CLOSE:178.65 LOW: 178.65 DATE 05-09 10-56
179.400.10(0.0Oe)
S920

120 00
Studies

17850

17R00

177.50

17729
VOLUME 200
150
100 0k

STOCH (4)

1030 1035 10.40 1045 10-50 1055 1100

1D SD 6M YTD 1Y SY Al

Therefore, when our trailing stop loss was hit,


we promptly initiated a short position, in line
with our Stop and Reverse (SAR) setup, with
the stop loss set at the price action level.
Please refer to the image below for clarifica
tion:
Our stop loss is hit and we're finally out of the
trade.

1 min left in chapter 47%


Q search symbol 1m Views v Display Studies v Layout

BANKINDIA17MAYEUT OPEN: 179.20 HIGH 17925 VOL 30.0 K

17935 4 015(-0.08 CLOSE179.15 LOW: 179.10 DATE: 05s.09 1058 235

Compe

17876

17850

17829

17800

177,50

177 25
2005
VOLUME
150
1000

STOCH (14)

1035 10.40 1045 10-50 1055 1100

DojiExample #2
Q search symbol
Im Views v
Display Studies LayoutY

BANKINDIA17MAYFUT OPEN 17810 HIGH 178,15 VOL 84A.0 K


CLOSE: 178.10 LOW: 1 78.05 DATE 0s.09 10-52
179.75 p15(0.006)

Cornpare
2022
Studies

17750

200k
VOLUME

100

STOCH(14)

1040 1045

Now you will see the Doji case again and you
-
know what trade we are going to place here

1 min left in chapter 47%


O Sesrch symbol Imv Views Display Studies Layout

BANKINDIA17MAYFUT OPEN: 179.75 HIGHE 179,90 VOLL S40K


CLOSE179.70 LOW 179.70 DATE 0509 11:08
180.50+ 0.10(0.066)

+ Compa 17993
Stucies

17900

17859)

17750
200
VOLUME
150%
100 O%

STOCH (14)

Let's delve into the details to provide a clear


explanation and minimize any potential con
fusion. You can reference the image above to
follow along with the specific actions taken in
each candle:
Doji Formation: The initial step in this se
quence is the formation of a Doji candle.
Closing the First Trade: After the Doji for
mation, we decided to close out our first trade
with a profit of o.25 points).
Buy Order: Following the closure of the first
trade, we placed a buy order.
Incorporating VPA (Volume Profile
Analysis): At this juncture, we incorporate
Volume Profile Analysis (VPA) into our trad
ing strategy. Instead of setting our stop loss
179.5, as dictated by the traditional method,
we opt to place our stop loss at 180.

1 min left in chapter 47%


This decision is influenced by insights from
VPA, which suggests a more prudent place
ment for our stop loss. By combining our trad
ing approach with VPA, we aim to make more
informed decisions and optimize our trading
strategy for potential gains.
Q Search symbol 1mv Views v
Displayv StudiesV Layout

BANKINDIA17MAYFUT OPEN: HIH VOLL

CLOSE: LOW DATE


180.05 025(0.00%)
180 0%
Compare.
Stucies

178 00

200
VOLUME

1000%

STOCHt

40 1045 1050 1055 1100 1105 11:10

Share 10 YTD 1Y SY Al

We've adopted a nuanced approach to refine


our stop loss strategy. Here's a breakdown of
the steps taken:
Calculation of Mean: Initially, we calcu
lated the mean of three potential stop loss
levels,arriving at an average value of approxi
mately 180. In this process,we considered lev
els such as 180.14, 179.86, and others.
Addressing Imperfections: Recognizing
that the value of 180 might not represen
perfect barrier, we made the decision to fine
tune our approach. Rather than using a level
that ended in .o0, we opted for a stop loss

1 min left in chapter 47%


at 179.95 or 180.05. This adjustment accounts
for the significance of psychological barriers
in trading.
Updated Stop Loss: Our final stop loss level
was set at 180.05. This specific value was cho
sen to reflect the reality that many traders
tend to buy or sell at round price points like
180.05.
This refined stop-loss approach enhances the
accuracy of our trading strategy by consider
ing psychological factors and market behavior
in our decision-making process.
Q search synbol Views Display v
Studies
V
Layoutv

OPEN: 19055
BANKINDIA17MAYFUT HIGH 180.8 VOL: 42.0 K
CLOSE 1060 LOW: 180.55 DATE: O5-09 11:16
180.80 0.20(0.0061

t Compare.

Studies

17890

17800

VOLUME
300
200
100.0k

STOCHIT4

Hence, Low of this candle. Now our stop loss


is at 18o.35. So 180.35 triggers a price action.

1 min left in chapter 48%


OSearch senbol 1mv Views v Displayv Studies Layout v

BANKINDIA17MAYFUT OPEN 129.50 HIGH 179.50 VOLL 180K


CLOSE: 179.40 LOW: 179.40 DATE 0s09 110s
180.70+0.15(0.086)

t Compare.

Studies

120 00

17850

178 00

VOLUME

200
100.0k

STOCH (14)

1055 1100 1105 11:10 11:15 11:20

Now our stop loss is at 180.45. The low of the


candle formed at 11:23. We closed at 181.05.

Price Action
QSearch symbol 1m Views Display Studiesv Layout

OPEN: 180.60
BANKINDIA17MAYFUT HIGH: 180.65

181.20 + 0.20 (0.11%) CLOSE: 18050 DATE 0509 1126 18120

+ Compare.
Studes

180 2

179.7

17950

17925

VOLUME

STOCH(14)

1100 11:0 11-10 11:15 1120 11-25 11:30

In this scenario, we're relying on price action


and psychological barriers to fine-tune our
trading decisions. Here's how our strategy un
folds:

1 min left in chapter 48%


Doji Candle Formation: At 11:29, we ob
serve the formation of a doji candlestick pat
tern. A dojisuggests indecision in the market,
signifying that neither buyers nor sellers have
a strong upper hand at that moment.

Pending Buy Order: Based on our analysis,


we place a pending buy order at 182.1, antic
ipating that it may be more likely to trigger
trades than an order placed at 182.05.
Profit from the Upper Bollinger Band:
price briefly touches 182.05, we man
As the
age t0 secure a profit of 0.30 points. This
move isdriven by theprice action and the fact
that the stock price has breached the upper
band of the 2-standard deviation Bollinger
Bands.

Anticipating Downside: Looking forward,


we anticipate that the price action may trigger
a decline, possibly to 181.5.

Q Search ynbol Imv Views Display Studies Layout

BANKINDIA17MAYFUT OPENE 181.70


DATE: 05 09 11-47
CLOSE 181.75 LOW: 181.70
181.80-+ 0.05 (0.036)

+Corpare 161.80
Studies

18146

8071

18025

180.00

VOLUME

200k

STOCIHF4

0 11:15 112 11:25 11:30 1135 1140


M

VID 1Y 5Y

1 min left in chapter 48%


Here's an overview of how we handle what we
term as a "failed case" of a gBB breakout, and
how we use martingale in this context:
Failed 3BB Breakout: In this situation, the
3BB (Three Bollinger Bands) breakout strat
egy did not yield the expected results, and we
categorize it as a "failed case." We'll explore
the details and reasons for these failures later
in our discussion.
Two Exit Points: Despite the initial failure,
we recognize that there are still opportunities
to navigate this trade. Our strategy provides
us with two potential exit points, and we'llexX
plore these options in more detail.
Martingale in F-3BB Case: Martingale is a
strategy that involves increasing the position
size after a losing trade to recover losses and
potentially make a profit. In the context of a
"failed 3BB breakout" (F-3BB case), we em
ploy martingale to adjust our position size.
Entering with Two Lots: As a result of the
martingale approach, we decide to re-enter
the trade with two lots. This decision is based
on our analysis of the potential exit points
available to us.

1 min left in chapter 48%


OSearch symoo 1m Views Display Studies Layout

BANKINDIA17MAYFUT OPEN: 181.90 HGHE 182.00 VOL: 30.0 K 232

.
181.00 0.60(-0.33%) CLOSE 181,85 LOW: 181 80 DATEE
0509 1140
181.95)
t Compare.
181.75
Studies

18140

18125

T81.00

18075

180 25

180 00

VOLUME
300

1000

STOCHft4)

11:15 11:20 11:25 1130 11:35 11:40

We've achieved our first target, which was to


reach the lower band of the 1 SD Bollinger.
This resulted in a profit for one of our lots.

Currently, we have two lots remaining in the


trade, and our next objective is to reach the
lower band of the 2 SD Bollinger. To pro
tect our gains and manage risk, we've imple
mented a trailing stop loss, which is currently
set at the lower band of the 1 SD Bollinger.
This approach allows us to capture profits
along the way while still having the potential
to benefit from further price movement to
ward our target at the lower band of the 2 SD
Bollinger.
Trailing stop losses are valuable tools for
traders to lock in gains and minimize potential
losses asa trade progresses.

1 min left in chapter 49%


Inv Ve Deglyv Sudes v lyoa
v+ 0

BANKINDIA17MAYFUT OPEN: HIGH

CLO: LOW DATE


8096 030(00h

13200

18090

VLUME

190

900%

SIOCH4)

1120 1125 1130 1135 14) 1145 119

Y
Shre 10 50 1M
M6M YO
YA

Well, we see a gap down here. We changed our


trailing stop loss hence to 181.

1 min left in chapter 49%


Q Search symbol Im Views V
Display v Studies v Layout v

BANKINDIA17MAYFUT OPEN HIGH VOL!

CLoSE LOW DATE


180.80+ 020 (0.1195)
T82.00
Compare..
Studies 181.75

8147

180 50

VOLUME

100
500

STOCH (14)

11:20 11:25 1130 1135 11:40 11:45 1150

Share YTD 1Y 5Y A

We've adjusted our trailing stop loss to 181.05.


This decision was based on the observation
that the high of the current candle falls within
the range between the 1 SD Bollinger and the
2 SD Bollinger. When I mention "closure,"
I mean that the high, open, close, and low
prices of this candle all lie within that particu
lar price range.
In the meantime, our SAR (Stop and Reverse)
indicator has been triggered.
Despite this, we're keeping our stop loss at
179.95, which was determined earlier. How
ever, it's important to note the significant
price action movement that occurred during
this period.
Price action can be quite dynamic, and traders
need to be adaptable in managing their trades.
Our trailing stop loss provides a level of pro

1 min left inchapter 49%


tection, but sudden price movements can in
fluence our decision-making process.
Q Searchi symbol 1mv Views v Display StudiesY Layout

BANKINDIA17MAYFUT OPEN 181-2 aGGE 18125 VOL 54.0 K F18225


CLOSE: 180.95 DATE
181.10 0.10(-0.066)
LOW 180.85 05o9 11-50
S8212
1200
+ Compare..

Studies 18183

181.75

181.50

181 45

18118
381.10
S181.00

8075

VOLUME 200

f100 Ok

STOCH (14)

1140 1145 11:50

We have three targets here and hence three


lots.
1.Median Bollinger of 1 SD.
2. Upper Band ofi SD Bollinger.
3. Upper Band of 2 SD Bollinger.

It hits the first target as well as the second tar


get. But while approaching the third target it
made a Doji followed by a green candle which
givesconfidence on an uptrend.
But we can see another Doji is happening. So
we
changed our stop loss from "Upper Band of
1
SD Bollinger“to the low of the green candle
formed after the first doji.
We hit our stop loss and it opened a sell trade.
But our first Doji's trade overlapped with the
second Doji.

1 min left in chapter 49%


However, we can also immediately exit a trade
seeing the Doji but lots of external things
to be considered like Volume Profile Barrier,
Bollinger, and other technical indicators.
Here is the DojiTrigger
v
Q search Symbol 1mv Views Display Studies Layout

BANKINDIA17MAYEUT OPEN 181,45 HIGHE 18145 VOLL 6.00 K 18225


CLOSE 181.30 LOW: 181.30 DATE 05-09 12:04
181.30 o15(-008%)
8206

181.75
8161

18141

18130

180 50

LUME

50Ok

SIOGH4)

1200

Now we have entered with three lots again.


1. Median Band.
2. Lower Band of 1 SD Bollinger Band.
3. Lower Band of 2 SD Bollinger Band.

I conclude this narrative at this point. To


achieve the level of precision seen here, one
would need a more in-depth understanding of
price action, candlestick patterns, and Volume
Profile analysis. These advanced techniques
allow for a detailed analysis of market move
ments, enabling traders to make informed de
cisionson a candle-by-candle basis.

1 min left in chapter 49%


Live Trade Case Study
1: Titan May Fut
Yesterday, we initiated a short position on
Titan, a trade that several individuals, includ
me
ing myself, executed using the same trading
strategy we typically employ. In my case, I de
cided to close my position at 484, primarily
relying on a Price Action-based approach for
my exit. However, one of our fellow traders,
Uday, chose tocontinue holding his position.
Notably, our contrasting exit strategies led to
different outcomes for our trades.
This morning, upon conducting my analy
sis, I identified that Titan was aligning with
the 3BB Bollinger strategy. Furthermore, it
seemed highly likely that Titan would cross
the median Bollinger band, with a Probabil
ity of Profit (POP) estimated at approximately
85.6%, based on my specifictrade setup and
analysis.

1 min left in chapter 50%


O Search symbol 30m v Views Displayv Studiesv Layout

506.97
TITAN17MAYFUT
497.25 3.50(-0.7096)

Compare.. 500.00

Studies
49725

490.00

4R5.00

482.73

480.00

475.00

:1.50m
VOLUME
1000k%

s00k

4/25 ADE 4/27 4/28 5/2 5B 5/4 5/5

1D 1M 3M YTD 1Y 5Y AII
Share 5D 6M

Uday Shankar 1:16PM


Perfect analysis @dexter. closed at 501 with loss of 15K. Idid'nt rentered bcos of fear another
I

loss. Now its at 496 (edited)

However, Uday made the decision to book


profits when the price reached a certain level
but refrained from re-entering the trade. His
hesitation stemmed from a previous loss trade
in Titan, an experience that has left him ap
prehensive about trading this particular stock.
When I was mentioning the Titan Fu
tures Short trade. It was facing the median
Bollinger and hence there was a high chance
of reversal.

1 min left in chapter 50%


Q search synbol 30rn Views y Displayv Studiesv Layouty

TITAN17MAYFUT
496,40 4 0.50 (0.10%)
S02 50
- Compare.

Stucies So0.00

492 50

490.00

487 50

48250

1.5Crn
VOLUME
000

1400 12:00 1400 1200 1400 S8

Share SD 1M 3M 6M 1Y SY Al

The median Bollinger band plays a pivotal role


asa significant support and resistance level in
Our analysis. At this juncture, we must con
sider three possible scenarios:
1.The price falls further during the
current candlestick session but subse
quently reverses to close in green dur
ing the next candlestick session.
2. The price experiences a further de
cline within the current candlestick
session but then rebounds and closes
positively within the same session.
3. The price continues to fall further
without exhibiting a notable reversal.
To makean informed decision about which
trading strategy to pursue, we need to cross
reference our analysis with various
technical indicators and fundamentals.

1 min left in chapter 50%


By meticulously applying the knowledge and
tools acquired through technical and funda
mental analysis, we can enhance our pre
dictive abilities and assess the likelihood of
different outcomes. It's important to empha
size that these predictions are associated with
probabilities, highlighting the inherent uncer
tainty in financial markets.

Please note the term - Probability!


Q Serch symbal 30m Views Displayv StudiesV Layout y

TITAN17MAYFUT
496.00 + 0.10(0.02%)

Compare
Stuidie

490 00

483.00

47500

VOLUME
1000%

S00k

STOCH (4

MAON(14)

S/2 1200 58 12:00 5/4 12:00 1200 S/8 12:00

Share 1D 5D 1M 2M 6M YTD 1Y 5Y Al

The Money Flow Index (MFI) suggests that


the stock is currently overvalued, indicating a
potential for a price correction. On the other
hand,the Stochastic Oscillator (Stoch) signals
that the stock might experience a short-term
reversal, meaning it could temporarily move
higher. However, this reversal might not be
indicative of a sustained uptrend, and there
could be further downside potential.

1 min left in chapter 50%


To navigate this situation, we can consider ad
justing our trailing stop loss to a specific level,
in this case, at 497.7. This level corresponds
to the high of the second-to-last candle on the
price chart.
It's important to note that traders may choose
their own stop-loss strategy based on their
risk tolerance and trading preferences. The
idea behind this adjustment is to lock in
potential profits and protect against further
downside, given the mixed signals provided by
MFI and Stoch.
aseorch symbol 30m v
Views v
DisplayY Studies v Layoutv

TITAN17MAYFUT
494.40 150(-0.306)

+Compare.
Studies

490.00

VOLUME
1000k

SFOCHLAY

MAOW(L4)

1000 1200 1400 54 1200 1400 1200 1400 1200

Share 6M YTD 1Y 5Y A

A familiar pattern emerged as history re


peated itself with Titan confidently breaking
through the median Bollinger Band. In re
sponse, I swiftly adjusted my trailing stop loss
to 497, aiming to protect our gains.
As Titan approached this critical juncture, I
kepta watchful eye on the 492.2 level.

1 min left in chapter 51%


If breached, it would signal a notable price
action towards the downside. While the exact
destination of this movement remained un
certain, I opted to ride the trend with my trail
ing stop loss firmly in place.
3BB's significance stems from its remarkable
98.5% probability of profitability, grounded in
the principles of Bollinger Bands and the con
cept of standard deviation.
This is how Iget my stop-loss point

The candles here follow a notable weekend


strategy. It means the previous candle's high is
not getting broken in the next candle. It shows
the strength of the bear. We exit the trade
when the previous candle's high is broken.
QSesrch syrmbol
30m Views Display v Studiesv Layout +
TITAN17MAYFUT
494 30 6.10(-00296)

Compare. 500.00
Studies

49a.00

VOLUME
1000%

STOCH14)

MAOW14)

1200 1400 1200 1400 1200

Share 10 5D 1M 3M 6M YTD 1Y 5Y A

Anyways, eventually, Titan's trailing Stop Loss


was hit.

1 min left in chapter 51%


Q: What would you consider the ideal
timeframe for intraday trading?
A: To determine the perfect timeframe for
intraday trading, additional theories are re
quired. However, this strategy can be applied
across all timeframes. Generally,higher time
frames have less noise. In the absence of spe
cifictheories, a practical approach is to man
ually backtest the last 10 trade opportunities
with your own eyes.

1 min left in chapter 51%


Live Trade Case Study
2: ICICI May Fut
While there are numerous day trading meth
ods, it's important to maintain respect for
each approach and profitable trader, re
gardless of their trading style. Fundamental
traders may dismiss technical analysis, and
vice versa, but both methods have proven to
be profitable, and traders have successfully
employed them for decades.
Now, let's revisit a trade similar to the Titan
Futures trade that occurred in ICICI on the
same day. By "repetition," I'm referring to a
similar trading structure. This trade was dis
cussed live, and I'll provide a recap from the
archive.

2 mins left in chapter 51%


Vens v Dglay v Sudes laygut v
Smv
0D
30391

ICCBANKI7MAYFUT 302 00

30080 0.05(-002%)

30080
tCompste

20071

20900

20865

298.00

297.00

296.00

9552

295 00

5.0Om
VOLUME

250m

STOCH(A

30

1000 10:30 1100 1130 120 1230 1300 1330 1400 1430

It's consolidating, which means the probabil


ity of profit is low here.
However, let's enter with 301.45 as the stop
loss. Bank of India's time frame is 30 Min
utes, and it's more volatile than ICICI. Higher
volatility corresponds to a greater standard
deviation, especially on longer timeframes.
These are different types of trade setups:

2 mins left in chapter 52%


If you use a volume profile, you need to
disregard technical analysis.
If you trade with Bollinger Bands, you
should set aside the flag setup and focus on
riding the band concept.
If you're employing the flag strategy, it's
best to forget about Bollinger Bands.
It's worth noting that trying to excel in all of
these approaches might lead to becoming a
jack of all trades, master of none. For a more
concrete example, let's consider ICICI with
the flag setup.
Search symbol 1m v Displayv Studies
O

Views Layout

ICICIBANK17MAYFUT
300.70 0.15 (0,.05%) 30200

Compare
301.50
Studies

301.00

300.7o
20050

300.00

299.50

VOLUME 750k
500k
250

STOCH14) 70

14:10 14:15 14-20 14:25 1430 14:35 14-40 14:45 14-50 14-50 15:00 |5-04

Share 1 1M 2M YTD 1Y 5Y All

A flag is time frame independent. You


need to forget Bollinger's here.
You can observe how the super trend line
forms beneath the flag spread. A look at the
volume profile reveals that most of the trading
volumes during this timeframe occur within
this spread.

2 mins left in chapter 52%


Consequently, when this spread is breached, it
often results in a spike as some traders close
their positions. This is how the concept of a
flag pattern is explained in conjunction with
volume profile analysis.
Now, await the potential breakout. Why am
Ibetting on a potential breakout? There are
multiple ways to explain this. You can jus
tify it using volume profile analysis, Bollinger
Bands, or even the flag pattern setup. Es
sentially, any of these methods can provide
valid reasoning, demonstrating the versatility
of trading indicators.
This versatility is why these indicators ar
referred to as such. A clear trading direction
becomes discernible when you combine these
indicators with other technical toos, different
timeframes, and various trading theories. The
more factors that align with your trading idea,
the higher the probability of achieving a prof
itable outcome.
Q Search symbol 1mv Views
N

Display v Studiesv Layout

ICICIBANK17MAYFUT 301.50

300.30+ 0.05 (0.029%)

-Om
301.00
Studie

-300.50

30030

300.00

200 75

299.50

VOLUME -500

2501

STOCH(14) 70

14-20 14:25 14:30 1435 1440 14-45 14-50 14-55 15:00 15:05 15:10 15:15

2 mins left in chapter 52%


It cracked.
v
Q Search symbol 1mv Views Display Studies Layout'

301.50
ICICIBANK17MAYFUT
300.004 0.05 (
0.029%)

Eompar -301.00
dies

300.50

ann on

20077

290.50

-500k
VOLUME

250k

STOCH(14)

|4:20 14:25 14:30 |4-3 14:40 14:45 14:50 14:55 15:00 15:05 15:10 15:15

Now, let's incorporate the Stochastic Oscilla


tor (Stoch) indicator into our analysis.
We're still working within the 1-minute time
frame, focusing on the flag pattern setup. Dur
ing this period, the Stoch (14) lines crossed
over each other showing the first bullish trig
ger!

Now, Let's explore further -


O Search symbol 5m v Views Displavv Studiesy Layout

ICICIBANK17MAYFUT 302.00
299.75 0.50 (-0.179%)

301.00
+ Compare.

299.75

208.87

298.00

297.00

-296.00

295.00

5.00m
VOLUME
+250m

STOCH (14)

00 11:30 12:00 12:30 13:00 13:30 14:00 14:30 15:00 5/8

We decided to shift to a longer time frame,


specifically the 5-minute chart, as our ini

1 min left in chapter 52%


tial stop-loss was hit on the lower timeframe.
Within this context, we explored multiple the
ories:
Theory 1:Swing Low (Price Action)
In this theory, we observed a significant red
line representing a swing low. If this line were
to be crossed, it could potentially trigger a
massive panic among traders. This theory fo
cuses on "What" happened.

Theory 2: Volume Profile


This theory considers the volume profile anal
ysis. If the price crosses a specific section on
the chart, it signifies a potential breakdown.
This approach is rooted in understanding
"Why" certain price movements occur.

Theory 3: Flag Setup


Analyzing a flag setup within the 5-minute
timeframe,we observed consolidation and the
formation of a pennant pattern. Subsequently,
the price broke down fromn this pattern. From
the chart alone, it became evident that the
likelihood of further downside movement was
high.

1 min left in chapter 53%


O search symbol 5m v Views Display v Studiesv Layout

ICICIBANK17MAYFUT 302.00
299.40 0.35 (-0.1296)
301.00
t Compare..
300.00

299,40

298.87

298.00

297.00

296.00

295.00

fs.00m
VOLUME

2.50m

STOCH (14)

11:30 12-00 12:30 13:00 13:30 14:00 1430 15:00 5/8

Theory 4: Median Bollinger


O Search symbol 5m v Views
>

Displayv StudiesY Layout

302.77
ICICIBANK17MAYFUT t302.00
298. 75 1.00( -0.3396)
201.00

290 87

298 75

298.00

206 08

-
296.00

295.00

-5.00m
VOLUME
2.50m

STOCH (14)

11-30 12-00 12:30 13:00 13:30 1400 14:30 15:00 5/8

Recall our previous discussion regarding trad


ing scenarios involving the Median Bollinger
Bands.
Typically,when the price touches the median
Bollinger Band, it's considered a pivotal mo
ment, often indicating a potential reversal.
However, in this particular case, there was no
sign of struggle; instead, it crossed the median
Bollinger Band with remarkable confidence,

1 min left in chapter 53%


underscoring the strength of the bearish senti
ment.
Now, the question arises: How should we go
about exiting this trade?
The most prudent approach in this situation
is to leverage a trailing stop loss. It's widely
regarded as the optimal strategy for managing
trades of this nature.
O Search symbol 5m v Views Display v Studiesv Layout

202 50
ICICIBANK17MAYFUT f302.00
+
299.10 0.10(0.0396)
301.00

200.01

298.00
20752

297 00

296.00

295.00

5.00m
VOLUME

2.50m

STOCH(14) 70

11:30 12:00 12:30 13-00 13:30 14:00 14:30 15:00 5/8

Nonetheless, we find ourselves in a profitable


position. The rationale for maintaining this
trade includes the following factors:
1. Stochastics have yet to intersect.
2. The super trend line is in close prox
imity.
Remember, there'sno gain without taking cal
culated risks.
When implementing a trailing stop loss, it
might appear as though you're sacrificing po
tential profit.

1 min left in chapter 53%


However, it's crucial to recognize this as a loss
mitigation strategy. You may want to treat it
as a separate trade altogether. It's common
for traders to become more risk-tolerant when
they see evena slight profit, which is not ad
visable.
Now, let's make an adjustment to our stop
loss. With the formation of another candle,
our stop loss is shifted to the high of the sec
ond last candle or the mnost recent confirmed
candle.
As a rule of thumb, the "top" corresponds to
the "high" price level, which in this case is
299.3. It's important to remain vigilant and
keep adjusting your stop loss.
Nevertheless, we intend to close the trade at
15:29, regardless of itscurrent position.
Day traders strictly adhere to their trad
ing hours, refraining from carrying positions
overnight or for extended periods. They also
avoid using margin intraday square-off (MIS)
orders as brokers typically block trading activ
ity after 15:20 (for Zerodha, for instance).

This is why they opt for the normal (NRML)


order type.
Let's delve into the reasoning behind the stop
loss from the chart -

1 min left inchapter 53%


Q Search symbol 5m v Views Displayv Studies v Layout

30229
ICICIBANK17MAYFUT
298.85 0.05 (0.0096)
-301.00

300.08

207 88
207 36
t 297.00

296.00

295.00

5.00m
VOLUME
t250m

STOCH (14)

1-2r 12-00 13-20 13-00 13-30 14-00 14-20 10-00

Now, it's time toexplore the other theories as


well. Now look, it is making a bear flag in the
setup. Youneed to remove Bollinger's to see
and imagine flags properly.
Q Search symbol 5m v Views v Displayv Studies Layout

ICICIBANK17MAYFUT 302.00
298.75 0.10 (-0.0396)
201.00
+ Compare..

Studies 300.00

298.75

-
298.00

297.00

-296.00

295.00
-5.00m
VOLUME
2.50m

STOCH(14) 70

11:30 12:00 12:30 13:00 13:30 14:00 14:30 15:00 5/8 10:00

Share 1D 5D 1M 2M YTD 1Y 5Y All

Now we need to shift the trailing stop loss


again.

1 min left in chapter 54%


O Search symbol 5m
v

Views Display v Studiesv Layout +


ICICIBANK17MAYEUT 30229
298.35 0.35 (-0.1296)

301.00

200 09

299.00

29835
297.87

297.00

296.00

295.00

5.00m
VOLUME

2.50m

STOCH (14)

11-30 12-00 12:30 13:00 13-30 14-00 14-30 1500 10-00

Our trailing stop loss has been adjusted once


more with the formation of a new candle.
However, it's worth noting that the Stochas
tics indicator is about to reach a point where
its two lines touch each other. In accordance
with the Bollinger setup, we should consider
closing the trade at the moment the Stochas
tics lines converge.
The clock is ticking, and it's now approach
ing 15:29, the designated closing time for our
trade. Finally, we decided to close the position
at 298.35.
It's important to recognize that this particular
trade setup cannot be automated through
coding. This approach relies on your cognitive
abilities, acting as a machine learning mecha
nism. Your mind is capable of overseeing nu
merous setups simultaneously, making it an
invaluable tool in trading. Nothing can sur

1 min left in chapter 54%


pass the decision-making capabilities of the
human mind in this context.
So in short -
Open Positions (3) 9 Historical Download Q Filter eg: nifty, nrml

DR
Product Instrument Qty Avg. price LTP Chg

BO BANKNIFTY17MAYFUT NEO
0.00 22,647.00 +6000.00 NA

BO EXIDEIND17MAYFUT NFO 0.00 241.70 +2000.00 NA

BC ICICIBANK17MAYFUT NEO 0.00 298.55 +2500.00 NA

TOTAL 10,500

This approach is executed through Bracket


Orders using a goK quant strategy, as outlined
here. It's worth noting that I've been dedicat
edly working on making profits with this goK
quant strategy.
Bracket Orders offer significant leverage by al
lowing you to set predetermined stop-loss and
target levels at the time of entry.
-
And here goes the order book

1 min left in chapter 54%


Executed Orders (12) 4 Historical Download
Q eg:sell, nifty, nrml

Iime Instrument Type Oty Avg. price Product Status

14:25:09 ICICIBANK17MAYFUT NFO BUY 0/2500 BO CANCELLED

14:25:09 ICICIBANK17MAYFUT NFO BUY 2500 / 2500 299.65 BO COMPLETE

14:14:13 ICICIBANK17MAYFUT NFO SELL 2500 /2500 300.65 BO COMPLETE

13:27:45 BANKNIFTY17MAYFUT NFO BUY 0/40 BO CANCELLED

13:27:45 BANKNIFTY17MAYFUT NFO BUY 40 / 40 22580 BO COMPLETE

10:34:02 EXIDEIND17MAYEUT NFO BUY 0/4000 BO CANCELLED

10:34:02 EXIDEIND17MAYFUT NFO BUY 4000 / 4000 243 BO COMPLETE

10:31:13 EXIDEIND17MAYFUT NFO SELL 4000 /4000 243,4 BO COMPLETE

10:24:34 EXIDEIND17MAYFUT NFO BUY 0/4000 BO CANCELLED

10:24:34 EXIDEIND17MAYFUT NFO BUY 4000 / 4000 243.1 BO COMPLETE

10:16:28 EXIDEIND17MAYFUT NFO SELL 4000 / 4000 243.2 BO COMPLETE

10:06:38 BANKNIFTY17MAYFUT NFO SELL 40 / 40 22730 BO |COMPLETE

Learning reading speed 54%


Trade Psychology
Trading in the stock market is far more than
just numbers, charts, and financial data. It
is a psychological arena where traders grap
ple with their emotions, instincts, and biases.
This article embarks on a faseinating jour
ney through the intricate world of trading
psychology, offering insights, examples, and
strategies that can help traders navigate the
complexities of the stock market with a keen
understanding of their own psychology.

Part 1: The Psychology of Winning and


Losing
Suppose you come across a trader with a re
markable 80% win ratioin their past trades.
This trader,let's call them John, recently gave
a
short call on a stock, Havells. At this point,
twoscenarios unfold:
1. The stock price is currently above
John's shorting point, indicating that
he is facing a loss. You might think
that entering the trade now could
increase your chances of making a
profit.
2. The stock price is below John's short

ing point, suggesting that he is in a


profitable position. You might wonder

1 min left in chapter 54%


if entering the trade now would be a
wise move, even though John's trade
is currently in the green.

If you had to choose between these twO Sce


narios, which one would you prefer?
In a survey among traders, an intriguing
ensus emerges - every single respondent
votes for scenario 1. They believe that John's
trade is less likely to incur further losses
(point 1) or yield additional profits (point 2).
This seemingly contradictory behavior reflects
the complexity of trading psychology and how
it can influence traders' decision-making pro
Cesses.

Part 2: Unpacking the Complexity of


Trading PsychologY
What we have witnessed in the scenario above
isa manifestation of trading psychology at its
finest. The traders' preference for scenario 1
indicates a reluctance to accept John's trade
as it stands,either in terms of potential loss or
profit. This nuanced psychology plays a signif
icant role in how traders modify, exit, or enter
trades,often deviating from conventional wis
dom and expectations.
Case Study: The Bank India Trade
Let's delve into a famous trade involving Bank
India to further illustrate the intricate dance
1 min left in chapter 55%
of trading psychology. In this scenario, the
traders initially shorted Bank India and were
basking in the glory of their trade. However,
the story takesan intriguing twist.
To mitigate their position, they decide to close
it at a specific point, driven by observations of
price action. Subsequently, they re-enter the
trade at different point, aiming a
to balance
potential losses and gains.
Q Search symbol 1Om v
Views Display v Studies v Lavouty

BANKINDIA17MAYFUT
195.00
188.00 + 0.40 (0.2196)

+ Compare..
Studies 192.50

o1 42

18800
18750

195 00

-5.00m
VOLUME

2.50m

STOCH (14)
70

10-00 11:00 12-00 13:00 14:00 5/5 10-00 11:00 12-00 13:00

This approach might appear counterintuitive,


as it sacrifices some potential upside while
keeping the trade open. However, it under
scores the trader's responsiveness to market
dynamics and their willingness to adapt based
on price action.
Understanding Price Action: A Crucial
Component
The concepts of price action, swing highs, and
fractals are pivotal in the trader's decision
making process. These elements of technical

1 min left in chapter 55%


analysis guide their actions and, importantly,
their psychology. But here's where the com
plexity arises - once a trader exits a losing
trade, their psychology tends to resist re-entry
intothe same trade, even if the market condi
tions align with their strategy. This psycholog
ical barrier can lead to missed opportunities
and, ultimately, losses.
Key Takeaways: Navigating the Psyche
of Trading
As we
navigate the intricacies of trading psy

chology, several key takeaways emerge:


1.
Persistence Pays Off: It'sessential
toconsider re-entering the same stock
or asset nmultiple times if it aligns with
the conditions of your trading strat
egy, especially if you've faced numer
ous stop losses. Persistence can lead
to improved outcomes.
2. Respect Price Action: Price action
is a powerful tool that should not be
underestimated. It provides valuable
insights into market dynamics and
can guide your trading decisions.
3. Overcome Psychological Barri
ers: Acknowledge that your own
trade psychology can hinder you from
re-entering a trade after a loss. Be

1 min left in chapter 55%


cautious but also be open to opportu
nities that align with your strategy.

1 min left in chapter 56%


Synergistic Trading
Strategies
Entropy Course Live Trade
September 11, 2023

Amit Ghosh 11:36 AM IST

https://www.tradingview.com/x/
sWllzDRi/
TradingView
Amit Ghosh published on TradingVicw.cOm, Sep 11, 2023 11:36 UTC+5:30

JrDAL SIEL & PWR, 15, NSE O715.20 H715.95 L714.20 C715.65 -0.55 (-0.08%:)
Stop Losss
2. 0)
BB
20, cloe, 055
n02 02) zn4.37 08.1. 718.0

Vol 33.707

Entry
714.0

712.0

710.00

708.0

706.0

704.00

702.00

700.0

698.0

696.0

B8 %8 (20, close, 2) 0.84

1.00

05

11:0 12:00 13:0 14:00 11 11:00 12:0 13:0 12

T/ TradingView

This image shows the Entropy trade that


was triggered a few minutes back.

1 min left in chapter 56%


https://www.tradingview.com/x/
ajoZtCdH/
TradingView
Amit Ghosh published on TradingView.com, Sep 11, 2023 11:39 UTC•5:30

JNDAL STEEL & PWR. 15, NSE O H INF


BE (20, close, 1, 0) 705.70 712.81
698.59
Stop Losss
CMA O0.
doe. 0, SMA, 20) 718.0
SAR (0.02, 0.02, 0.2) 70437

716.00

Entry
714.5

712.00

710.0

Entry Trigger
708.0N

706.0

The next candle 704.00

702.0M

696.0

BB %8 (20, close, 2) 0.81

0.50

0.00

11:00 12:00 13:00 14:00 11 11:00 12:00 13:00

T7 TradingView

This image provides a more detailed view


of the situation.
Notice that once the entry was triggered, the
subsequent candle didn't breach the candle's
low that initiated the sell signal. Instead, it
formed what's known as an inside bar.
Now, let's break this down. An inside bar typ
ically signals indecision in the market. More
over, the fact that it didn't immediately break
below the low of the preceding candle suggests
a lack of bearish momentum. However, what's
particularly intriguing is the behavior of the
candle labeled as "The next candle."

1 min left in chapter 56%


This candlemade an attempt to move upward
but ended up forming a pin bar. Essentially, it
indicates that the bulls tried to push the price
higher, but it also signifies that the bears,
while not managing to drive the price lower,
are putting up resistance against an upward
move.

Amit Ghosh 11:48 AM IST


1. Bears haven't managed to manipulate
the price lower.
2. Those bearish forces are stubbornly
resisting any upward movement!
3. So, our strategy should align with this.
We need to maintain our short posi
tion.
4. However, we must be vigilant and ac
tively manage it because the Bulls are
still active in the market. We can't
simply adopt a "sell and forget" ap
proach.

That said, it does indicate that this symbol


may not be the best choice for a short position.
Therefore, consider either scalping or manag
ing itaggressively.

https://www.tradingview.com/x/
AzarZdtW/

1 min left inchapter 56%


TradingView
Amit_Ghosh published on Tradingiew.com, Sep 11, 2023 11:52 UTC+5:30

JINDAL STEEL & PWR, 15, NSE O H L INF


ose , 0) 06.26 713.23 699.29 Stop Losss
D
EMA (20, cdose, 0, SMA, 20) 708.2
705.57 718.00
SAR (O.02, 0.02, 0.2)

716.00

Entry
714.0

711.9

710.0

708.0

706.00

702.0

700.0

698.0

BB %B (20, close, 2)

1:0 12:00 13:00 11:0

T/ TradingView

The ongoing battle between bulls and bears


has created an intriguing time-compression
trade opportunity. It's forming a pennant pat
tern! This implies that during this side
ways consolidation, which is leaning towards
a downward trend (with the bears gradually
gaining the upper hand), there's a significant
likelihood of a sudden event on the horizon.
This sudden event could very well determine
the ultimate victor between the bulls and
bears! It's poised to culminate in either a
breakout or a breakdown.
We're not overly concerned about potential
breakouts because we remain vigilant and are
actively keeping an eye on our stop-loss Or
ders.
And in this case, the bears have emerged vic
torious!

1 min left in chapter 57%


https://www.tradingview.com/
x/2qzvizEL/
w TradingView
Amit Ghosh published on TradingVicw.com, Sep 11, 2023 11:56 UTC+5:30

JINDAL STEEL A PWR. 15. NSE o H INF


699.27
BE (20, close, 1, 0) 706.18 713.09 Stop Losss
CMA 20
de. 0, SMA, 20)
718.0
SAR (0.02, 0.02, 0.2) 705 57

716.00

Entry
714.0

712.00

710.20

708.0

706.0

704.00

702.0M

700.0

696.0

BB SB (20, close. 2) 0.65

0.50

0.00

11:0 12:00 13:00 14:00 11:0

Tadineview

OverLotting Condition
One of the most intriguing aspects of this
trade is what we call the "Overlotting Condi
tion."

In our typical setup, we usually set our stop


loss at the day's high, which often results in a
relatively high stop loss amount. However, in
this particular case, our stop loss is consider
ably smaller due to our training approach.
This opens up an opportunity for us to take
larger positions in terms of position sizing. Let
me breakit down in simpler terms:

Let's say our initial stop loss would normally


cost us 5000INR, and the lot size of the stock

1 min left in chapter 57%


is 500, meaning our stop loss is set at 10
points. Now, if our current stop loss is only 5
points,we have the potential to double our lot
size, effectively taking a larger position.

The more this stock falls, the more the


chance that it will rise back up.
the context of the overlotting strat
Now, In
egy, thepyramid approach extends to the exit
strategy as well. The fundamental idea is that
as the stock's price falls, there is an increased
probability of it eventually rebounding from
certain support levels.
To take advantage of this potential for rever
sals and to better manage position sizing and
risk, the overlotting approach involves sys
tematically offloading additional lots of the
position at these support levels.
By progressively reducing the position size as
the stock approaches and bounces off these
support levels, traders can exert greater con
trol over their trades.
This not only optimizes risk management but
alsoallows for capitalizing on potential rever
sals ina more strategic manner.

In essence, the pyramid exit approach in over


plotting involves scaling out of the trade at
specific support levels, aligning with the belief

1 min left in chapter 57%


that these levels offer opportunities for price
reversals and thereby improving overalltrade
management.
So, when we talk about overlotting rules, it's
kind of like a pyramid strategy when it comes
to exiting the market, you know whatImean?

Here's how it goes:


1.First, the bears, they're going to lock
in their profits.
2. Then, the Bulls, they're gonna jump

back in, making a bet that the market


will retrace.
3. Now, the Bears, they've got a bunch
of stop losses in place, which means
there aren't as many of them in the
game.

https://www.tradingview.com/x/
zTW4ckKP/
w TradingView

1 min left in chapter 58%


UTC+5:30
Amit_Ghosh published on TradingView.com, Sep 11, 2023 11:59

L
Stop Losss
B8 (20,
doe, , 01 208.02
718.00
SAR (0.02.0.02, 0.2) 705.57
Vol 175.649K
716.0

Entry
714.0

712.0

709.30

708.00

704.00
Target I
TMiddle Rollingor Randl

700.0

BB SB (20, close, 2) 0.62

1.0

14:00 13:00 14:00

T/ TradingView

On the flip side, the bulls have tighter stop


losses, so there's a higher number of them in
the mix.
In a nutshell, it's like the bears fall into this
mean reversion psychology trap. So, the ques
tion is, why not factor in that psychological as
pect here?

Although We are trailing the stop loss.

https://www.tradingview.com/x/
Pgwmrs17/
TradingView

1 min left in chapter 58%


UTC+5:30
Amit_Ghosh published on TradingView.com, Sep 11, 2023 12:03

Stop Losss
BB (20, close, 2, 0)CMA
20)
SAR 718.00
(0 02 002, 02) 706 68
Vol 21.341k

716.0

KEntry
Current Trailing Ston I oss 714.00

712.0

710.00

708.6

706.0

704.0
Target I [Middle Bollinger Band]

702.0

700.0N

698.0

BB SB (20, cdose, 2) 0.58

1.0

14:0 11:00 12:00

T7 radingview

The trailing stop loss is currently quite close


to the entry point due to the significant drop
that occurred in a single candle. Therefore, it
might be a good idea to consider reducing the
position size by selling off some of the overex
tended positions, don't you think?

Himanshu Chawla 12:06 PM IST


you have explained it veryyyyyy well !!!
@
thanks dexter

Amit Ghosh 12:06 PM IST

https://www.tradingview.com/x!
gnKoQ08g/
TradingView

1 min left in chapter 58%


Amit_Ghosh published on IradingView.com, Sep 11, 2023 12:06 UTC+5:30

0 0 AA 712 17 699.71
Stop Losss
BB (20, cdose, Z, 07 s
718.00
SAR (0.02. 0.02. 0.2) 719.45
Vol 86.021h

716.0

Entry
714.00

712.0

710.00

Current Trailing Stop Loss 708.0

704.0
Target I [Middle Bollinger Band]

702.0

Target Il [PSAR]
700.0

698.0

RR SB (20., dose, 2) 0.48

1.0

14:0 11:00 12:00 13:0%

T7 TradingView

Now, We areat Target 2!

Managing the Trailing Stop Loss

Amit Ghosh 12:08 PM IST


Our current approach for setting the Trail
ing Stop Loss involves following the weekend
strategy, which tells us to shift the stop loss to
the high of the previous candle's high.
However,it's important to note that when
the target level is hit, we initiate another
risk management mechanism for handling
the Trailing Stop Loss. This two-pronged ap
proach helps us adapt todifferent market con
ditions effectively.

If Target I is achieved:
We move the current trailing loss to the Entry
Price.

1 min left in chapter 59%


If it's a Sell trade and the current trailing
loss is already below the Entry Price, we
keep it as is.
If it's a Buy trade and the current trailing
loss is above the Entry Price, we maintain
the current trailing stop loss.
Ina nutshell, the idea is to minimize potential
profit loss.

Now, if we hit Target II:


We shift the current trailing loss to Target I.

For Sell trades, if the current trailing loss


is lower than Target I, we keep it where it
is.
For Buy trades, if the current trailing loss
is higher than Target I, we don't move it
and maintain the current trailing stop loss.
So, that'show we handle the Current Trailing
Stop Loss in different scenarios.

The Entropy 3BB Strategy is quite complex in


nature if you consider all its rules of
• Entry
• Exit in Terms of Target
• Exit in Terms of Stop LOss

Exit in Terms of Trailing the Stop Loss
Entry, Target, Stop Loss, Trailing Conditions
of Stop Loss - All of them needs extrenmely

1 min left in chapter 59%


detailed analogy on everything that is on the
trading system of Entropy.

https://www.tradingview.com/x/
DtoMIylc/
T TradingView
mit Ghosh published on TradingView.com, Sep 11, 2023 12:13 UTC+5:30

JINDAL STEEL & PWR, 15, NSE O

BB (20, close, 1, 0) 706.41 713.14 699.68 Stop Losss

SMA, 20) 718.0


SAR (0.02, 0.02, 0.2) 719.45
Vol 280.909K
716.0

Fnt
714.0

712.0

710.0

708.0

706.0

704.0
Target I [Middle Bollinger Band]

702.0N

Tarvet I [PSAR]Current Trailing Stop Loss


700.0

698.0

Middle Bollinger
Target
I

BB XB (20, close, 2) 0.46

17 radingView

Target 3 is hit!

It has touched the Middle Bollinger Band of


3SD Bollinger Band. So, We shifted our Cur
rent Trailing Stop Loss again.

Amit Ghosh 12:19 PM IST


1. 3SD Bollinger Band
2. 2SD Bollinger Band
3. Parabolic SAR

4. Volume

Each of these Indicators is a part of the En


opy trading system carrying gravity of their

1 min left in chapter 59%


own and then comes Price Action which in
cudes Each of the Candles. Now, Who will get
more gravity is up tothe trader to decide.

https://www.tradingview.com/x/
panNQgUw/
TradingView
Amit Ghosh published on TradingView.com, Sep 11, 2023 12:20 UTC+5:30

JINDAL STEE a, PWR, 15, NSE O705.80 H7O8.35 L705.50 C708.30 -2.40 (+0.34%)
713.43 700.28
Oe
RR ) 706.85 Stop Losss

EMA (Q20,cdoe, O,

Vl A.00TK
, S U.
U.2)
07.86 718.0

716.0

Entry
714.00

712.0

710.0K

Exit [Trailing Stop Loss Hit]

706.0

704.0
Target [Middle Bollinger Band]
I

702.0

Target I [PSAR]
Current Trailing Stop Loss

698.00

Target ll [Middle Bollinger] 696.0N

BB 2B (20. cdose, 2) 0.56

0.57

13:00 14:00 12:00

T7 TradingView

In the theory of Price Action, the first 15 min


utes are very important.
Absolutely, you can't miss that big 15-minute
candle on the chart. And you know what's in
teresting? There's actually a price action strat
egy called the Opening Range Breakout that's
specifically designed to take advantage of situ
ations like this!
You can read about that here -> https://
unofficed.com/courses/time-compression
trading/lessons/planning-day-trading-with
limit-orders-and-tradingviewl
1 min left in chapter 60%
https://www.tradingview.com/x/kqbtwokE/
7 TradingView
Amit Ghosh published on TIradingVicw.com, Sep 11, 2023 12:26 UTC+5:30
JINDAL STEE a PWR, 15, NSE O705.80 H709.75 L705.50 C708.80 -2.90 (-0.418)
Stop Losss
BB (20, coe. 2.0 .0
07.5 718.0

Vol 75.72g

716.0

Entry
714.00

712.0

710.0

706.0
Exit [Case I

z02-0

700-0

Inside Bar
698.0

696.0N

BB SB (20, cdose, 2) O.57

0.5

13:00 14:00 12:0 13:00 14:00 11:00 12:00 13:00

17 TradingView

Revisiting theORB Strategy


Let's revisit the Opening Range Breakout
(ORB) strategy -

Imagine this scenario: You're tracking a stock,


and it suddenly experiences a significant gap
either upward or downward in its price.
What's your next move? Do you let it ride, or
doyou take action? Well, most traders choose
the latter option, and that's where the ORB
strategy comes into play.
The ORB strategy is all about seizing oppor
tunities when stocks open with substantial
gaps. These gaps often signify a unique set
of circumstances that demand special atten

1 min left in chapter 60%


tion. Let's break down how this strategy works
using a recent case study featuring MRF.
Case Study: MRF Buy Setup
Let's set the stage: It's a trading day, and MRF,
a popular stock, opens with a notable gap up
in its price. Here's what we did to make the
most of this situation:
O Search symbol 5m v Views Display Studies Layout

:
MRF o.74246.90 H:74350.00 V:34
c74350.00 L: 74246.90 D-06-29-2018 13:30

- 74500

74000

73500

73000

13:00 400 6/29 10:00 11:00 12:00 13:00 14:00

1D 5D 1M 3M 6M YTD 5Y AIl

Waiting Patiently:
The first step in the ORB strategy is patience.
We waited for the first 5-minute candlestick to
form. Yes,you read that right, just 5 minutes!
Simple Rules:
The rules for this strategy are straightforward:
• Buy when the high of the 5-minute candle
is broken.
Sell when the low of the 5-minute candle is
broken.
Focused on Buying:

1 min left in chapter 60%


In this particular case, our goal was to buy
MRE. So, even if the sell order triggered mo
mentarily and hit the stop loss, we remained
on track with our buying strategy.

Here is the trade setup as per the theory of


-
Opening Range Breakout

https://www.tradingview.com/x/
GOmxislM/
TradingView
Amit Ghosh published on TradingView.com, Sep 11, 2023 12:30 UTC+5:30
JINDAL STEEL & PWR, 15, NSE O708.25 H708.35 L708.00 C708.35 -0.35 (-0.05%)

719.00

718.00

717.0

716.0

715.0

714.00

713.00

712.0

711.00

710.0

709.0

Bay if it breaks 708.3

707.0

706.0

705.0

704.0

703.0

702.0

Sell if it breaks 701.0

700.0

699.0

698.0

12:00 13:00 14:00 11:0 12:00 13:00

7
Tadingview

Revisiting Inside Bar Theory


https://www.tradingview.com/x/
U4MMd7XJ/
w TradingView

1 min left in chapter 61%


Amit Ghosh published on Tradingiew.com, Sep 11, 2023 12:34 UTC+5:30
JNDAL STEEL & PWR, 15, NSE O708.25 H709.10 L708.00 C708.55 -0.55 (-0.08%)

719.00

717.0

716.0

715.0

714.0

713.0

712.0

7116

710.0

709.0
708.5

707.0
Buy if it breaks

705.0

704.0
Inside Bar
703.0

702.0

Sell if it breaks 701.0

699.0

698.0

697.0

696.0

14:00 12:00 13:00 11:00 2:00 13:00

T7 TradingView

But, When You know the theory of the Inside


Bar, You get concerned seeing the inside bar
immediately after that 15m candle.

It shortens our risk. The stop loss becomes


lower.

Itshortens our entry as well! It shouts - There


is more compression here!
But, if you follow
the Price Action Theory, It
has already indicated that it has higher chance
of breaking its upside! Guess When and How?

https://www.tradingview.com/
x/5cSxrWsF/
TradingView

1 min left in chapter 61%


Amit Ghosh published on Tradingiew.com, Sep 11, 2023 12:34 UTC+5:30
JNDAL STEEL & PWR, 15, NSE O708.25 H709.10 L708.00 C708.55 -0.55 (-0.08%)

719.00

717.0

716.0

715.0

714.0

713.0

712.0

7116

710.0

709.0
708.5

707.0
Buy if it breaks

705.0

704.0
Inside Bar
703.0

702.0

Sell if it breaks 701.0

699.0

698.0

697.0

696.0

14:00 12:00 13:00 11:00 2:00 13:00

T7 TradingView

But, When You know the theory of the Inside


Bar, You get concerned seeing the inside bar
immediately after that 15m candle.

It shortens our risk. The stop loss becomes


lower.

Itshortens our entry as well! It shouts - There


is more compression here!
But, if you follow
the Price Action Theory, It
has already indicated that it has higher chance
of breaking its upside! Guess When and How?

https://www.tradingview.com/
x/5cSxrWsF/
TradingView

1 min left in chapter 61%


Amit Ghosh published on TradingView.com, Sep 11, 2023 12:36 UTC+5:30
JNDAL STEEL & PWR, 15, NSE O708.25 H709.45 L708.00 C709.15 +1.15 (-0.16%)

719.00

717.0

716.00

715.0

714.0

713.0

712.0

7116

710.0

709.1
08:07

708.0

707.0
Pay if it hreaks

705.0

Inside Bar 704.0

703.0

702.0

Scll if it breaks 701.0

700.0
Wick
699.0

697.0

696.0

14:00 12:00 13:00 4:01 11:00 12:00 13:00

T7 TradingView

Notice the formidable wick in the first 15 min


utes that told bears to stay out and the bulls
declared We are not going to let it fall down!
A fascinating aspect of Price Action is
that historical support and resistance
levels often transition into new support
and resistance levels.
So, A trader who follows the principles of
Price Action must shift the trailing stop loss
to the high of the Inside Bar when that level
broke earlier.

https://www.tradingview.com/x!
WOHs3bao/
TradingView

1 min left in chapter 62%


UTC+5:30
c
onosh published on IradingVicw.com, Sep 11, 2023 12:38
L708.00
0722 7131 200.73 9.45 Stop Losss
BB (20, close, 2, 0)
CA 201 z07 98
D 718.00
SAR 02 002. 02) Z18 82
Vol 30.249h

716.0

Entry
714.00

712.0

710.0
709.4

708.0

Exit [Case ]
704.0

702.0

700.0

Inside Bar
698.0

BB SB (20, close, 2) 0.59

1.0

4:00 11:00 13:00

T/ TradingView

This levelof extra details translated into a bet


ter amount of money.
This is why thiscomes to the list of "Maybes".

Revisiting ReTest Theory


The Retest theory becomes relevant when a
stock nears a previous support or resistance
level, especially when a former resistance level
evolves into a support level following a suc
cessful breach.
Here's the process:
1. Previous Support and Resis
tance: Traders often identify criti
cal levels in technical analysis where
a stock has historically either found
support, leading to price rebounds, or
encountered resistance, causing price

1 min left in chapter 62%


stall or reversal. These levels serve as
vital reference points.
2. Resilient Support: In certain sce
narios, a prior resistance level, once
conquered, transforms into a new
support level. This transition can be a
game-changer in market dynamics.
3. The Reversal: When the stock's
price revisits this newly established
support level, it can act as a spring
board. In other words, the stock may
experience a rebound in price from
this level, propelling it upward.

In essence, this is precisely what occurred in


this situation.
The stock revisited a former resistance, now
acting as support, and subsequently regained
momentum, surging upward. This phenom
enon underscores the influence of historical
price levels on future price action in the world
of trading.

Revisiting Bounce Theory

https://www.tradingview.com/x/
WZAGn2pc/

T TradingView
1 min left in chapter 62%
Amit Ghosh published on TradingView.com, Sep 11, 2023 12:41
41 UTC+5:30

JNDAL STEEL & PWR, 15, NSE O708.25 H709.50 L'08.00 C709.45 +1.45 (-0.20%)

719.00

717.0

716.00

715.0

714.0

713.0

712.0

7116

710.0

Support [Re-Test Theory]


708.0

707.0

Support I [Re-Test Theory]


705.0

704.0

703.0

702.0

701.0

700.0

699.0

697.0N

696.0

13:00 14:00 12:00 13:00 4:00 11:00 12:00 13:00

T7 radingview

Not only that. One can notice the high of the


15-minute candle is also contributing as a de
cisive level for intraday today!

You can read about Retest theory here ->


https://www.udemy.com/course/support
and-resistance-theory-and-application/

https://www.tradingview.com/
x/6Tks6oaf/
T TradingView

1 min left in chapter 63%


Amit Ghosh published on TradingVicw.com, Sep 11, 2023 12:45 UTC

JINDAL STEEL & PWR. 15, NSE O708,25 H709,50 L708,00 CIO9,00 +1,00 (-0.14%)

719.00

717.0

716.00

715.0

714.0

713.0

/Wick 2

712.0

7116

710.0

709.00

Support Il [Re-Test Theory]


708.0

707.0

7 0

Support
I
[Re-Test Theory] 705.0

704.0

703.0

702.0

701.0

700.0

699.0

697.0

696.0

11:00 12:00 11:00 13:00 14:00

T7 TradingView

The most important levels of the current chart


are
The high of the Wick 2
The low of the Wick 1
The wiclk that happens after a fall is a sign of
Short Covering more than a Long Buildup. It
tells that shorter have exited.
Wick 1 is a sign of short covering.

Amit Ghosh 12:46 PM IST


a
Unless there's significant long buildup,the
chances of a stock rebounding are minimal.
The key question is: What led to Wick 2, and
how can we identify a long buildup, indicating
a potential buying opportunity?

The answer lies in the Bounce Theory, which


you can learn more about here: https:/L
unofficed.com/courses/bounce/lessons/
downtrend/

1 min left in chapter 63%


At its core, price action analysis relies heavily
on trend analysis, which helps us understand
the general direction a stock is taking. In the
stock market, trends are typically categorized
into three fundamental types:
Uptrend: Prices generally move upward.
Downtrend: Prices predominantly move
downward.
Sideways Trend: Prices exhibit minimal
upward or downward movement, making
it challenging to discern a clear direction.
The Bounce Theory delves into trend analy
sis and provides a structured framework for
its interpretation and application. The current
scenario is a classic case of Downtrend.
Wick 2 typically occurs because new short
sellers are betting on the continuation of a
downtrend, marking it as a "Lower High."
However, when this "Lower High" forms near
a support
level, it becomes a vulnerable point.

This signalsthat it's not advisable to enter an


other short trade, as the probability of success,
the chance of being correct, or the likelihood
of further price decline is relatively low.
Here's the key moment:

When Wick 2 is broken by bullish


movements, it indicates a Long

1 min left in chapter 63%


Buildup. This suggests that buyers are
entering the market, potentially signal
ing an ideal time to consider a long po
sition.

Short Covering and Long


Buildup in Relation to
Wick Patterns
Short Covering
This refers to a situation where traders
investors who have previously taken short po
sitions (betting that a stock's price would fall)
decide to buy back those positions. They do
this because they anticipate that the stock's
price may rise, and they want to close
their short positions before incurring further
losses. Short covering can lead to a rapid in
crease in buying activity and drive the stock's
price higher.
Long Buildup
On the flip side, long buildup occurs when
traders start accumulating long positions (an
ticipating that a stock's price will increase).
This accumulation can be driven by positive
sentiment, strong fundamentals, or technical
indicators suggesting an upward move. Long
buildup can resultin sustained buying pres
sure, pushing the stock's price upward over
time.

1 min left in chapter 64%


Connection with Wick Patterns
Wick patterns, such as long lower wicks or
long upper wicks, can provide valuable in
sights into short covering and long buildup.
Long Lower Wick
A long lower wick, especially after a down
trend, can indicate that there was substantial
buying interest when the price touched a low
point. This may signal potential short cover
ing as traders rush to exit their short posi
tions, fearing a price reversal.
Long Upper Wick
Conversely, a long upper wick, especially after
uptrend, suggests that there was consider
able selling pressure when the price reached a
high point. This might signify the beginning of
a long buildup as traders look for an opportu
nity to enter long positions at lower prices.

In summary, wick patterns in candlestick


charts can serve as visual cues for short cover
ing and long buildup. Recognizing these pat
terns alongside trend analysis can help traders
make informed decisions about their posi
tions in the market.

https://www.tradingview.com/
x/32xab8Br/

1 min left in chapter 64%


TradingView
Amit_Ghosh published on IradingView.com, Sep 11, 2023 12:51 UTCo5:30
JINDAL
STE&PWR, 15, NSE O709.00 H710.50 L'09.00 C709.70 -0.70 (-0.10%
INF

719.0

718.0

717.00

716.0

715.0

714.0

713.0
Wick 2
712.0

711.C

Support ll [Re-Test Theory]

707.0

706.0

Support I [Re-Test Theory] 705.0

704.0

703.0

702.0

Wick 1

700.0

699.0

698.00

697.0

11:00 12:00 13:0 14:00

T/ TradingView

Now it has broken.


But look at the candle! It is making pin bar i.e.
struggling with bears. It's weak!

The Reversal Buy Trade


Trade-wise, this is the current correct trade -
https://www.tradingview.com/x/x7QA4AbJ/

TradingView

1 min left in chapter 64%


Amit Ghosh published on TradingVicw.com, Sep 11, 2023 12:52 UTC+ 5:30

JINDAL STEEL & PWR. 15, NSE O709,00 H710,50 L709,00 CIO9,80 -0,80 (-0.11%)

719.00

717.0

716.00

715.0

714.0

Z13.0

712.0

7110

Buy Level
o7:25

Support I [Re-Test Theory] 708.

707.0

| Stop Loss

704.0

703.0

202.0

701.0

699.0

697.0

696.0

11:00
11 1:0 12:00 4:00 12:0 13:00 14:0

T/ TradingView

While it might be tempting to consider this


trade, it's essential to exercise caution. Here's
why:
1. Thepresence of a significant wick
suggests that the bulls are currently
lacking strength in the market, poten
tially reducing the chances of a suc
cessful trade.
2. When both bulls and bears exhibit
weakness, it often leads to a mar
ket consolidation, where prices move
within a narrow range. Thiscan make
it challenging to achieve substantial
gains.
3. Additionally, it's crucial to consider
the timing. The time is currently
12:50, and our market operates from
9:15 to 15:30. During this mid-market
period, trading volumes tend to de
crease as significant institutions, ca

1 min left in chapter 65%


pable of influencing market moves,
often take a break for lunch. This
lunch break typically aligns with the
Europe Opening around 12:30.
While it's worth noting that the likelihood of
success in this trade might be relatively low
due to the described factors, it's equally im
portant to consider that the associated risk is
minimal.

Furthernmore, given our previous profits from


the preceding short trade, it can be deemed an
acceptable risk to take.

Revisiting the Importance


of Volume

https://www.tradingview.com/x!
LDRLg3Tf/
TradingView

1 min left in chapter 65%


Amit_Ghosh published on IradingView.com, Sep 11, 2023 12:56 UTC+5:30

10.50 L709.
Stop Losss
BB (20, close, 2, 0)
SWA. 20) 708.08
718.00
SAR (0.02. 0.02. 0.2) 718.51
Vol 34.824h

716.0

Entry
714.00

712.0

710.0
709.4

z08.0

706.0

Eát [Case II]


704.0

707.00

700.0N

Volume 698.0

BB SB (20, cdose, 2)) 0.57

1.0

13:0 14:00 11:0 12:00

17 TradingView

Here's another interesting case involving


some potential exit strategies that may have
yielded an even more favorable outcome. No
tably, a significant surge in trading volunme oc
curred precisely as the wick was in the process
of forming.

https://www.tradingview.com/x/
LrDi3CIS/
17 TradingView
Amit Ghosh published on TradingView.com, Sep 11, 2023 12:58 UTC+5:30
JINDAL STEEL & PWR, 15, NSE O709.00 H710.50 L709.00 C

INE
BB 20, close, 1, 0) 707.57 13.96 701.8 Stop Losss

718.0
SAR (0.02, 0.02, 0.2) 718.51

716.0

Entry
714.00

712-00

710.0

01:09
708.0

Edt JCase ll]| 704.0

YIntraday Buyer's Candle


702.0

Intraday Buyer Candle's Volume


700.0

Volume 698.0

BB S8 (20, close, 2) 0.57

13:0 11:0 2:00 13:00 11:00 12:0 13:00

17 TradingVievw

1 min left in chapter 65%


The intriguing observation here is that the
volume during this particular trading moment
closely matches the volume seen during the
initial intraday surge in Jindal Steel during
the early minutes of the market.

The outcome of the Buy Trade


As you dive deeper into the world of finan
cial markets, you come to realize that psy
chology plays a pivotal role in driving mar
ket dynamics. Every individual indicator
and every candlestick, including Price
Action, deserves equal respect as they
collectively contribute to the decision
making process in trading.

Amit Ghosh 4:56 PM IST

Well.

https://www.tradingview.com/x/
VMsxJI84/

1 min left in chapter 65%


TradingView
Anit Ghtosh putisded on Tradinglencom, Ssp 1, 2023 65% UTC-530

PWR,15, NSE
JNOAL
OHLEC
STEEL &
ING

719.00

718.0

717

716.0

715.00

714.0

712.7

7120

711.0

710.00
Buy Level

709.0

Support
| lelest Theory] 703.0

707.0

Stop Loss 706.00

7O5.0

74.0

708.0

11:0 12:0 13%0 1400 1


11-0 1200 13:00 4-0

Remarkably, even with the odds stacked


against it, the Buy trade managed to unfold
seamlessly, thanks toa stroke of luck.

1 min left in chapter 66%


Entropy Alpha Strategy

AmitGhosh 5:09 PM IST


The Buy trade setup you've just witnessed is
referred toas the Entropy Alpha Strategy.
As You have seen and understood from this
discussion, This strategy involves a sophisti
cated combination of various indicators with
different levels of complexity, each assigned
weights based on personal preferences.
To streamline and automate this process,
Regression Analysis and K-means clustering
are utilized to generate signals automatically.
However, the in-depth discussion regarding
these quantitative methods and their appli
cation is better suited for another day, Our
current conversation revolves around under
standing the synergy of the Entropy Alpha
Strategy with other trading systems.

When a stock that has been triggered for


selling in the Entropy strategy subsequently
serves as a buy trigger in the Entropy Alpha
strategy, it indicates that my Trailing Stop
Loss (TSL) has been hit in the Entropy Strat
egy, thus triggering the Stop and Reverse
(SAR) mechanism, effectively reversing the
trade.

1 min left in chapter 66%


Amit Ghosh 7:06 PM IST
The buy trade can be caught by seeing the Vol
ume Profile as well. It has been discussed in
the section of Failed 3BB Strategy. You can al
ternatively revisit the same from this link -
https://unofficed.com/courses/entropy/
lessons/bollinger-bands-trading-strategy
failed-gbb/

Levels are Eternal


September 12, 2023

Amit Ghosh 12: 19 PM IST


As told multiple times earlier, In the realm
of Price Action trading, previous price levels
hold significant importance.
When the same entry point and stop loss are
employed, it effectively ends up replicating the
same trade scenario as that of the previous
day.

https://www.tradingview.com/x/
CYjQakPgl
TradingView

1 min left in chapter 66%


Amit_Ghosh published on TradingView.com, Sep 12, 2023 12:20 UTC+5:30

JNDAL
SIe 99 712.30 697.68
Stop LossS
BB (20, close, 2, 0)

718.00
02.19

Vol 14.029h
716.00

714.00

712 00

710.00

708.00

706.00

Exit [Case I]
704.00

Inside Bar

696.0

694.0

691.75

BB 88 (20, close, 2) 0.05


1.0

0.5

2:00 13:0 14:00 13:00 12:00

17 TradingView

Nevertheless, it's essential to note that the


trade's dynamics may differ from the previ
ous day due to the absence of an inside bar
formation. Currently, the trade is potentially
generating higher profits as the price has ex
perienced a more substantial decline.
Market conditions and price patterns
evolve, presenting traders with varying oppor
tunities and outcomes.

https://www.tradingview.com/x/
HhHjX6QD/
TradingView

1 min left in chapter 67%


Amit_Ghosh published on Tradingiew.com, Sep 12, 2023 12:21 UTC5:30

JNDAL C
SI 98 712.30 697.67
BB
Stop Losss
(20, close, 2, 0)
718.00

Vol 716.00

Entry
714.00

712 00

710.00

708.00

706.00

704.00

694.0

691.6

BB XB (20, close, 2) 0.04

1.0

0.5

13:00 14:00 13:00 13:00

1 TradineView

Learning reading speed 67%


Appendix A -3BB
Scanner
The 3BB Scanner simply scans for the stocks
which closes above the 3 Standard De
viation Upper Bollinger Band in 15
minute timeframe. We use this as a base
watchlist for the stocks that we can trade with
3BB Bollinger Bands Strategy.

To maintain liquidity, It scans the stocks


which are in derivatives.
3BB Scanners and in general, Entropy
does not work when there is fundamental
news.
Now, the entire scanner's primary base point
is Bollinger Band.
3BB Scanner APP 2:16 PM
Watchlist - BHEL
3BB Scanner APP 2:46 PM
Watchlist - ICICIPRULI,COLPAL
3BB Scanner APP 3:16 PM
Watchlist - INFY,TITAN

The above scanner is made for the community


of Unofficed and is made using Python. But
there are alternative scanners available in the
popular sites like Chartink.

2BB Scanner - Modified


This following scanner is made by a fellow
trader from Unofficed who was experimenting
1 min left in chapter 67%
with 2 Standard Deviation Bollinger Bands. It
is scanning the last three candles to stay above
the 28D Bollinger Bands to generate a signal.
This below image shows the code logic of a
modified version of the 2BB scanner made in
Chartink. -
Stock passes all of the below filters in futures segment:
-3] 15 minute High Greater than [-3] 15 minute Upper Bollinger band( 20,2 ) Ox

[-2] 15 minute High Greater than [-2] 15 minute Upper Bollinger band( 20,2 ) Ox
(-1] 15 minute High Greater than [-1] 15 minute Upper Bollinger band( 20,2 ) H ox
Latest Close Greater than Number 200
Latest Close Less than Number 100o

There is also a logic added to check for liquid


ity. It is common practice. Here is the code
group which You can copy and paste to get the
same results -
({33489} ( [-3] 15 minute high > [-3] 15 minute
upper bollinger band (20,2 ) and [-2] 15 minute
high > [-2] 15 minuteupper bollinger band (20,2 )
and [-1] 15 minute high > [-1] 15 minute upper
bollinger band ( 20,2 ) and latest close > 200 and
latest close < 1O00))
As the trading community grows with the
basic idea of the use, It always end up mod
ifying any strategy as it sees fit. Like Dar
win's Natural Selection Theory, everyone is in
search of more refined method.
Anyways, the results generated from this
scanner on the date and time as it is being doc
umented is as follows -

1 min left in chapter 67%


Symbol % Chg Price Volume
TATAMO 14,562,07
1 TORS 1.88% 618.75

15,777,73
2 ZEEL 1.69% 276 8

3 TATAPOWER 1.64% 234.95 6,716,135

4 POWERGRID 1.45% 248.05 6,893,604


5 EXIDEIND 0.94% 267.2 1,644,032
MCDOWELL
6 o.85% 995.15 550,173

-0.03
7 GLENMARK % 797.45 1,111,577

APOLLO -0.79
8 TYRE % 396.35 1,570,571

-1.40 11,481,44
9 ADANIPORTS %
776.1

3BB Scanner - Modified


Stock passes all of the below filters in futures segment:
[-3] 15 minute High Greater than [-3] 15 minute Upper Bollinger band( 20,3 ) ox
I-2] 15 minute High Greater than [-2] 15 minute Upper Bollinger band( 20,3 ) Ox

[-1] 15 minute High Greater than [-1] 15 minute Upper Bollinger band( 20,3 ) Ox

Latest Close Greater than Number 200 Ox


Latest Close Less than Number 1000 ox

Now, What if we extend the same set of rules


to 3SD Bollinger Bands instead of 2SD?
It it more refined?
willmake
The results from this scanner will be part
of previous scanner as well?

1 min left in chapter 68%


In this case, ther
%
Chg Price Volume S
14,562,07 I. Symbol
1.88% 618.75 4

15,777,73 EXIDEIND
1.69% 276 8
MCDOWELL
1.64% 234.95 6,716,135 2 N
1.45% 248.05 6,893,604
0.94% 267.2 1,644,032
Anyways, In the e
o.85% 995.15 550,173 further.
-0.03
% 797.45 1,111,577 Beware of F
-0.79
% 396.35
This tool is effect
1,570,571
tions, where stoc
-1.40 11,481,44
% 776.1 mal distribution.
fectiveness in spe
when significant
r - Modified the normal distril

futures segment: In such sce


(-3] 15 minute Upper Bolinger band( 20,3 ) gOx undergo abnc
[-2] 15 minute Upper Bollinger band( 20,3 ) H Ox
(-1] 15 minute Upper Bollinger band( 20,3 ) Ox
ate from its u
er 200
Ox Bollinger Ban
1000 Ox
For instance
extend the same set of rules substantial de
Bands instead of 2SD? embroiled in
tmore refined? price may plu
com
this scanner will be part ence of Bollin
anner as well?

68%
1 min left in chapter
Therefore, it's crucial to keep an eye on exter
nal fundamental news and events that could
impact the market and the effectiveness of
trading strategies involving Bollinger Bands.

1 min left in chapter 69%


Therefore, it's crucial to keep an eye on exter
nal fundamental news and events that could
impact the market and the effectiveness of
trading strategies involving Bollinger Bands.

1 min left in chapter 69%


Appendix B - Backtest
Entropy Alpha Strategy
"Why do you think unsuccessful traders are
obsessed with market analysis? They crave
the sense ofcertainty that analysis appears to
give them. Although few would admit it, the
truth is that the typical trader wants to be
right on everysingle trade. He is desperately
trying to create certainty where it just doesn't
exist." -Mark Douglas
we
In Entropy, take leverage of the fact that
the stock market follows the normal dis
tribution and we apply the methods using
Bollinger Bands and other means of mean
reversion. The Entropy Alpha Strategy is an
exclusive trading approach based on theprin
ciples of the Entropy System, which revolves
around probability distribution theories, with
Bollinger Bands serving as its primary tool.

Here We shallbacktest the list of triggers that


are updated in the website of Unofficed.com
which follows the method of Entropy and is
shared live during market time.
The list has two columns - Time and Name of
the stocks.

1 min left in chapter 70%


In this Appendix, We are looking to step
into the world of backtesting and will
reinforce the faith in this system. There
is extensive use of Python Program
ming Language which is not discussed
in detail. (That's why it's called Appen
dix right?)

I. Triggered at Stocks
Tue Apr 25
2023, 15:18 PERSISTENT

Tue Apr 25
1 2023, 14:47 INDIAMART
Tue Apr 25
2 2023, 10:18 RECLTD
Tue Apr 25 IBULHSGFIN,
3 023, 10:10 BRITANNIA

Tue Apr 25
4 2023, 10:02 BRITANNIA
Mon Apr 24
5 2023, 10:16 | HEROMOTOCO
Fri Apr 21
6 2023, 10:07 APOLLOTYRE

7 Fri Apr 21 ASIANPAINT

1 min left in chapter 70%


2023, 09:58
Thu Apr 20
2023, 15:21 | TATACONSUM
Thu Apr 20
2023, 14:16 BAJAJ-AUTO
1 Thu Apr 20
2023, 12:49 CUB
Thu Apr 20
11 2023, 10:02 ICICIBANK
1 Wed Apr 19
2 2023, 1o:29 COROMANDEL
Wed Apr 19
3 2023, 10:06 |TATASTEEL
1 Wed Apr 19
4 2023, 09:16 COFORGE
H
Tue Apr 18
5 2023, 13:31 BANDHANBNK
WHIRLPOOL,
1 Tue Apr 18 GODREJPROP,
6 2023, 10:13 PEL
Tue Apr 18 GODREJPROP,
7 2023, 10:02 PEL

1 min left in chapter 70%


Micro Conditions For
Stabilizing the Strategy
At the time of market opening, the market
remains too volatile because of liquidity.
It disturbs the very fabric of this strategy
which relies on the fact that the Market
conforms to Log Normal Distribution. So,
We start our trade at 9:20 AM. Similarly,
We auto square off at 14:20 PM to avoid
day end's volatility!
• Similarly, Apart from the initial conditions
of entry, exit, and trade management,
Here are two sets of micro conditions that
govern the strategy for the purpose of bet
ter stability and ease of execution.
Changing the parameters of these condi
tionsdoes not alter the core strategy that
much
# Global Conditions
Entry Time Condition: It is an intraday
strategy. So, if the trade is placed only
when if the stock name comes between
9:30 AM to 14:20PM.
Trade type and Stop Loss: It will long the
stock with day's high as target. If the stop
loss does not hit, it will square off the trade
anywayS at 14:5o PM.

1 min left in chapter 71%


#
Trade SpecificConditions

False Positives: If a trade is triggered


within last mins and it again pops up in
15
the scanner, then it will take the first_trig
ger only i.e. A stock can not trigger again
within 15 minutes.
Max Occurrence: A stock can trigger
maximum two times in a day i.e if it trig
gers for the second time, second_trigger
will have minimum 15 minutes of gap be
tween first_trigger.

The KiteConnect APIs


We shall be using Zerodha's Kite Connect API
to back test the given dataset.

We're a Zerodha Partner and if you've signed


up with Ünofficed, then Youll get access to
the raw file used to make this tutorial. Kite
Connect offers REST-1ke HTTP APIs with a
wide range of capabilities which will suffice
Our needs.

Kite Connect 3.0


HTTP/JSON trading and investment APls

1 min left in chapter 72%


Step 1 - Initialization
of Kite Object
AsYou can see from the example of KiteCon

nect Python API from Zerodha's GitHub, the

Step 1

is to create the Kite object

import logging
from kiteconnect import KiteConnect
logging.basicConfig(level=logging.DE
BUG)

kite KiteConnect(api key="y


our_api key")
# Redirect the user to the login url ob
tained
# from kite.login_url), and receive the
request_token
# from theregistered redirect url after the
login flow.
# Once you have the request_token, ob
tain the access token
# as follows.

1 min left in chapter 72%


data = kite.generate_session("request_
token_here", api_secret="your_secret")
kite.set_access_token(datal"access_to
ken"])

Step 2 - Breaking It Apart

For every programming ethics, the theory is


simple. Break apart the data you get to your
preference. Do the operations and then clean
it up! So, here is the plan -
1. Initialization of the data in Pandas
Dataframe.
2. Split the Column "Triggered at" into
"Trigger Date" and "Trigger Time". It is
easier to imagine calculations when things
are broken.
3. Now if you notice the columns like 16
Tue Apr 18 2023, 10:13 am WHIRLPOOL,
GODREJPROP, PEL, it has more than one
stock name in the line.So, as we treat them
as different trades, Lets make them sepa
rate rOWS.

#Initilization of Pandas Dataframe


df = pd.read_csv("entropy_data.csv
#Split the Column "Triggered at" into
"Trigger Date" and "Trigger Time"
1 min left in chapter 72%
df["Trigger Date"],df["Trigger
Time"]=pd.to_datetime(df["Triggered
at"]).dt.date, pd.to_datetime(df["Trig
gered at").dt.time

#Removing the commas in Stock of same


timed entries
## create an empty dataframe to store the
updated rows
new_df = pd.DataFrame(columns=df.col
umns)

## iterate over the rows in the original


dataframe
for index, row in df.iterrows):
## check if the "Stocks (new stocks are
highlighted)" column containsa comma
if "," in row["Stocks (new stocks are
highlighted)"]:
##split the stock names by comna
stocks = row["Stocks (new stocks
are highlighted)"].split(",")
## create a new row for each stock
for stock in stocks:
new IOW = row.copy0

1 min left in chapter 73%


new_row["Stocks (new stocks are
highlighted)"] = stock.strip) # remove
any leading/trailing spaces
new df new_df.ap
pend(new_row, ignore_index=True)
else:
=
new_df new_df. append(row, ig
nore_index=True)
## assign theupdated dataframe to the
original dataframe
df = new df
TheOutput is neat -

Triggered at Count Stocks (new stocks


are highlighted) Trigger Date Trig
ger Timne
Fri Apr 21 2023, 10:07 am
1 APOLLOTYRE
2023-04-21 10:07:00
1 Fri Apr 21 2023, 9:58 am
1 ASIANPAINT 2023-04-21
09:58:0o
2 Thu Apr 20 2023, 3:21 pm
1 TATACONSUM
2023-04-20 15:21:O0

1 min left in chapter 73%


3 Thu Apr 20 2023, 2:16 pm
1 BAJAJ-AUTO 2023-04-20
14:16:00
4 Thu Apr 20 2023, 12:49
pm 1 CUB
2023-04-20 12:49:00

775 Tue Sep 13 2022, 10:03


am 3 DIXON
2022-09-13 10:03:00
776 Tue Sep 13 2022, 10:03
am 3 DRREDDY
2022-09-13 10:03:00
777 Tue Sep 13 2022, 10:03
am 3 HEROMO
TOCO 2022-09-13 10:03:00
778 Tue Sep 13 2022, 10:01
am 2 DRREDDY
2022-09-13 10:01:O0
779 Tue Sep 13 2022, 10:01
am 2 HEROMO
TOCO 2022-09-13 10:01:O0
780rows × 5 columns

1 min left in chapter 74%


Step 3 - Coding the Trade
Specific Conditions
Aswe have the Trigger Date column, We will
scan for the Trade SpecificConditions for each
day. Then we will scan for if there is second
entry with a time difference of less than 15
minutes from the first entry.

That's it.

# Convert the "Triggered at" column to


datetime format
df[Triggered at'] pd.to_date
time(df["Triggered at'], format-'%a %b
%d %Y, %I:%M %p')

# Sort the dataframe by "Triggered at"


column
df.sort _values(Triggered at, inplace=
True)
# Create an empty list to store the dupli
cates
duplicates = []

# Iterate over each stock in the dataframe


for stock in df['Stocks (new stocks are
highlighted)'].unique):

1 min left in chapter 75%


# Subset the dataframe for the current
stock
stock df = df[df['Stocks (new stocks
are highlighted)'] == stock]

# Group the dataframe by "Trigger


Date"
grouped = stock_df.groupby("Trigger
Date')

# Iterate over the groups


for name, group in grouped:
# Keep only the first entry of the
day
group = group[-group.duplicated(
subset-[Trigger Date'], keep=first')]
# Get the index of the first entry
first_idx = group.index[o]
# Check if there is a second entry
a
with time differenceof less than 15 min
utes from the first entry
if len(group) > 1:
secondidx group["Triggered
at'].diff).dropna).idxmax()
time_diff = group.loc[second_idx,
"Triggered at']- group.loc[first_ idx, "Trig
gered at']

1 min left in chapter 75%


if time diff < timedelta(min
utes=15):
# Append the first and second en
triesto the listof duplicates
duplicates.extend(group.loc[[
first_idx, second idx]].to
dict('records'))
else:
# Append only the first entry to
the list of duplicates
duplicates.append(group.loc[
first_idx].to_dict())
else:
# Append only the first entry to the
list of duplicates
duplicates.append(group.loc[
first_idx].to_dict))
Create a new dataframe from the list of
#

duplicates
duplicates_df = pd.DataFrame(dupli
cates)

# Drop the duplicate rows from theorigi


nal dataframe
df.drop_duplicates(subset=["Trigger
Date', 'Stocks (new stocks are high
lighted)'], keep='first', inplace=True)

1 min left inchapter 76%


The Output is neat. It jumps down from 780
rows to 542 rowS -

Triggered at Count Stocks (new stocks


are highlighted) Trigger Date Trig
ger Time
779 2022-09-13 10:01:00
2 HEROMOTOCO
2022-09-13 10:01:O0
778 2022-09-13 10:01:00
2 DRREDDY 2022-09-13
10:01:O0
775 2022-09-13 10:03:00
3 DIXON
2022-09-13 10:03:O0
770 2022-09-13 10:06:O0
5 ITC 2022-09-13
10:06:00
771 2022-O9-13 10:06:00
5 SBICARD 2022-09-13
10:06:00
:

4 2023-04-20 12:49:00
1 CUB 2023-04-20
12:49:00

1 min left in chapter 76%


3 2023-04-20 14:16:00
1 BAJAJ-AUTO 2023-04-20
14:16:00
2 2023-04-20 15:21:00
1 TATACONSUM
2023-04-20 15:21:00
1 2023-04-21 09:58:00
1 ASIANPAINT 2023-04-21
09:58:00
2023-04-21 10:07:00
1 APOLLOTYRE
2023-04-21 10:07:00
× 5 Columns
542 rowS

Step 4 - Coding the


Global Conditions
The current limitation of Stock Broker APIs of
Indian market is that the instrument token of
a derivative keeps changing every month. So,
We are taking the AprilFutures and hence,the
trades of April only for this context
# Filter the data to take the Apr
df_filtered = df[(df["Triggered at'].dt.
time >= pd.Timestamp('o9:30').time()) &
(df["Triggered at].dt.time <= pd.Times
tamp(14:20').time0)]

1 min left in chapter 77%


df filtered df.loc[df[Triggered
at'].dt.strftime('%Y-%m') =='2023-04']
df= df filtered

Step 5 - Let's long with target


To longthe stocks with target. We need to find

Entry The price of the respective deriv


atives of April expiry at that time.
Target The high of therespective deriv
atives of April expiry at that time.

First Let's create an instrument token fetching


function -

instrumentList pd.DataFrame(kite.in
struments())
def get_insToken (tradesymbol,exchange
="NFO"):
if(exchange=="NSE"):
if(tradesymbol=="NIFTY"):
tradesymbol="NIFTY 50"
if(tradesymbol=="BANKNIFTY"):
tradesymbol="NIFTY BANK"
#print(tradesymbol)
#print(exchange)

1 min left in chapter 77%


dataToken = instrumentList[(instru
mentList['tradingsymbol'] == tradesym
bol)&(instru
mentList[I'exchange' ]==exchange)]
return dataToken.instrument_to
ken.iloc[o]
Let's get the entries
#Price At TheParticular Time
import datetime
# Create a function to get the price and
high of a stock at a specific time
def get_stock_data(symbol, time):
# Define the start and end date
start_date = pd.Timestamp(time)
end date = start date + datetime.
timedelta(minutes=5)
# Convert start and end date to string
format
from date = start date.strftime("%Y
%m-%d %H:%M:%S)
# Fetch historical data for the stock
data = kite.historical_data(instrumen
t_token=get insToken(symbol+"23APR
FUT"),

1 min left in chapter 78%


from date=from date,
to_date=from_date,
interval='minute')

# Return the price and high of the


stock at that time
return data[o]['open']
# Add new columns to the DataFrame
df['price]= "

# Iterate over each row of the DataFrame


for index, row in df.iterrows():
# Get the stock symbol and triggered
time
symbol = row['Stocks (new stocks are
highlighted)']
time = row["Triggered at']
Get the price and high of the stock at
#

the triggered time


price= get_stock_data(symbol, time)
#Update the price and high columns
df.at[index,'price'] = price

Note there is a high chance that you will get


this following error

IndexETOr Traceback
(most recent calllast)

1 min left in chapter 78%


Cell In[14], line 34
31time = row["Triggered
at']
33 # Get the price and high of the
stock at thetriggered time
34 price= get _stock_data(symbol,
time)
36 # Update the price and high col
umns
37 df.at[index, 'price'] -price
Cell In[14], line 22,
22
in get_ stock
data(symbol, time)
=
data kite.historical data(instru
16
ment_token=get_insToken(symbol
+"23ARFUT"),
17 from date=from
date,
18 to date=from date,
19 interval='minute')
21 Return the price and high of the
#

stock at that time


---> 22 return data[o]l'open']
IndexError: list index out of range
It means that you may have overlooked the
data fine-tuning process.
Specifically, you are currently backtesting in
traday futures data for the current month.

1 min left in chapter 79%


This is because the Zerodha KiteConnect API
does not permit the retrieval of intraday
data for derivative instruments from previous
months. To rectify this, you should modify
the portion of the code where "23APRFUT" is
specified to match the current month you are
conducting the backtest for.

Additionally, it is advisable to remove data


corresponding to other months from the "en
tropy.csv" file to ensure accurate and relevant
results. We did that programitcally in the line

df filtered df.loc[df["Triggered
at'].dt.strftime("%Y-%m') == '2023-04]
So make sure to change the date there to the
current month You're testing on.
Let's get the targets -

def get high _of _day(kite, df):


high_list = []
for i, row in df.iterrows():
# Get historical data for the trigger
date of the stock
symbol = row['Stocks (new stocks
are highlighted)']
=
data kite.historical_data(instru
ment_token=get_insToken(symbol
+"23APRFUT"),

1 min left in chapter 79%


from date=
row["Trigger Date'],
to_date=row["Trigger
Date'],
interval='day')

# Get the high of the day


high = data[o]['high]
high_list.append(high)
df['high'] = high_list
return df
df=get_high of day(kite, df)
Now, few cosmetic surgeries.
1. We do not need the column named Count.
2. And, Let's name the "Stocks (new stocks
are highlighted)" to just "Stocks" ?

And, We get our trade log in a neat manner -

Triggered at stocksTrigger Date Trigger


Time price high
59 2023-04-03 10:01:00
MARUTI 2023-04-03
10:01:00 8558.15 8634.85

1 min left in chapter 80%


57 2023-04-03 10:04:00
M&M 2023-04-03 10:04:00
1178.5 1187.15
54 2023-04-03 10:10:00
ASHOKLEY 2023-04-03
10:10:O0 142.6 143.30
53 2023-04-03 10:16:00
CHAMBLFERT 2023-04-03
10:16:00 270.65 273.90
51 2023-04-03 10:17:00
GMRINFRA 2023-04-03
10:17:00 42.8 43-95
50 2023-04-03 14:48:00
CROMPTON 2023-04-03
14:48:0o 300.3 301.80
49 2023-04-05 10:48:00
TATACOMM 2023-04-05
10:48:00 1261.45 1284.40

5 2023-04-20 10:02:00
ICICIBANK 2023-04-20
10:02:00 897.05 901.00
4 2023-04-20 12:49:00
CUB 2023-04-20 12:49:00
132.7 134-35

1 min left in chapter 81%


3 2023-04-20 14:16:00
BAJAJ-AUTO 2023-04-20
14:16:00 4321 4336.60
2 2023-04-20
15:21:00
TATACONSUM 2023-04-20
15:21:00 705.7 706.50
1 2023-04-21 09:58:00
ASIANPAINT 2023-04-21
09:58:0o 2854.75 2888.00
2023-04-21 10:07:00
APOLLOTYRE 2023-04-21
10:07:00 335-5 337.85
x
60 rowS 6 columns

Step 6 - Simulate the Trades


The goal is simple. We will simulate the
trades. There willbe three new variables -
square_off_time: It will contain the time of
when our trade hits stop loss. If it does not hit
stop loss, then it willbe marked as 14:50 PM.
square_off_ price: If the price of the stock
reaches the day high, it means stop loss is hit.
It will mark that price. And if the stop loss is
not hit, it will close the trade at 14:50 PM and
mark that price.
is_stoploss: A boolean value tocheck if stop
loss is hit or not.

1 min left in chapter 82%


Triggered at stocks Trigger Date Trigger
Time price high Square_off_
time squareoff _price
is_stoploss
59 2023-04-03 10:01:00
MARUTI 2023-04-03
10:01:00 8558.15 8634.85
2023-04-03 14:50:00+05:30
8554.20 False
57 2023-04-03 10:04:00
M&M 2023-04-03 10:04:00
1178.5 1187.15
2023-04-03 10:22:00+05:30
1187.15 True
54 2023-04-03 10:10:00
ASHOKLEY 2023-04-03
10:10:00 142.6 143.30
2023-04-03 14:50:00+05:30
141.60 False
53 2023-04-03 10:16:0o
CHAMBLFERT 2023-04-03
10:16:00 270.65 273.90
2023-04-03 15:19:00+05:30
273.90 True
51 2023-04-03 10:17:00
GMRINFRA 2023-04-03
10:17:00 42.8 43.95

1 min left inchapter 82%


2023-04-03 14:04:00+05:30 43-95
True

4 2023-04-20
12:49:00
CUB 12:49:00
2023-04-20
132.7 134-35 2023-04-20
14:50:00+05:30 133.25 False
3 2023-04-20 14:16:00
BAJAJ-AUTO 2023-04-20
14:16:00 4321 4336.60
2023-04-20 14:50:00+05:30
4317.85 False
2 2023-04-20 15:21:0
TATACONSUM 2023-04-20
15:21:00 705.7 706.50
2023-04-20 14:50:00+05:30
705.00 False
1 2023-04-21 09:58:00
ASIANPAINT 2023-04-21
o9:58:00 2854.75 2888.00
2023-04-21 14:23:00+05:30
2888.O0 True
2023-04-21 10:07:00
APOLLOTYRE 2023-04-21
10:07:00 335-5 337.85
2023-04-21 14:50:00+05:30
334.05 False
1 min left in chapter 83%
60rows x
9 columns

Step 7- Lot Sizes and


Cosmetic Changes
Now, Let's add the Lot Sizes so that we can
simulate how much profit and loss happened
if the trades are taken with 1 Lot. In deriva
tives, Lot size of each stock derivative is differ
ent! It is available in the same instrument list
from where we retrieved our instrument to
ken.

Let's code a small function for lot sizes and


add the value in a new column named lotsize
def get _lotsize(tradesymbol,exchange=
"NFO"):
if(exchange=="NSE"):
if(tradesymbol=="NIFTY"):
tradesymbol="NIFTY 50"
if(tradesymbol=="BANKNIFTY"):
tradesymbol="NIFTY BANK"
#print(tradesymbol)
#print(exehange)
dataToken = instrumentList[(instru
mentList['tradingsymbol'] == tradesym
bol)&(instru
mentList['exchange']==exchange)]
return dataToken.lot_size.iloc[o]

1 min left in chapter 84%


df["lotsize"] = df["stocks"].apply(lambda
x: get_lotsize(x+"23APRFUT")

Now, there is a minor beautification needed.


If you notice the values of Triggered at, it
will look like “2023-04-20 15:21:00°. While
the values of square off time looks like
"2023-04-20 14:50:00+05:30". It means it is
adding the timezone. Anyways, We need to
make the format uniform

df['square_off_time'] = dfl'square_off
time'J.apply(lambda x: datetime.date
time.strptime(str(x)[:-6], "%Y-%m-%d
%H:%M:%S)

Step 8 - Calculate the Money


Let's do three things –

1. Remove the Trigger Date and Trigger


Time column.
2. Rename the price column to entry_price.
3. Calculate the Profit/Loss points i.e. pl
points = square_off _price- entry_price.
4. Calculate the Net profit by multiplying
that points with lot size.

remove "Trigger Date" column


#

df = df.drop("Trigger Date", axis=1)


1 min left inchapter 84%
# remove "Trigger Time" column
df = df.drop("Trigger Time", axis=1)
rename "stoploss" column to "pl"
#

df = df.rename(columns={"price": "en
try_ price"})
df["pl_points"] = df["'square_off _price"]
df["entry_price"]
df["pl"] = df["pl_ points"]*df["lotsize"]

The Final Trade Log


And, We get the Final output with entire trade
log with their entry and exit -

Triggered at stocks entry_price


high square_off time
square_off price is_stoploss
lotsize pl_ points pl
59 2023-04-03 10:01:00
MARUTI 8558.15
8634.85 2023-04-03 14:50:00
8554.2o False 100 -3.95
-395.0
57 2023-04-03 10:04:00
M&M 1178.5 1187.15
2023-04-03 10:22:00 1187.15
True 700 8.65 6055.0
1 min left in chapter 85%
54 2023-04-03 10:10:00
ASHOKLEY 142.6 143.30
2023-04-03 14:50:00 141.60
False 5000 -1.0 -5000.O
53 2023-04-03 10:16:00
CHAMBLFERT 270.65
273.90 2023-04-03 15:19:00
273.90 True 1500 3.25
4875.0
51 2023-04-03 10:17:00
GMRINFRA 42.8 43-95
2023-04-03 14:04:00 43.95
True 22500 1.15
25875.0
50 2023-04-03 14:48:00
CROMPTON 3o0.3 301.80
2023-04-03 14:50:00 299.75
False 1500 -0.55 -825.0
49 2023-04-05 10:48:00
TATACOMM 1261.45
1284.40 2023-04-05 12:19:00
1284.40 True 500 22.95
11475.0
48 2023-04-06 09:56:00
POWERGRID 227 228.25
2023-04-06 14:50:00 226.10
False 2700 -0.9 -2430.0

2 mins left in chapter 86%


47 2023-04-06 10:31:00
SBIN 531.8 534-95
2023-04-06 10:50:00 534.95
True 1500 3.15 4725.0
46 2023-04-06 10:46:00
BAJFINANCE 5875
5990.00 2023-04-06 14:50:00
5948.6o False 125 73.6
9200.0
45 2023-04-06 12:37:00
IPCALAB 838.2 844.60
2023-04-06 14:50:00 831.65
False 650 -6.55 -4257.5
44 2023-04-10 10:05:00
INDUSTOWER 142.2
142.90 2023-04-10 14:50:00
141.45 False 2800 -0.75
-2100.0
43 2023-04-10 10:17:00
INFY 1433 1437.90
2023-04-10 14:50:00 1432.35
False 400 -0.65 -260.0
41 2023-04-10 10:18:00
DELTACORP 194.65
195.95 2023-04-10 15:16:0o
195.95 True 2800 1.3
3640.0

2 mins left in chapter 87%


38 2023-04-10 10:19:00
DLF 396.65
409.00 2023-04-10 14:19:00
409.00 True 1650 12.35
20377-5
34 2023-04-10 10:22:00
BSOFT 267.85
269.25 2023-04-10 14:50:00
268.75 False 2000 0.9
1800.0
33 2023-04-11 10:04:00
CANBK 290.45
293.40 2023-04-11 14:50:00
288.65 False 2700 -1.8
-4860.0
32 2023-04-11 11:07:00
AUROPHARMA 546.7
550.50 2023-04-12 10:38:00
550.50 True 1000 3.8
3800.0
31 2023-04-12 10:01:00
JUBLFOOD 429.25
433.00 2023-04-12 14:50:O0
430.00 False 1250 0.75
937-5
29 2023-04-12 10:03:00
DIVISLAB 3063 3224.00

1 min left in chapter 88%


2023-04-12 13:51:00 3224.00
True 150 161.0 24150.0
28 2023-04-12 10:17:00
LAURUSLABS 308.8
329.80 2023-04-12 13:07:00
329.80 True 1100 21.0
23100.0
27 2023-04-13 10:03:00
INDIAMART 5516.45
5580.95 2023-04-13 14:50:0o
5410.80 False 150
-105.65 -15847.5
25 2023-04-13 10:04:00
HDFCAMC 1804.5
1813.00 2023-04-13 14:50:00
1791.90 False 300 -12,6
-3780.0
24 2023-04-13 10:46:00
GODREJPROP 1269.9
1289.70 2023-04-13 15:20:00
1289.70 True 425 19.8
8415.0
23 2023-04-13 13:49:00
ADANIENT 1878.05
1895.00 2023-04-13 14:50:00
1886.05 False 250 8.0
2000.0

1 min left in chapter 89%


22 2023-04-17 0g:16:00
SBIN 533-55 546.70
2023-04-17 14:34:00 546.70
True 1500 13.15 19725.0
20 2023-04-17 10:01:00
CHOLAFIN 833.25
840.75 2023-04-17 10:20:00
840.75 True 1250 7-5
9375.0
21 2023-04-17 10:01:O0
ULTRACEMCO 7782
7837.55 2023-04-17 14:50:00
7759.95 False 100
-22.05 -2205.0
19 2023-04-17 10:16:0o0
SIEMENS 3358.25
3381.10 2023-04-17 11:02:00
3381.10 True 275 22.85
6283.75
18 2023-04-18 09:47:00
PIIND 3108.55 3172.00
2023-04-18 14:50:00 3151.10
False 250 42.55 10637-5
16 2023-04-18 09:53:00
ASHOKLEY 139.35
140.50 2023-04-19 09:29:00
140.50 True 5000 1.15
5750.0
1 min left in chapter 90%
15 2023-04-18 10:01:00
PEL 713.6 729.90
2023-04-18 14:50:00 722.20
False 550 8.6 4730.0
13 2023-04-18 10:02::00
GODREJPROP 1290.6
1317.00 2023-04-18 13:22:00
1317.00 True 425 26.4
11220.0
10 2023-04-18 10:13:00
WHIRLPOOL 1330.5
1342.00 2023-04-18 14:50:00
1323.00 False 350 -7-5
-2625.0
2023-04-18 13:31:00
BANDHANBNK 217.2
218.75 2023-04-18 14:50:00
214.05 False 1800 -3.15
-5670.0
8 2023-04-19 0g:16:00
COFORGE 3960 3992.95
2023-04-19 14:50:00 3890.0o
False 150 -70.0
-10500.0
7 2023-04-19 10:06:00
TATASTEEL 109.8 110.65
2023-04-19 14:50:00 108.50
False 5500 -1.3 -7150.0
1 min left in chapter 91%
6 2023-04-19 10:29:00
COROMANDEL 941.9
957.25 2023-04-19 11:10:O0
957.25 True 700 15.35
10745.0
5 2023-04-20 10:02:00
ICICIBANK 897.05
901.00 2023-04-21 09:32:00
901.00 True 700 3.95
2765.0
4 2023-04-20 12:49:00
CUB 132.7 134.35
2023-04-20 14:50:00 133.25
False 5000 0.55 2750.0
3 2023-04-20 14:16:00
BAJAJ-AUTO 4321 4336.60
2023-04-20 14:50:00 4317.85
False 250 -3.15 -787.5
2 2023-04-20 15:21:00
TATACONSUM 705-7
706.50 2023-04-20 14:50:00
705.00 False 900 -0.7
-630.0
1 2023-04-21 09:58:00
ASIANPAINT2854.75
2888.00 2023-04-21 14:23:00
2888.00 True 200
33.25 6650.0
1 min left in chapter 92%
2023-04-21 10:07:00
APOLLOTYRE 335-5
337.85 2023-04-21 14:50:00
334.05 False 3500 -1.45
-5075.0

Calculate Trading Metrics


Now, here is a patch of code that analyze that
detailswith various popular trading metrics to
get an overview of strength of our strategy.

net_pl = round(df["pl"].sum(), 2)
print("Net P&L:", net_pl)
num_stoploss_hits = len(df[df['is_sto
ploss]])
total trades = len(df)
num_target hits = total trades
num_stoploss_ hits
print(f"Number of total trades: {total
trades}")
print(f"Number of times stop loss is hit:
{num stoploss hits}")
print(f"Number of times target is hit:
{num_target hits")
= to
win_ratio round(num_target_hits/
tal_trades,2)

1 min left in chapter 93%


print(f"Win Ratio: {win_ratio}")
avg_pl = round(df['pl'].mean(), 2)
max_pl = round(df['pl].max(), 2)
min _pl= round(df[pl].min(), 2)

print(f"Avg PL: {avg_pl}")


print(f"Max PL: {max_pl}")
print(f"Min PL: {min _pl}")
gross_pl =
round(dfl'pl'].sum), 2)
>
avg_gain round(df[df['pl'] o]
Ipl].mean), 2)
avg_loss round(df[df['pl] < o]
['pl].mean), 2)
profit_factor = round(-df[dfl'pl'] < o]
>
I'pl].sum)/ df[dfl'pl] o]lpll.sum), 2)
expected payoff = round(df['pl"].mean),
2)
max_drawdown round((df['pl'].cum
sum).cummax() dfl'pl'].cumsum).
max(), 2)

risk free rate = 0.02


sharpe_ratio = round(expected_payoff -
risk_free_rate) / df['pl'].stdO, 2)
print(f°Gross P&L: {gross_pl}")
print(f"Average Gain: (avg gain}")
print(f"Average Loss: {avg_loss}")

1 min left in chapter 93%


print(f"Profit Factor: (profit_actor")
print(f"Expected Payoff: (expected pay
off")
print(f"'Maximum Drawdown: {max
drawdown}")
print(f"Sharpe Ratio: {sharpe_ratio}")
# calculate gross profit and loss
> o]
gross_profit = round(df[df['pl']
Ipl].sum), 2)
gross loss round(df[df['pl] < o]
Ipl].sum), 2)
print(f"Gross Profit: (gross_profit}")
print(f"Gross Loss: {gross_loss}")
# calculate recovery factor and maximal
consecutive profit/loss
recovery factor round(abs(
gross_profit/ gross_loss), 2)
print(f"Recovery Factor: {recovery_fac
tor}")
# calculate max consecutive wins and
losses
wins = df['pl'] > o
losses = dflpl] <o
max_wins = wins.groupby((wins != win
s.shift().cumsum()).cumsum(0.max()

1 min left in chapter 94%


losses.groupby(losses !==
max _losses =

losses.shift)).cumsum)).cum
sum).min()
print(f"Maximum consecutive wins:
{max_wins}")
print(f"Maximum consecutive losses: {ab
s(max losses)}")

max_consecutive_profit
df[pl].rolling(window=2).sum().max)
max_consecutive loss
abs(df['pl'].rolling(window=2).
sum).min)
print(f"Maximal Consecutive profit:
{max consecutive_profit:.2f}")
print(f"Maximal consecutive loss: {max
consecutive loss:.2f}")

# convert the and


"Triggered at"
"square_off_time'" columns to datetime
format
df["Triggered at"] = pd.to_datetime(d
f["Triggered at")
df["'square_ off time"] = pd.to_date
time(df["square_off_time"])
#
calculate the holding time for each trade

1 min left in chapter 94%


=
df["holding_time"] df["'square_off
time"]- df["Triggered at"]
# calculate the average holding time for
all trades
avg holding _time df["holding
time"].mean)
print(f"Average holding time: {avg_hold
ing time}")
# calculate the average holding time for
profit trades
profit_trades = df[df["pl"] > o]
avg _profit_holding_time = profit
trades["holding_time"].mean)
print(f"Average holding time for profit
trades: {avg_profit_holding_ time}")
# calculate the average holding time for
loss trades
loss_trades = df[dfT"pl"] < o]
avg loss_holding time = loss
trades["holding _time"].mean)
print(f'Average holding time for loss
trades: {avg_loss_holding_time}")
The Output shows all the available info you
need to know to evaluate a strategy
Net P&L: 166658.75

1 min left in chapter 95%


Number of total trades: 44
Number of times stop loss is hit: 19
• Number of times target is hit:25
Win Ratio: 0.57
Avg PL: 3787.7
Max PL: 25875.o
Min PL: -15847-5
Gross P&L: 166658.75
Average Gain: 9271.39
Average Loss: -4133.19
Profit Factor: 0.31
Expected Payoff: 3787.7
Maximum Drawdown: 25945.0
Sharpe Ratio: 0.42
Gross Profit: 241056.25
Gross Loss: -74397-5
Recovery Factor: 3.24
Maximum consecutive wins: 5
Maximum consecutive losses: 0
Maximal consecutive profit: 47250.00
Maximal consecutive loss: 19627.50
Average holding time: o days
04:44:50.454545454
Average holding time for profit trades:
o
days o5:29:34.615384615
Average holding time for loss trades: o
days o3:40:13.333333333

1 min left in chapter 95%


Calculate the Profit/
Loss over the Time
Let's use the matplotlib library to plot the
graph. Here goes the code

import matplotlib.pyplot as plt


# Set the color of the bars based on posi
tive or negative values
colors = ['g if pl >= 0 else 'r for pl in
dfl'pl|]

# Create the bar chart


plt.bar(df.index, df['pl'], color=colors)

# Set the labelsand title


plt.xlabel("Trade Number")
plt.ylabel("P&L")
plt.title("P&L Over Time")
# Add a grid
plt.grid)
# Add copyright
plt.text(o.5, 0, "© Copyright 2000-2023,
Unofficed Inc",
horizontalalignment='center', ver
ticalalignment='center',

1 min left in chapter 96%


transform=plt.gca).transAxes,
fontsize=8, color=gray')

# Show the plot


plt.show)
Thegraph looks likethis -
P&L Over Time

20000

10000

-10000

ACeriaht o00 2023 Lneffica lne


10 20 30 40 50 60
Trade Number

Plot theCumulative Profit/


Loss Over Time
Here goes a code snippet of another fancy
graph. Despite the fancy tag, the graphs are
good! It tellsso many things in so little space

import mtplotlib.pyplot as plt


cum_pl= df["pl"].cumsum()[:-1]
trade num = range(1, len(df)+1)[::-1]

1 min left in chapter 97%


plt.plot(trade_ num, cum_pl)
plt.title(Cumulative P&L Over Trades')
plt.xlabel("Trade Number')
plt.ylabel('Cumulative P&L')
#Add
copyright
plt.text(o.5, 0, "© Copyright 2000-2023,
Unofficed Inc",
horizontalalignment='center,ver
ticalalignment='center',
transform=plt.gca().transAxes,
fontsize=8,color='gray')
plt.show)

1 min left in chapter 97%


The graph looks like this
Cumulative P&L Over Trades

175000

150000

125000

P&L

Cumulative
100000 -

75000

50000

25000

ACanuciaht 2000. 2022 llaaicad Inc

10 20 30 40

Trade Number

Applying the same method in Equities We get


this output

Net P&L: 691606.25


Number of total trades: 477
Number of times stop loss is hit: 187
Number of times target is hit: 290
Win Ratio: o.61
Avg PL: 1449.91

1 min left in chapter 97%


Max PL: 26645.o
Min PL: -21498.75
Gross P&L: 691606.25
Average Gain: 6019.51
Average Loss: -4897.87
Profit Factor: 0.58
Expected Payoff: 1449.91
Maximum Drawdown: 120861.8
Sharpe Ratio: 0.21
Gross Profit: 1661385.15
Gross LOss: -969778.9
Recovery Factor: 1.71
Maximum consecutive wins: 9
Maximum consecutive losses: 0
Maximalconsecutive profit: 43535.70
Maximal consecutive loss:30436.85
Average holding time: o days
05:08:35-345911949
Average holding time for profit trades:
o days o5:34:04.130434782
Average holding time for loss trades: o
days 04:35:01.212121212

And Using the same method and with the help


of matplotlib library, here is the P/L graph -

1 min left in chapter 98%


P&L Over Time

20000

10000

-10000

+
-20000
i 20002b
100 200 300 400 500 600 700 800
Trade Number

Detailed Analysis
One of the coolest aspects of conducting back
tests and further analysis of trading strategies
is the ability to delve deeper into the data to
identify which stocks perform best with a par
ticular strategy and which ones may not be
suitable.
Different stocks have different behaviors, and
a strategy that works well for one may not
work for another. Analyze which stocks have
historically yielded the best results with your
strategy. Look for patterns or characteristics
that make these stocks suitable candidates.

1 min left in chapter 98%


Stocks sum P&L
HAL
AARTIND -8970.85
GODREJPROP
ABB 8547.35
PNB
ABBOTINDIA -1095.30 HDFCLIFE

ABCAPITAL 21692.40 MCX


OBEROIRLTY
ABFRL 6671.30
FEDERALBNK
ACC 3455.10
BOSCHLTD
ADANIENT 32079.85 INDUSINDBK

ADANIPORTS 1476.00 APOLLOHOSP


ALKEM 2082.60 -20000.00 00 20000.00 40000.00

AMARAJABAT -2824.25
APOLLOHOSP -13421.75 Stocks sum P&L Stocks sum P&L

APOLLOTYRE 6976.35 HAL 48946.00 IEX -25807.90

ASHOKLEY -1076.85 GODREJPROP 45014.60 BERGEPAINT -25211.30


ASIANPAINT 7611.00 PNB 44313.85 CHOLAFIN -22834.60

ASTRAL -5311.70 HDFCLIFE 44255.55 CUMMINSIND -21263.80

ATUL -783.95 MCX 42043.10 CIPLA -19664.35

AUBANK 3019.10 BHEL 38396.35 OBEROIRLTY -18005.75


AUROPHARMA 24522.05 PEL 33791.30 FEDERALBNK -16947.10

AXISBANK 4347.70 ADANIENT 32079.85 BOSCHLTD -15252.40

BAJAJ-AUTO 7668.20 GLENMARK 31924.30 INDUSINDBK -14588.60


BAJAJFINSV 4624.20 M&MFIN 28923.95 APOLLOHOSP -13421.75

Stocks within the same sector or industry


tend to exhibit similar behavior. It's possible
that the strategy is well-suited for certain eco
nomic conditions or business cycles.
It's clear from the analysis that certain stocks
like HAL and Godrej Properties performed
your trading strategy, while others
well with
like IEX and Berger Paints incurred signifi
cant losses.This kind of insight is valuable for
refining your trading approach and portfolio
management.
Here is a snapshot of Equity Curve -

1 min left in chapter 99%


Equity Curve Initial Capital: 1000000.00

Total No of Days: 225


1000000
Win Ratio: 0.62

CAGR: 99.33
750000
No of days: 366.00

Relative DD:
-0.95
500000
Maximal DD: Loading.

Absolute DD: -2.49


250000
Gross Profit: 1688475.55

Gross Loss: -692478.25

Net Profit: 995997.30

-250000
Std Dev of Daily Ret: 16320.46

Std Dev of Daily Ret %: 1.63

It also has some additional metrics. The data


visualization always give us more insight.
An equity curve is a graphical representation
of the performance of an investment or trad
ing strategy over time. It provides a visual de
piction of how the value of the investment or
trading account has changed over a specific
period.
Here isa daywise analysis -
Dav Total P&L

Friday 93352.50 Friday

Monday 287536.95 Monday

Thursday 192949.55
Thursday
Tuesday 314224.80
Tuesday
Wednesday 107933.50
Wednesday

©Unofficed.com 100000 200000 300000

This is antimean reversion strategy. Right?


Mean reversion stock strategies, which am
to capitalize on the idea that stock prices
tend to revert to their mean or average levels
Over time, can exhibit weaker performance on
Mondaysand Tuesdays for several reasons:

1 min left in chapter 99%


Weekend Effect: Over the weekend, there is
typically no trading activity in the stock mar
ket, and news and events may accumulate.
When the market opens on Monday, there can
be a rush of activity as traders and investors
react to these weekend developments. This
lead to larger price gaps and increased
volatility on Mondays, malking it harder for
mean reversion strategies to predict short
term price movements.
Reversal of Friday's Trends: Some
traders and investors believe that the end of
the trading week on Friday often sees profit
taking or portfolio rebalancing, which can cre
ate trends in stock prices. When Monday ar
rives, there may be a reversal of these Friday
trends as traders take new positions. Mean re
version strategies may not perform well when
markets are in the process of reversing recent
trends.
Asa trader, We need to adjust our approaches
and risk management techniques to account
for the unique characteristics of different days
of the week and market conditions. Although,
everything can be explained after it happens A
data driven Analysis can not be ignored.

1 min left in chapter 99%


Conclusion
Feel free to share your comments Or sugges
tionsregarding any of these strategies.
Have you applied any of these strategies
in practice? If so, what were your results in
terms of gains or losses?
Could youshare your journey in the stock
market?
Would you recommend this book to others
interested in trading?
Consider joining unofficed.com, where you
can collaborate with a community of like
minded individuals who share similar princi
ples. If you're new to trading, it's advisable
to begin with Tradingview and practice there
for a few months before transitioning to a real
trading account. This can help you gain valu
able experience and confidence.

Amit Ghosh
E: dexter @aeron7.com

W: www.amitghosh.net
Conclusion
Feel free to share your comments or sugges
tionsregarding any of these strategies.
Have you applied any of these strategies
in practice? If so, what were your results in
terms of gains or losses?
Could youshare your journey in the stock
market?
Would you recommend this book to others
interested in trading?
Consider joining unofficed.com, where you
can collaborate with a community of like
minded individuals who share similar princi
ples. If you're new to trading, it's advisable
to begin with Tradingview and practice there
for a few months before transitioning to a real
trading account. This can help you gain valu
able experience and confidence.

Amit Ghosh
E: [email protected]

W: www.amitghosh.net

You might also like