The discussion started here https://www.elitetrader.com/et/threads/option-code-lookup.308002/#post-4429749 and has evolved into a topic more suited for a programming thread as opposed to where it is now. I am looking to day trade options with the Multicharts .NET platform or other suitable approach as my trial period for multi-charts is running out. Multicharts does have the ability to trade options. What makes it challenging is that you cannot easily lookup an option code and define a constant for a term to designate that particular type of option. The re-usable constant in my case would be one for a "nearest term", "deep in-the-money", "call option", for a given input which in this case, would be an underlying such as SPY or SPX. I can define the specific parameters for what I mean by a "nearest term", "deep in-the-money", "call option", but do not yet know how to build the .NET class or other parameter to calculate what it is, and use it on each signal. A Call Option (CALL). Nearest Term (NT) = Least number of days to expiration. In-The-Money (ITM) = Delta closest to .90 but not higher. Assistance is greatly appreciated.
I need assistance in modifying this code to calculate the option code to be used at the time of each signal. Code: namespace PowerLanguage.Strategy { [IOGMode(IOGMode.Disabled)] public class Key_Reversal_LE_data2 : SignalObject { private IOrderMarket m_KeyRevLE; public Key_Reversal_LE_data2(object ctx) : base(ctx) { Length = 1; } [Input] public int Length { get; set; } protected override void Create(){ m_KeyRevLE = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, "KeyRevLE", EOrderAction.Buy)); } // Using BarsofData(2) in place of original Bars in order to get the signal to be based on the data2 // which contains the stock symbol where the actual order is placed on the option symbol itself. protected override void CalcBar(){ if (PublicFunctions.DoubleLess(BarsOfData(2).Low[0], BarsOfData(2).Low.Lowest(Length, 1)) && PublicFunctions.DoubleGreater(BarsOfData(2).Close[0], BarsOfData(2).Close[1])) m_KeyRevLE.Send(); } } }