What it does
Most people who own shares already do a rough version of this: hold while things are going well, get out when they are not. The trouble is deciding what 'going well' means on any given day. This strategy decides it the same way every time.
It uses two averages of the price: one over the last 50 trading days, one over the last 200. When the shorter average climbs above the longer one, the recent past is better than the distant past, and the company is bought. When it falls back below, it is sold. That is the whole rule.
How it makes money
Trends in large companies tend to last months, not days. A rule that only reacts when the 50-day average crosses the 200-day ignores every wobble in between, which is why it trades so rarely. That same slowness means it is late at both ends: it buys some way up from the bottom and sells some way down from the top. What it captures is the long middle.
A stop sits well below the entry in case the new trend fails at once, and each position is sized so that hitting it costs a fixed small fraction of the account. Ten companies, never more than 15% of the account in one.
A worked example, in rupees
Illustrative. ₹1,00,000 account, balanced version, a stock at ₹1,000 whose 50-day average has just crossed above its 200-day.
- Entry
- ₹1,000, the day of the cross
- Stop
- ₹850, 15% below
- Risk budget
- 1% of the account, ₹1,000
- Position
- about 6 shares, ₹6,000, so the stop costs ₹900
- Exit seven months later
- ₹1,180, the day the 50-day crosses back below
- Result
- ₹1,080 before charges, about 1.1% of the account
A single position is small because the stop is wide and the risk budget is fixed. The return comes from holding several of these through a long rise, not from any one of them. In a sideways year the same rule produces a few small losses and nothing else.
When it does well, and when it hurts
Does well when
- A long rise, the kind that lasts a year or more. The strategy is built for exactly that and nothing else.
- Markets that trend cleanly rather than lurching: the averages cross once and stay crossed.
Hurts when
- Sideways markets. The averages cross and uncross every few months, and each round trip costs a little.
- Sharp reversals. By the time the 50-day crosses back below, a good part of the gain has gone. The stop is for the failures, not for protecting profit.
What the robot does when a trade goes wrong
These are the real rules, in the order the strategy checks them. Nothing here needs you to be watching.
- 1
Sells when the trend turns
The 50-day average crossing back below the 200-day is the exit, and it will usually be some way below the top.
- 2
Stops if the new trend fails at once
Twelve to eighteen percent below the entry, by version. Wide, because a trend needs room, and sized so that stop costs the same small fraction of the account every time.
- 3
Never more than 15% of the account in one company
However long the trend has lasted.
- 4
Holds for as long as it takes
This is a delivery strategy. Months are normal. A trade that lasts a year is the point.
Adjustments, and why it does not make them
Investors adjust this kind of rule by taking profits on the way up or adding on dips. Both feel sensible and both shorten the long middle the strategy exists to capture.
This robot does neither. It holds until the cross, or the stop, and the same company can only be bought again on the next cross.
The three versions
Each strategy comes as conservative, balanced and aggressive. They share the idea and differ in how much they risk once in.
| Setting | Conservative | Balanced | Aggressive |
|---|---|---|---|
| Companies | 10 large caps | 10 large caps | 10 large caps |
| Buys when | the 50-day average crosses above the 200-day | same | same |
| Sells when | it crosses back below | same | same |
| Stop below entry | 12% | 15% | 18% |
| Risk per trade | 0.5% of the account | 1% | 1.5% |
| Most in one company | 15% | 15% | 15% |
The only difference between the versions is how much is at stake per trade. The signal is the same.
Entry: When daily 50-day EMA crosses above the 200-day EMA on a basket of 10 NIFTY 50 stocks
Action: Buy delivery shares sized so the stop risks 1% of account equity
Exits: Sell when 50-day EMA crosses below 200-day EMA, or if price hits a 15% initial stop
Want a stricter filter, a different stop, or your own stock list? Open a working copy in the builder and run a backtest.
Customize this ruleRisks you should know
- Long only, and slow to leave. In a crash the exit arrives after a chunk of the fall; the stop limits how large a chunk.
- Overnight and weekend risk, as with any shares held for months.
- Few trades. Over five years each company produces a handful, so the record is short and a backtest's numbers carry wide error bars.
The jargon, explained
- EMA
- An average of recent prices that leans towards the latest ones. Price above its EMA is drifting up; below, drifting down.
- ATR
- The typical size of one bar's move. Stops in these strategies are set a few ATRs away so ordinary noise does not trigger them.
- Delivery (CNC)
- Shares bought to hold overnight or longer, paid for in full. No shorting.