PCTD (Price % Distance from MA)¶
What it shows: how far the close is from a moving average, in percent. Negative means below the average.
How people use it: buying a dip of a set size (for example 1% below the EMA) and selling a rise of a set size. It is also the cleanest way to say "price crosses its MA" with any MA type.
Pairs well with: RSI for confirmation and ATR to judge whether 1% is big or small for this coin.
Settings¶
| Setting | Default | What it does |
|---|---|---|
| MA type | EMA | The moving average the distance is measured from (SMA, EMA, WMA, RMA or HMA), worked out exactly like that indicator. |
| Length | 20 | Length of that average. |
| Oversold | -1 | How far below the MA counts as a dip, in percent. More negative (like -3) gives fewer, deeper dips. |
| Overbought | 1 | How far above the MA counts as a rise, in percent. |
You set the defaults on the Indicators page. A condition can use its own settings, which override the defaults for that condition only.
Ready-made conditions¶
| For | Condition | Fires when |
|---|---|---|
| Buy | % distance from MA below -1% | every candle PCTD is below -1 |
| Buy | % distance from MA crosses below -1% | the one candle PCTD moves from above -1 to below it |
| Buy | Price crosses above its MA (% distance crosses 0) | the one candle PCTD moves from below 0 to above it |
| Sell | % distance from MA above 1% | every candle PCTD is above 1 |
| Sell | % distance from MA crosses above 1% | the one candle PCTD moves from below 1 to above it |
| Sell | Price crosses below its MA (% distance crosses 0) | the one candle PCTD moves from above 0 to below it |
"Above", "below", "is" and "rising" / "falling" stay true on every candle the state lasts, so they can fire many candles in a row. "Crosses" and "flips" fire once, on the candle it happens, so you get one signal per move. Numbers in the condition names follow your settings on the Indicators page.
Warnings you may see¶
- "It can never be true: a cross happens on one candle, so it cannot happen on N candles in a row. Use 'within the last N candles' instead.": a "crosses" condition with a "… in a row" lookback of 2 or more. Switch the lookback to Within the last.
- "MA type must be one of SMA, EMA, WMA, RMA, HMA": shown in the condition editor; pick one of the listed choices.
- "Length must be between 1 and 1000" / "Length must be a whole number": shown in the condition editor when a condition's own value is out of range. Fix the number; the condition can't be saved until then.
Where they show: on the Strategies page, open Create entry conditions / Edit entry conditions (or the exit ones). Each condition's messages appear right under it. The setting messages ("must be between", "whole number", "must be one of", "must be smaller than") start with the indicator's short name, for example "MACD: Fast must be between 1 and 1000", and keep the conditions from being saved until fixed. The other warnings never block saving and are repeated in the strategy's Entry or Exit section, starting with the condition's name.
Good to know¶
- It is worked out from closing prices only (not volume).
- The same percent is a big move on 1m candles and a small one on 1d candles.
- It needs some history before its value settles: what the chosen moving average needs (for EMA, 3 × the length: 60 at EMA 20). Apathia loads that history for you.
- "% distance below 0" means exactly the same as "price below that MA".