public Tactics(string instrument_id, BaseTaticsHelper helper) { V_Instrument_id = instrument_id; m_TaticsHelper = helper; V_TacticsState = EM_TacticsState.Start; V_OrderState = EM_OrderOperation.Normal; orderPercent = float.Parse(AppSetting.Ins.GetValue("OrderValue")); Start(); }
/// <summary> /// 改变开单操作状态 /// </summary> /// <param name="coin"></param> /// <param name="state"></param> /// <returns> /// </returns> public int F_ReqChangeOrderState(string coin, int state) { try { EM_OrderOperation em_state = (EM_OrderOperation)state; string instrument_id = ""; if (!IsTacticsRunning(coin, out instrument_id)) { return(-1); } else { m_TacticsDic[instrument_id].SetOrderState(em_state); return(1); } } catch (Exception ex) { return(0); } }
public void SetOrderState(EM_OrderOperation state) { V_OrderState = state; }