/// <summary> /// Обработчик под тип данных IOption /// </summary> public void Execute(IOption source) { source.UnderlyingAsset.Commission = CalculateCommission; bool showError = true; foreach (var strike in source.GetStrikes()) { try { strike.Commission = CalculateCommission; } catch (NullReferenceException nre) { if (showError) { showError = false; string msg = String.Format("[DEBUG:{0}] {1}. Property 'Security' is empty for strike {2}. FullName:{3}. (The message is displayed only once.)", GetType().Name, nre.GetType().FullName, strike.Strike, strike.FinInfo.Security.FullName); Context.Log(msg, MessageType.Error, true); } } } }
public IList <int> Execute(IOption source) { MakeList(source.UnderlyingAsset.Bars.Count, source.GetStrikes().Count()); return(this); }
public IList <Double2> Execute(IOption source, IReadOnlyList <InteractiveObject> data) { var strikes = source.GetStrikes().ToArray(); return(Calculate(strikes, data)); }
public IList <Double2> Execute(IOption source, InteractiveSeries data) { var strikes = source.GetStrikes().ToArray(); return(Calculate(strikes, data.ControlPoints)); }