Bar Open

The open price and the open time of a bar.

Role in the strategy

SlotAvailableRole
Entry PointYesOpens positions at the bar open price.
Entry RuleNo—
Exit PointYesCloses positions at the bar open price.
Exit RuleNo—

Bar Open is the default entry point of a new strategy. It has no parameters and produces no conditions: it always allows both directions, and the rules (if any) decide whether a position opens. As an exit point it closes at the open price of the next bar.

As an exit point it is a market exit, so the strategy may carry Exit Rules in front of it — the rules allow or deny the exit and the position still closes at the bar open price.

Bar Open is in the Generator exit-point pool next to Bar Close. On a market that trades continuously through the day — forex, crypto, most commodity CFDs — the Generator draws Bar Open and leaves Bar Close out, because the bar open is the price MetaTrader is guaranteed to give the Expert Advisor at a known time.

Logic rules

  • Entry Point: Enter at Bar Open.
  • Exit Point: Exit at Bar Open.

Parameters

None.

Calculation

The price component mirrors the bar open price series of the data set (engine/indicators/indicator-bar-open.ts). There is no chart line: the order price itself is the bar open.

Backtesting

The entry and exit point together select the per-bar simulator (see engine/backtester/backtester-core.ts):

Entry pointExit pointScenario
Bar OpenBar OpenOpenOpen
Bar OpenBar CloseOpenClose
Bar Openother indicatorOpenIndicator
Bar OpenNo Indicator ExitOpenClose without the indicator exit
  • Entry orders are placed at the bar open of the next bar after the rules allow a direction.
  • With no entry rules, both directions are allowed every bar: when both are possible at the same price, the bar is ambiguous and no order is placed. See Ambiguous Bars.
  • The exit at bar open closes at the next bar's open.