DeMarker

The DeMarker compares the most recent maximum and minimum prices to assess the demand for an asset.

Role in the strategy

SlotAvailableRole
Entry PointNo—
Entry RuleYesFilters entries by the DeMarker direction or its level position.
Exit PointNo—
Exit RuleYesTriggers exits by the DeMarker direction or its level position.

The DeMarker produces conditions, not order prices. As an entry rule it is ANDed with the entry point and the other entry rules; as an exit rule it is ORed with the other exit rules. See Indicators for the slot semantics.

Logic rules

The indicator offers the standard oscillator rule set, evaluated on the DeMarker value:

RuleLong signal is 1 whenShort signal is 1 when
DeMarker risesDeMarker rose on the previous barDeMarker fell on the previous bar
DeMarker fallsDeMarker fell on the previous barDeMarker rose on the previous bar
DeMarker is higher than the Level lineDeMarker is above LevelDeMarker is below 1 − Level
DeMarker is lower than the Level lineDeMarker is below LevelDeMarker is above 1 − Level
DeMarker crosses the Level line upwardDeMarker crossed above Level from belowDeMarker crossed below 1 − Level from above
DeMarker crosses the Level line downwardDeMarker crossed below Level from aboveDeMarker crossed above 1 − Level from below
DeMarker changes its direction upwardDeMarker formed a valley (down then up)DeMarker formed a peak (up then down)
DeMarker changes its direction downwardDeMarker formed a peak (up then down)DeMarker formed a valley (down then up)

The Level parameter sets the long threshold; the short threshold is always 1 − Level. With the default Level of 0.3, the long side uses 0.3 and the short side uses 0.7.

Parameters

ParameterTypeDefaultRangePurpose
Periodnumber141 to 1000Bars over which the extremes are summed
Levelnumber0.30 to 1Long threshold; the short threshold is 1 − Level

Calculation

tech.DeMarker in engine/indicator-engine/tech.ts computes:

  • DeMax: positive increases of the high over the previous bar's high.
  • DeMin: positive decreases of the previous bar's low under the current low.
  • DeMarker = SMA(DeMax) / (SMA(DeMax) + SMA(DeMin)) over the Period.

The DeMarker line is drawn in a separate chart pane and always stays between 0 and 1.

Backtesting

  • The rule is evaluated on the previous (closed) bar with the standard dead zone (SIGMA = 0.000001).
  • The indicator contributes only long/short signal arrays — it never changes the entry or exit order price.
  • An entry happens only when the entry point allows the direction and every entry rule passes; an exit happens when the exit point is reached and any exit rule passes.