Previous Close

Previous Close places a resting order at the closing price of the previous bar, and it offers the price comparisons around that level as rules. The previous close is the most-watched reference of all: a break of it is the market's own definition of "the day turned".

Role in the strategy

SlotAvailableRole
Entry PointYesEnters at the previous bar's closing price.
Entry RuleYesFilters entries by the bar open or the bar close relative to the level.
Exit PointYesExits at the previous bar's closing price.
Exit RuleYesTriggers exits by the bar close relative to the level.

As a point the previous close is the pending order price; as a rule it contributes only the long/short signal arrays. See Indicators for the slot semantics.

As an exit point it places a resting order the bar reaches, so it carries no Exit Rules. Only Bar Open and Bar Close allow them.

Logic rules

  • Entry Point: Enter at Previous Close.
  • Exit Point: Exit at Previous Close.
  • Rule slots:
RuleLong signal is 1 whenShort signal is 1 when
The bar opens above the previous closethe bar open is above the previous closethe bar open is below the previous close
The bar opens below the previous closethe bar open is below the previous closethe bar open is above the previous close
The bar closes above the previous closethe bar close is above the close of the bar before itthe bar close is below the close of the bar before it
The bar closes below the previous closethe bar close is below the close of the bar before itthe bar close is above the close of the bar before it

The two The bar closes lines are exit-only (Exit Rules); the two The bar opens lines always read the previous closed bar, whatever the slot's execution time. Previous Open explains both conventions.

Parameters

The indicator has no parameters: the level is the bar's own close price.

Calculation

  • The order price (point slot) is the close of the read bar, with the standard gap-to-open protection.
  • The rule lines compare the price of the bar being judged with the previous close, using the standard dead zone (SIGMA = 0.000001).

Backtesting

  • Behind a Bar Open entry point the order rests at the previous bar's close — the classic "break of yesterday's close" level; behind a Bar Close exit point it rests at the close of the bar being closed.
  • The close rules read the previous closed bar behind a Bar Open point and the current bar behind a Bar Close point, matching the export's bar-close re-evaluation.
  • No indicator value is drawn: the level is a price, not a series.