Select a leg at a fixed strike distance
Use a StrikePrice selector to place a leg a fixed number of strike points above or below another leg.
For example, this expression selects a strike 25 points below the short put's strike:
"StrikePrice": "leg_short_put_strike - 25"
Define the referenced leg first so its strike is available when the next leg is selected. In this example, short_put comes before long_put.
Example: a 25-point put spread
In the AI Editor, use the following Legs array within the Structure section. Keep the other required fields in your Strategy Definition, including the expiration named 0dte.
"Legs": [
{
"Name": "short_put",
"Qty": "-1",
"ExpirationName": "0dte",
"StrikeSelector": {
"Min": 4,
"Max": 6,
"Delta": "5"
},
"OptionType": "Put"
},
{
"Name": "long_put",
"Qty": "1",
"ExpirationName": "0dte",
"StrikeSelector": {
"StrikePrice": "leg_short_put_strike - 25"
},
"OptionType": "Put"
}
]
If the short put is selected at a strike of 5000, the long put targets a strike of 4975. Use + 25 instead to target a strike 25 points above the referenced leg.
For a complete example, open the SPX-0DTE-IronCondor template from the Strategy Library in MesoSim. Follow Create and run a backtest to validate and run your strategy.