Enter on a down or up day
Use Entry.Conditions to open positions only when the underlying is above or below a reference price. These comparisons use prices available at the scheduled entry check, so they describe the day's move so far.
Enter below today's open
To enter when the underlying is trading below its opening price, use:
"Conditions": [
"underlying_price < underlying_today_open"
]
In the AI Editor, place this Conditions array inside Entry. Keep the other required fields, including the entry schedule and any additional entry conditions.
Enter above today's open
Reverse the comparison to enter when the underlying is trading above its opening price:
"Conditions": [
"underlying_price > underlying_today_open"
]
Require an opening gap in the same direction
For a down-day filter that also requires the market to have opened below the previous trading day's close, combine both comparisons:
"Conditions": [
"underlying_price < underlying_today_open",
"underlying_today_open < underlying_prevday_close"
]
Both conditions must be true: the market opened below the previous close and is now below today's open. The built-in [FEAT-Entry-DownDays] example uses this logic, expressed with and in a single condition.
For the corresponding up-day filter, use:
"Conditions": [
"underlying_price > underlying_today_open",
"underlying_today_open > underlying_prevday_close"
]
These comparisons describe direction, not the size of the move. With strict < and > comparisons, equal prices do not qualify.
Test the filter
Review the price variables in the Script Engine reference, then validate and run the strategy in MesoSim. Your entry schedule determines when the conditions are checked.
Use Clone to change one condition or entry time at a time and compare backtest results. See the Strategy Library for the complete built-in example, or combine the price filter with an Implied Volatility filter.