public EDoorEachMonitorEnterData( EDoorEachMonitorEnterController owner, KospiOptionInfo koi_0, KospiOptionInfo koi_1, KospiOptionInfo koi_2, KospiOptionInfo koi_3, KospiOptionInfo koi_4, ElwInfo ei) { Trace.Assert(ei.CallPut == koi_0.CallPut); Trace.Assert(koi_0.CallPut == koi_1.CallPut); Trace.Assert(koi_1.CallPut == koi_2.CallPut); Trace.Assert(koi_2.CallPut == koi_3.CallPut); Trace.Assert(koi_3.CallPut == koi_4.CallPut); Trace.Assert(Util.IsSameDouble(ei.Strike, koi_0.Strike, 2)); this._owner = owner; this.KOI_0 = koi_0; this.KOI_1 = koi_1; this.KOI_2 = koi_2; this.KOI_3 = koi_3; this.KOI_4 = koi_4; this.EI = ei; this.LiveOrder = null; this.CurEDoorOrderState = EDoorOrderState.Idle; }
public EDoorEachMonitorEnterController( EDoorMonitorEnterController parent, KospiOptionInfo koi_0, KospiOptionInfo koi_1, KospiOptionInfo koi_2, KospiOptionInfo koi_3, KospiOptionInfo koi_4, ElwInfo ei) { this.Parent = parent; this._data = new EDoorEachMonitorEnterData(this, koi_0, koi_1, koi_2, koi_3, koi_4, ei); this._monitorEnter = new MonitorState(this); }
void RegisterRefKOIs( KospiOptionInfo koi_0, ref KospiOptionInfo koi_1, ref KospiOptionInfo koi_2, ref KospiOptionInfo koi_3, ref KospiOptionInfo koi_4) { DateTime maturity = Util.GetSystemOptionMaturity(); CallPutFlag cp = koi_0.CallPut; double strike_0 = koi_0.Strike; double strike_1 = GetDoorRefStrike(strike_0, cp); double strike_2 = GetDoorRefStrike(strike_1, cp); double strike_3 = GetDoorRefStrike(strike_2, cp); double strike_4 = GetDoorRefStrike(strike_3, cp); koi_1 = OptionUtil.GetKOI(strike_1, cp, maturity); koi_2 = OptionUtil.GetKOI(strike_2, cp, maturity); koi_3 = OptionUtil.GetKOI(strike_3, cp, maturity); koi_4 = OptionUtil.GetKOI(strike_4, cp, maturity); }
void CreateAndRegisterEachController(KospiOptionInfo koi_0, ElwInfo ei) { KospiOptionInfo koi_1 = null; KospiOptionInfo koi_2 = null; KospiOptionInfo koi_3 = null; KospiOptionInfo koi_4 = null; RegisterRefKOIs(koi_0, ref koi_1, ref koi_2, ref koi_3, ref koi_4); if (koi_0 == null || koi_1 == null || koi_2 == null || koi_3 == null || koi_4 == null) { // 완벽하지 않은 KOI return; } EDoorEachMonitorEnterController eachController = new EDoorEachMonitorEnterController(this, koi_0, koi_1, koi_2, koi_3, koi_4,ei); this._eachControllers.Enqueue(eachController); }