Previous Open
Previous Open places a resting order at the opening price of the previous bar, and it offers the price comparisons around that level as rules. It is the cheapest of the price-level points: no moving average, no band — one price of one completed bar.
Role in the strategy
| Slot | Available | Role |
|---|---|---|
| Entry Point | Yes | Enters at the previous bar's opening price. |
| Entry Rule | Yes | Filters entries by the bar open or the bar close relative to the level. |
| Exit Point | Yes | Exits at the previous bar's opening price. |
| Exit Rule | Yes | Triggers exits by the bar close relative to the level. |
As a point the previous open is the pending order price: the order fills when the bar reaches it. 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: a closing condition in front of an order level is never read. Only Bar Open and Bar Close allow them.
Logic rules
- Entry Point: Enter at Previous Open.
- Exit Point: Exit at Previous Open.
- Rule slots:
| Rule | Long signal is 1 when | Short signal is 1 when |
|---|---|---|
| The bar opens above the previous open | the bar open is above the previous open | the bar open is below the previous open |
| The bar opens below the previous open | the bar open is below the previous open | the bar open is above the previous open |
| The bar closes above the previous open | the bar close is above the open of the bar before it | the bar close is below the open of the bar before it |
| The bar closes below the previous open | the bar close is below the open of the bar before it | the bar close is above the open of the bar before it |
The two The bar closes lines are exit-only (Exit Rules): they compare the close of the bar the rule reads with the open of the bar before it, so behind a Bar Close exit the rule judges the bar being closed.
The two The bar opens lines always read the previous closed bar, whatever the slot's execution time: a bar open compared with a level of its own bar would be structurally false. That is the same pin the band indicators use for their The bar opens … family.
Parameters
The indicator has no parameters: the level is the bar's own open price.
Calculation
- The order price (point slot) is the open of the read bar, with the standard gap-to-open protection: a level the price gapped across moves to the bar open, so the order cannot be missed on a weekend or news gap.
- The rule lines compare the price of the bar being judged with the previous open, using the standard dead zone (
SIGMA = 0.000001).
Backtesting
- Behind a Bar Open entry point the order rests at the previous bar's open; behind a Bar Close exit point it rests at the open of the bar being closed. The read bar follows the slot, so the level and the rules always agree.
- The close rules read the previous closed bar behind a Bar Open point and the current bar behind a Bar Close point — the export re-evaluates them at the bar-close event on the near-final bar, exactly as the backtester does.
- No indicator value is drawn: the level is a price, not a series.