Skip to content

PCTD (Price % Distance from MA)

How far the close is from a moving average, in percent. Negative means below the average.

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.

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

Warnings

  • Blocks Save: Length 1–1000 (whole number); MA type one of SMA, EMA, WMA, RMA, HMA.

Good to know

  • The same percent is a big move on 1m candles and a small one on 1d candles.
  • Needs what the chosen moving average needs (for EMA, 3 × the length: 60 at EMA 20).
  • "% distance below 0" means exactly the same as "price below that MA".