EMA Stack Strategy (DCA or Single Entry, HTF Logic, Non Repainting) at a glance
| Kind of rule | Averaging down (dollar-cost averaging) |
|---|---|
| Buys or sells | It can buy, and it can bet on falling prices. |
| Built on | ATR, EMA, SMA, VWMA, WMA, RMA |
| Where it was published | TradingView, by its author, as a Pine Script strategy |
| Tested on | 12 cells: 12 coins, October 2021 to June 2026, no fee |
| Trades placed | none |
| Page updated | 2026-11-08 |
EMA Stack Strategy (DCA or Single Entry, HTF Logic, Non Repainting) backtest results, every cell
There is no cloud of cells to draw. The frame below says why.
How EMA Stack Strategy (DCA or Single Entry, HTF Logic, Non Repainting) works
Rules in this group usually work like this. When a buy goes the wrong way, it buys more, so the average price moves closer to the market. Most of the closed trades then look like small wins. The losses are rare and large, and they show up when price keeps falling. 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 ATR, EMA, RMA, 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. When it enters, it also sets a stop or a target, so a trade can close without a new signal.
Each trade uses a fixed 1000 of the quote coin. It can stack up to 50 trades in the same direction.
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 logic update and position equals 0 and stack ready long and not (block new base entry) and base cash effective is above 0.
- Enters short when logic update and position equals 0 and stack ready short and not (block new base entry) and base cash effective is above 0.
- Enters long when can add and (a long position is open and the low is at or below next level or a short position is open and the high is at or above next level) and clamp (next cash raw, 0, (Max total position cash ($ cap) (15000) − planned cash used)) is above 0 and a long position is open.
- Enters short when can add and (a long position is open and the low is at or below next level or a short position is open and the high is at or above next level) and clamp (next cash raw, 0, (Max total position cash ($ cap) (15000) − planned cash used)) is above 0 and a short position is open.
- Places a target at (target price after last when DCA exit type (BE TP (Current)) equals 'After Last DCA (Offset)', else target price dca), a stop at ((((undefined − trail dist) when a long position is open, else (undefined + trail dist)) when Enable DCA trailing stop (default OFF) (off) and trail active … when Trading mode (DCA / Grid) equals 'DCA / Grid' and a long position is open.
- Places a target at (target price after last when DCA exit type (BE TP (Current)) equals 'After Last DCA (Offset)', else target price dca), a stop at ((((undefined − trail dist) when a long position is open, else (undefined + trail dist)) when Enable DCA trailing stop (default OFF) (off) and trail active … when Trading mode (DCA / Grid) equals 'DCA / Grid' and a short position is open.
- Closes the position when Trading mode (DCA / Grid) equals 'DCA / Grid' and not (Disable MA kill switch (DCA mode) (off)) and DCA exit type (BE TP (Current)) differs from 'After Last DCA (Offset)' and a long position is open and ma1 series is below ma2 series.
- Closes the position when Trading mode (DCA / Grid) equals 'DCA / Grid' and not (Disable MA kill switch (DCA mode) (off)) and DCA exit type (BE TP (Current)) differs from 'After Last DCA (Offset)' and a short position is open and ma1 series is above ma2 series.
| Buys or sells | It can buy, and it can bet on falling prices. |
|---|---|
| Tools it calculates | ATR, EMA, SMA, VWMA, WMA, RMA |
| A second chart speed | Yes. It also looks at a second chart speed. |
| Only at certain hours | Yes. It only acts during set hours. |
| Adding to a trade | It can stack up to 50 trades in the same direction. |
| How much it trades | Each trade uses a fixed 1000 of the quote coin. |
| Cost the author assumed | The author assumed a trading cost of 0 percent per side. |
Default settings
The test used the defaults in the middle column. Nothing was turned to help a coin.
| Setting | Default | Group |
|---|---|---|
| Show on-chart help panel | on | |
| Show status table | off | |
| Table position | Top Right | |
| Show TradingView style tip (hide trade markers) | off | |
| Trading mode | DCA / Grid | |
| Unit mode | Pips (FX) | |
| Point size (if Points) | 0.01 | |
| Pip size (if Pips FX) | 0.01 | |
| MA logic timeframe | Current Chart | |
| Higher TF | D | |
| MA #1 Type | EMA | |
| ma1 source | close | |
| ma1 length | 10 | |
| MA #2 Type | EMA | |
| ma2 source | close | |
| ma2 length | 25 | |
| Use MA #3 filter | on | |
| ma3 type | EMA | |
| ma3 source | close | |
| ma3 length | 50 | |
| Use MA #4 filter | on | |
| ma4 type | EMA | |
| ma4 source | close | |
| ma4 length | 100 |
and 113 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 12 cells, and it placed no trades.
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 | 12 |
|---|---|
| Cells that placed a trade | 0 |
| Finished above zero | 0 |
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
No cell took a trade, so there is no return to read. The rule above is the whole note.
What this does not show
The useful question is the largest loss while the extra buys are still open. A high share of closed wins hides that loss.
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 EMA Stack Strategy (DCA or Single Entry, HTF Logic, Non Repainting)
What is EMA Stack Strategy (DCA or Single Entry, HTF Logic, Non Repainting)?
EMA Stack Strategy (DCA or Single Entry, HTF Logic, Non Repainting) is a dollar-cost averaging trading strategy published on TradingView as a Pine Script. In plain terms it is a rule of the kind this site calls averaging down. It can buy, and it can bet on falling prices. It is built on ATR, EMA, SMA, VWMA, WMA, RMA. This page reads the rules from the code and reports what they did on old crypto prices.
How does EMA Stack Strategy (DCA or Single Entry, HTF Logic, Non Repainting) work?
It can buy, and it can bet on falling prices. It acts only when several checks agree at once. It leans on ATR, EMA, RMA, 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. When it enters, it also sets a stop or a target, so a trade can close without a new signal.
Is EMA Stack Strategy (DCA or Single Entry, HTF Logic, Non Repainting) profitable in a backtest?
There is no result to judge. The rule was tried on 12 cells and never placed a trade, usually because a condition never came true on these coins and chart speeds with the author's default settings.
Where can I find the EMA Stack Strategy (DCA or Single Entry, HTF Logic, Non Repainting) 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 EMA Stack Strategy (DCA or Single Entry, HTF Logic, Non Repainting) uses
Each has its own page: what it measures, how it is read, where it misleads.
- ATR (average true range): the volatility number behind most stops
- Exponential moving average (EMA): what it measures and where it misleads
- Simple moving average (SMA): the plainest average, and why it still runs half the strategies
- Volume-weighted moving average (VWMA): an average that listens to volume
- Weighted moving average (WMA): linear weights, less lag, and the price of it
- Wilder's smoothing (RMA): the average inside RSI, ATR and ADX
"EMA Stack Strategy (DCA or Single Entry, HTF Logic, Non Repainting)" 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.