Strategy Template at a glance
| Kind of rule | Joining a move (trend following) |
|---|---|
| Buys or sells | It can buy, and it can bet on falling prices. |
| Built on | SMA, Supertrend |
| Where it was published | TradingView, by its author, as a Pine Script strategy |
| Tested on | 56 cells: 15 coins, October 2021 to June 2026, no fee |
| Cells that placed a trade | 54 of 56 |
| Middle result before fees | −34.5% |
| Cells above zero | 0 of 54 |
| Middle drawdown before fees | 34.9% |
| Page updated | 2026-11-08 |
Strategy Template backtest results, every cell
Every cell is in the picture, not only the strongest. To the right of the black line is above zero. The orange line, when you see one, is the middle.
How Strategy Template works
Rules in this group usually work like this. It waits until price is already moving, then joins that move. It is wrong in small ways many times, and right in a large way a few times. The hard part is the stretch where price chops around and every entry is a fake. The next paragraph is this particular rule, which can be narrower than the group.
It can buy, and it can bet on falling prices. It acts only when several checks agree at once. It leans on SMA, SUPERTREND; those names are explained on their own pages, further down. The exact line is in the list below, in the author's names, and you can skip that list. When it enters, it also sets a stop or a target, so a trade can close without a new signal.
The author did not set a size, so each trade uses whatever amount the code assumes. It holds one trade at a time.
The exact condition, from the code
Same rule, translated from the code, in the author's names. You can skip this list if the paragraph above was enough.
- Enters long when (Enable signals equals 'Longs' or Enable signals equals 'Both') and (on when not (Date filter: equals 'Automatic') and not (Date filter: equals 'Manual input'), else (Date filter: equals 'Automatic' or Date filter: equals 'Manual input')) and (test fast crosses above test slow when not (SuperTrend Filter (off)), else test fast crosses above test slow and the close is above the Supertrend line).
- Enters short when (Enable signals equals 'Shorts' or Enable signals equals 'Both') and (on when not (Date filter: equals 'Automatic') and not (Date filter: equals 'Manual input'), else (Date filter: equals 'Automatic' or Date filter: equals 'Manual input')) and (test fast crosses below test slow when not (SuperTrend Filter (off)), else test fast crosses below test slow and the close is below the Supertrend line).
- Closes the position when (Enable signals equals 'Longs' or Enable signals equals 'Both') and (on when not (Date filter: equals 'Automatic') and not (Date filter: equals 'Manual input'), else (Date filter: equals 'Automatic' or Date filter: equals 'Manual input')) and ((open short signal or (the high is at or above ((1 + tp5 level) × long starting level) when Number of Orders: (L) equals 5, else (the high is at or above ((1 + tp4 level) × ….
- Places a stop at (long starting level × (1 − ((Maximum Accepted Loss % / 100) / Position Leverage))), a target at ((1 + ((TP1: % / 100) / Position Leverage)) × long starting level) when (Enable signals equals 'Longs' or Enable signals equals 'Both') and (on when not (Date filter: equals 'Automatic') and not (Date filter: equals 'Manual input'), else (Date filter: equals 'Automatic' or Date filter: equals 'Manual input')) and (open long signal or a long position is open) and not (open short signal).
- Places a stop at (long starting level × (1 − ((Maximum Accepted Loss % / 100) / Position Leverage))), a target at (undefined when not (Number of Orders: (L) is at or above 3) and [TP] Ride Free (L) (on), else ((1 + ((TP2: % / 100) / Position Leverage)) × long starting level)) when (Enable signals equals 'Longs' or Enable signals equals 'Both') and (on when not (Date filter: equals 'Automatic') and not (Date filter: equals 'Manual input'), else (Date filter: equals 'Automatic' or Date filter: equals 'Manual input')) and (open long signal or a long position is open) and not (open short signal) and Number of Orders: (L) is at or above 2.
- Places a stop at (long starting level × (1 − ((Maximum Accepted Loss % / 100) / Position Leverage))), a target at (undefined when not (Number of Orders: (L) is at or above 4) and [TP] Ride Free (L) (on), else ((1 + ((TP3: % / 100) / Position Leverage)) × long starting level)) when (Enable signals equals 'Longs' or Enable signals equals 'Both') and (on when not (Date filter: equals 'Automatic') and not (Date filter: equals 'Manual input'), else (Date filter: equals 'Automatic' or Date filter: equals 'Manual input')) and (open long signal or a long position is open) and not (open short signal) and Number of Orders: (L) is at or above 3.
| Buys or sells | It can buy, and it can bet on falling prices. |
|---|---|
| Tools it calculates | SMA, Supertrend |
| A second chart speed | No. It uses one chart speed only. |
| Only at certain hours | Yes. It only acts during set hours. |
| Adding to a trade | It holds one trade at a time. |
| How much it trades | The author did not set a size, so each trade uses whatever amount the code assumes. |
| Cost the author assumed | The author assumed a trading cost of 0.02 percent per side. |
Default settings
The test used the defaults in the middle column. Nothing was turned to help a coin.
| Setting | Default | Group |
|---|---|---|
| Enable signals | Risk settings | |
| Stop Loss Type: (L) | Risk settings | |
| Take Profit Type: (L) | Risk settings | |
| Number of Orders: (L) | Risk settings | |
| (S) | Risk settings | |
| (S) | Risk settings | |
| (S) | Risk settings | |
| [TP] Ride Free (L) | on | Risk settings |
| (S) | on | Risk settings |
| Position Leverage | Risk settings | |
| Maximum Accepted Loss % | Risk settings | |
| Equity % per trade | 10 | Risk settings |
| Show TP/SL lines | Risk settings | |
| TP1: % | Taking Profit Levels | |
| TP2: % | Taking Profit Levels | |
| TP3: % | Taking Profit Levels | |
| TP4: % | Taking Profit Levels | |
| TP5: % | Taking Profit Levels | |
| Ratio | Taking Profit Levels | |
| Ratio | Taking Profit Levels | |
| Ratio | Taking Profit Levels | |
| Ratio | Taking Profit Levels | |
| Ratio | Taking Profit Levels | |
| SuperTrend Filter | off | Indicator Settings |
and 9 more settings, left at the author's defaults.
How the backtest was run
Every strategy was tried the same way, on the settings the author published.
The years are October 2021 to June 2026. The prices are from Bybit, for 13 widely traded coins, mostly on hourly, 4-hour and daily charts, with some faster charts. That was 47,242 tries. The window stored in the files is 2021-09..2026-06.
599 rules produced a finished try. A rule that finished above zero on at least 12 cells, before any fee, was tried again with a fee of 0.12 percent per side. Only buys are counted in that second try. 273 rules got it.
The method, the aggregate results and a downloadable table are on the study page. What the desk does with the results beyond these pages is its own.
Before any fee, it was tried on 56 cells. It placed a trade on 54 of them. 0 of the cells that traded finished above zero (0.0%).
It was not run a second time with a fee. That second pass happens only when at least 12 cells finished above zero before fees. 273 rules got that pass.
| Cells tried | 56 |
|---|---|
| Cells that placed a trade | 54 |
| Finished above zero | 0 (0.0% of the cells that traded) |
| Middle result, before fees | −34.5% |
| Strongest cell, the top of the range | ADA daily: −1.5% |
| Weakest cell, the bottom of the range | BCH 15-minute: −94.3% |
| Middle drawdown, before fees | 34.9% |
Label: backtest · old prices, zero commission · Oct 2021 – Jun 2026. Hypothetical results; see the risk disclosure.
How to read the result
How to read the number
The median of every cell that traded is the result. No fee has been taken off, so the number is a ceiling. A fee comes off each trade, and this page does not guess that cost, because this rule did not get the second pass where the fee is applied. The weakest and the strongest cells are not a result on their own.
The middle drawdown, on the cells that traded, was 34.9%.
What this does not show
The useful question, for a rule that joins a move already underway, is what it gave back in the choppy months when there was no trend to join.
Nothing on this page was fit to the cell that finished highest. One coin, one chart speed, or one strong stretch is a single row. It is not the rule. Other years, another exchange, or another fee would be a different measurement.
Questions about Strategy Template
What is Strategy Template?
Strategy Template is a trend following trading strategy published on TradingView as a Pine Script. In plain terms it is a rule of the kind this site calls joining a move. It can buy, and it can bet on falling prices. It is built on SMA, Supertrend. This page reads the rules from the code and reports what they did on old crypto prices.
How does Strategy Template work?
It can buy, and it can bet on falling prices. It acts only when several checks agree at once. It leans on SMA, SUPERTREND; those names are explained on their own pages, further down. The exact line is in the list below, in the author's names, and you can skip that list. When it enters, it also sets a stop or a target, so a trade can close without a new signal.
Is Strategy Template profitable in a backtest?
Before any fee, 0 of 54 cells that traded finished above zero, and the median of those cells was −34.5%. No fee has been taken off, so that number is a ceiling. The rule did not reach the second pass where a fee is charged on every trade.
Where can I find the Strategy Template script?
It is published on TradingView by its author. Search TradingView for the title to find the original script. This page is an independent reading and is not affiliated with the author.
What does backtest mean on this page?
Backtest means the rule was replayed on old prices from Bybit. No real money moved. Every number on this page carries that label, and old prices do not promise anything about new ones.
Words used on this page
- Backtest
- The rule was tried on old prices. No real money moved.
- Cell
- One coin on one chart speed. Bitcoin every 4 hours is one cell. Bitcoin once a day is another.
- Chart speed
- How often a new price bar is drawn. 15m means every 15 minutes, 1h means hourly, 4h means every 4 hours, 1D means once a day.
- Fee, per side
- A cost taken each time the rule trades. Per side means once on the way in and once on the way out.
- Median
- Line the cells up from the biggest loss to the biggest gain. The median is the middle one. Half the cells did better and half did worse.
- Drawdown
- The deepest fall from a high point along the way, as a percent of the account at that high.
- Above zero
- The account finished with more than it started.
The indicators Strategy Template uses
Each has its own page: what it measures, how it is read, where it misleads.
- Simple moving average (SMA): the plainest average, and why it still runs half the strategies
- Supertrend: an ATR trailing line that flips with the trend
"Strategy Template" was published on TradingView by its author, under the author's own license. This page is an independent reading of those rules and of what they did on these old prices. It is not written with the author, and it is not a recommendation. Not every detail survives the translation onto this page, so read the original before you rely on it.