public POrder GetOrder(SweepMember_Share share) { // 1. aging을 점검하고 초기 주문인지 여부를 확인한다. long aging = share.Aging; if (aging == 0) { // 최초 주문이다. InitPrice와 CodeEnterSweep을 이용하여 주문을 한다. ReqOrderInput_BondArb reqOrderInput = share.OrderGenInput as ReqOrderInput_BondArb; String code = reqOrderInput.CodeForEnterSweep; double reqPrice = reqOrderInput.InitReqPrice; long reqCount = share.TargetCount - share.ContractedCount; TradingDirection longShort = reqOrderInput.LongShort; Account account = reqOrderInput.TargetAccount; RawMarketData rmdClone = RmdManager.Ins().GetData(code).Clone() as RawMarketData; POrder order = new POrder(longShort, code, reqCount, reqPrice, account, rmdClone, BondUtil.GetMarketType(code), false); return order; } else { logger.Warn("아직 작업중인 곳입니다."); } return null; }
public Boolean IsResumeChance(SweepMember_Share share) { if (_timer.On()) { return false; } // time out, 하지만 주문이 Bid, Ask 사이에 있는지 확인해 보고 사이에 있다면 타이머를 reset하자. RawMarketData rmdClone = RmdManager.Ins().GetDataClone(_order.Code); double reqPrice = _order.ReqPrice; if (rmdClone.BidPrice1 <= reqPrice && reqPrice <= rmdClone.AskPrice1) { _timer.Reset(); return false; } return true; }
public Boolean IsResumeChance(SweepMember_Share share) { //TODO return false; }
public void Reset(SweepMember_Share share) { }
public void Reset(SweepMember_Share share) { _timer.Reset(); }
public Boolean IsResumeChance(SweepMember_Share share) { // 항상 false를 반환한다. return false; }