In the Profectus strategy builder, you compare the body size of the candle with its total size. This is how you distinguish a strong breakout candle from an indecisive doji: a strong breakout has a large body relative to the range; a doji has a tiny body (open ≈ close).
The rule
Body/range ratio = |close − open| / (high − low)
Strong breakout candle: large body relative to the range (little shadow).
Doji: very small body relative to the range (open ≈ close).
How to configure it in the builder
You can do this directly in the Trade Rule block, without formulas or variables. Select Candle on both sides of the comparison and use the values (in pips):
CandleBodySizeInPips: the body (|Close − Open|)
CandleTotalSizeInPips: the total range (High − Low)
The Adjust field for each value allows you to multiply/divide by a number, and this is how you apply the percentage.
Strong breakout filter (body ≥ 60% of range): CandleBodySizeInPips ≥ CandleTotalSizeInPips, with Adjust: × 0.6 on the right side.
Filter that excludes doji (body < 50% of range): CandleBodySizeInPips < CandleTotalSizeInPips, with Adjust: ÷ 2 (or × 0.5) on the right side.
Use the Candle ID to choose the candle: 0 = current candle (still forming), 1 = last closed candle. For a breakout filter, the recently closed candle (1) is typically used.
Thresholds (you choose, there is no "official" value)
Profectus doesn't fix a number; it depends on your pattern/strategy. There are two levels of strictness worth knowing:
Classic doji: body ≤ ~10% of the range, a candle with almost no body (open ≈ close). This is the strict, textbook definition.
Weak-candle filter: body < 50% of the range, a broader filter many traders use to exclude any indecisive candle, not just perfect dojis. This is why the example below uses ÷2 (×0.5).
For a strong breakout, a common reference is body ≥ ~60% of the range.
So the two example filters serve different goals: use the 60% filter to require a strong breakout, and the 50% filter to exclude weak/doji-like candles. Pick the one that matches what your rule is trying to do.
Worked example (in pips)
Candle A: body 40 pips, total range 55 pips → 40 / 55 = 73%. In Trade Rule: CandleBodySizeInPips (40) ≥ CandleTotalSizeInPips × 0.6 (33) → true → passes (strong breakout).
Candle B: body 2 pips, total range 60 pips → 2 / 60 = 3%. In Trade Rule: CandleBodySizeInPips (2) ≥ CandleTotalSizeInPips × 0.6 (36) → false → does not pass (doji).
