Backtests
...
Running a Backtest
Positions

Entry Conditions

below a backtest position's overview docid\ nqs qupite 4nlolsmxyb fields, you'll find fields for entry conditions (entry timing and strike selection) those fields are explained below entry timing entry frequency (required) this determines how frequently to enter trades your choices are sequential enter a new trade as soon as the previous trade closes assuming the current underlying/market conditions meet your entry criteria daily enter once per day if entry criteria are met weekly enter a new trade once a week at a specific day and time of day monthly enter a new trade once a month on a specific day of the month number and time of day if the market is closed on this day of month, the backtest will enter a trade on the next day the market opens position trigger enter a new trade on this position based on the status of a different position you have a few different choices here has open trade this will allow entry when the other position has an open trade has no open trade this will allow entry when the other position does not have an open trade closes at profit this will allow entry when the other position closes a trade at a profit closes at a loss this will allow entry when the other position closes a trade at a loss any exit this will allow entry when the other position closes a trade no matter the type you select, entry will occur 1 minute after the other position exits and is only valid for the current market session while any other filters or market conditions are met, otherwise that entry is skipped for the day enter second position (optional) this is only available if your entry frequency from above is sequential if you have sequential entry, you have the ability to double up your position by entering a second trade, with an existing trade already open this doubling up will occur at a designated days to expiration and time of day for the existing trade this feature can be used however your creativity allows, but one common use case is when holding a trade that is near expiration rather than spending brokerage fees and losing to slippage by closing the existing position, just hold onto it until expiration while entering a new trade with a future expiration days of week (optional for daily, sequential, and position trigger) daily, sequential, and position trigger can enter at different days and times of the day if you would like to restrict those to certain days of the week, you can do so with this field earliest time of day (optional) the earliest time of day to enter a new trade latest time of day (optional) the latest time of day to enter a new trade same day re entry (optional) this is only available if your entry frequency from above is sequential if you only want to enter a new trade based on the profit/loss result of the previous trade, you can specify that here this will restrict the backtest from subsequent entries each day only when the last trade closes at a profit or a loss (based on your choice) this filter is not analyzed for the first trade each day, so the bot will not go back and look at a trade closed on a prior day this is only used when cycling into new trades intraday max entries per day (optional) this is only available if your entry frequency from above is sequential sequential positions will open a new position when the prior one closes, assuming all entry conditions are met this can result in multiple positions per day if you'd like to limit the number of positions entered in a single day, you can use this setting entry strike selection target dte (required) target days to expiration for each new trade the backtest will find and select the expiration closest to this number of days to expiration at entry minimum dte (optional) if you would like to ensure that all trades are at least a certain number of days to expiration, enter that here if your target is more than 5 dte and you do not specify a minimum, the backtester will accept any days to expiration that is within 50% of your target maximum dte (optional) if you would like to ensure that all trades are no more than a certain number of days to expiration, enter that here if your target is more than 5 dte and you do not specify a minimum, the backtester will accept any days to expiration that is within 50% of your target put position strike selection for positions that include put options, the following fields are available to determine which strikes to select put strike target (required) delta select a put strike that is closest to a certain delta value % otm select a put strike that is closest to a certain percentage out of the money relative to the current underlying price premium select a put strike that is closest to a certain premium (mid/mark) amount this is the premium only for this strike, not total premium for multiple legs put spread strike selection any put that includes a spread, including credit spreads, debit spreads, iron butterflys, and iron condors, use the following fields to configure how to set up the spread spread strike target type (required) this controls how the long strike of a put credit spread is selected or the short strike of a put debit spread is selected % from main strike closest strike that is a certain percentage away from your main strike this would be a percentage distance between strikes for the put spread delta strike that is closest to this delta value premium strike with a mid/mark price closest to this value if you use this setting, you can also optionally provide a maximum width for the spread so that the backtest only goes so wide on the spread while looking for a certain premium target on the spread strike width strike that offers a total put spread width closest to this value call position strike selection for positions that include call options, the following fields are available to determine which strikes to select call strike target (required) delta select a call strike that is closest to a certain delta value % otm select a call strike that is closest to a certain percentage out of the money relative to the current underlying price premium select a call strike that is closest to a certain premium (mid/mark) amount this is the premium only for this strike, not total premium for multiple legs call spread strike selection any call that includes a spread, including credit spreads, debit spreads, iron butterflys, and iron condors, use the following fields to configure how to set up the spread spread strike target type (required) this controls how the long strike of a call credit spread is selected or the short strike of a call debit spread is selected % from main strike closest strike that is a certain percentage away from your main strike this would be a percentage distance between strikes for the call spread delta strike that is closest to this delta value premium strike with a mid/mark price closest to this value if you use this setting, you can also optionally provide a maximum width for the spread so that the backtest only goes so wide on the spread while looking for a certain premium target on the spread strike width strike that offers a total call spread width closest to this value