Here is a first installment in “How to trade with OptionsX”:

  1. OptionsX is easiest to use with opMPTrader to leverage the buying power of options in running your TradeStation Strategies.
  2. To do so, setup one or more strategy-signal functions (e.g. MyLongSignalFunction and/or MyShortSignalFunction) that product +1, 0, -1 market-position signals.
  3. In the opMPTrader indicator, where the signal functions are to be plugged in, first determine a name for your system like “MySystem”+NumToStr(CurrentDate,0). This enables opMPTrader to keep track of trading information allowing only one of each symbol and account combination for that name. (Note the name can be used with 100’s of unique symbols & account combinations, and if you need/want overlap just setup another opMPTrader instance with a different CustomID. Also note that the NumToStr(CurrentDate,0) component of the name is suggested for day trading systems, so that trading records are separate for each day, forgetting positions from the prior day that should have been closed automatically or manually.)
  4. Then input the account number to be used, which is obviously important for trading. If “” is used, then the default account is located and used. Note that the TakeOwnershipOnce input is not typically necessary. It is only there if you need to assert that current trading records for the CustomID by Symbol and Account need to be owned by the current instance.
  5. Input your CallMarketPositionFunction, then specify whether it can automatically trade calls and if selling calls is allowed. (If automatic trading is not enabled, you still get Alerts for trades as long as alerts are enabled.)
  6. Input your PutMarketPositionFunction, then specify whether it can automatically trade puts and if selling puts is allowed. (If automatic trading is not enabled, you still get Alerts for trades as long as alerts are enabled.)
  7. Trade size relative to +/- 1 signals is determined by TradePositionDollars & MaxPositionContracts.
  8. Trading times are set by StartTime, EndOfDay_Entries and EndOfDay_Exits. (Since opMPTrader is intended for use with options for leverage, and since time values decay, opMPTrader is setup for day trading. It closes positions at the EndOfDay_Exits time if not already closed due to signals. It reinitiates positions on the next day if there are signals to do so.)
  9. For price limits used with orders, setup Entries_SpreadCross_0to100 and Exits_SpreadCross_0to100. 50 is for orders to be placed with limit prices half way between the inside bid and ask. 100 crosses the spread. 0 stays on the buyer or sellers side. -100 places an order away by an amount equal to the spread.
  10. For end-of-day orders, set ExitEOD_MaxSlipPercent. This is to place a limit order to close open positions at a price that limits the maximum slippage from the last price. For options to be highly likely to close at the end of the day, this number may need to be large, like 25 percent or even more.
  11. TargetPriceIncrementMin if set to 0 is set as the minmove of the underlying. For some options, the minimum price increment is larger than the minmove of the underlying, so it can be set manually to avoid the possibility of an order rejections due an invalid limit price.
  12. Set display colors as you prefer.
  13. With ShowFlagsOnClick set whether or not you want a Tip window to display trade signal information (i.e. flags) when you click on the window where opMPTrader is applied.
  14. For traditional TradeStation bar-by-bar and intrabar tick processing (per indicator settings), leave PerTickProcessingOnly = True. Otherwise to force more active code processing (to avoid possible downsides of infrequent underlying ticks), set PerTickProcessingOnly = False. This causes at least one processing cycle per second.

A simple signal function is as follows, to buy if bar close is under bar open or sell short if bar close is over bar open:

{ MyLongSignalFunction }
Switch(Close) Begin
     Case < Open: MyLongSignalFunction = 1;
     Case > Open: MyLongSignalFunction = -1;
     Default: MyLongSignalFunction = 0;

Let us know if we can help put together an OptionsX system for you. Contact us at [email protected].