Trailing Take Profit - Close Based at a glance

Kind of ruleJoining a move (trend following)
Buys or sellsIt only buys. It does not bet on falling prices.
Built onSMA, bars since
Where it was publishedTradingView, by its author, as a Pine Script strategy
Resultno finished try; every run errored or timed out
Page updated2026-11-08

Trailing Take Profit - Close Based backtest results, every cell

There is no cloud of cells to draw. The frame below says why.

No finished tryThe runs did not finish, so there is no picture of a result.No finished try
The runs did not finish, so there is no picture of a result.

How Trailing Take Profit - Close Based 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 only buys. It does not bet on falling prices. It acts only when several checks agree at once. It leans on SMA; 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. It gets out when the Fast/Slow SMA Length-period SMA of the close crosses below the slow malen-period SMA of the close.

Each trade uses 10 percent of the account. 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 open long position and strategy.opentrades.size(strategy.opentr is at or below 0.
  • Closes the position when the Fast/Slow SMA Length-period SMA of the close crosses below the slow malen-period SMA of the close.
  • Places a stop at long trailing take profit price when (open long position and strategy.opentrades.size(strategy.opentr is at or below 0 or strategy.opentrades.size(strategy.opentr is above 0) and Enable Trailing and ((highest high since long entry crosses above long take profit price or (long take profit crossed or long take profit price reached)) or open long position and strategy.opentrades.size(strategy.opentr is at or below 0).
  • Places a target at long take profit price when (open long position and strategy.opentrades.size(strategy.opentr is at or below 0 or strategy.opentrades.size(strategy.opentr is above 0) and not (Enable Trailing).
Buys or sellsIt only buys. It does not bet on falling prices.
Tools it calculatesSMA, bars since
A second chart speedNo. It uses one chart speed only.
Only at certain hoursYes. It only acts during set hours.
Adding to a tradeIt holds one trade at a time.
How much it tradesEach trade uses 10 percent of the account.
Cost the author assumedThe author assumed a trading cost of 0.1 percent per side.

Default settings

The test used the defaults in the middle column. Nothing was turned to help a coin.

SettingDefaultGroup
FromFilters
​a dateFilters
ToFilters
​​a dateFilters
Timezones Ref->ChartFilters
->Filters
Fast/Slow SMA LengthStrategy
slow malenStrategy
Take Profit %Take Profit
Enable TrailingTake Profit
Trailing Distance %Take Profit
Trail BarrierTake Profit

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.

It was one of the over 600 rules in the screen, but every try errored or timed out, so it has no result. That is a problem running this script, not a finding about the market.

How to read the result

How to read the number

There is no finished result on this page. A try that did not finish is not a finding about the market.

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.

There is no cell to single out, and this note does not invent one. Other years, another exchange, or another fee would be a different measurement.

Questions about Trailing Take Profit - Close Based

What is Trailing Take Profit - Close Based?

Trailing Take Profit - Close Based 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 only buys. It does not bet on falling prices. It is built on SMA, bars since. This page reads the rules from the code and reports what they did on old crypto prices.

How does Trailing Take Profit - Close Based work?

It only buys. It does not bet on falling prices. It acts only when several checks agree at once. It leans on SMA; 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. It gets out when the Fast/Slow SMA Length-period SMA of the close crosses below the slow malen-period SMA of the close.

Is Trailing Take Profit - Close Based profitable in a backtest?

There is no result to judge. Every run of this script errored or timed out in the screen. That is a problem running the script, not a finding about the market.

Where can I find the Trailing Take Profit - Close Based 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 Trailing Take Profit - Close Based uses

Each has its own page: what it measures, how it is read, where it misleads.

"Trailing Take Profit - Close Based" 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.