TomorrowOpen

Category: ProBacktest

The TomorrowOpen instruction in ProBuilder language is used to schedule a trading order to be executed at the market opening of the next trading day. This is particularly useful for strategies that are based on the closing conditions of the current day and aim to execute at the beginning of the next day to potentially capitalize on overnight market developments.

Syntax:

AT MARKET TomorrowOpen

Example:

Consider a scenario where a trader wants to buy contracts based on specific conditions that are not currently met. The following ProBuilder script uses the TomorrowOpen instruction to place an order at the next day’s market open if certain conditions for a long position are met and there is no existing long position in the market:

IF NOT LongOnMarket AND LongConditions THEN
    BUY 1 CONTRACT AT MARKET TomorrowOpen
ENDIF

Explanation:

  • IF NOT LongOnMarket AND LongConditions: This line checks if there is no current long position in the market (LongOnMarket) and if the predefined conditions for entering a long position (LongConditions) are satisfied.
  • BUY 1 CONTRACT AT MARKET TomorrowOpen: If the conditions are met, this line schedules the purchase of one contract at the market price at the opening of the next trading day.

This instruction is particularly useful for strategies that prefer executing orders at the start of the trading day to avoid intraday price volatility or to align with strategies based on daily price closings.

Logo Logo
Loading...