public TradeBotBase(String stockid, string brokerid, string account, ushort BuyQty, Intelligence.QuoteCom quotecom, Smart.TaiFexCom taifexcom, int amountthreshold, BuyMode buymode, StopLossMode stoplossmode, LockGainMode lockgainmode) { this.stockid = stockid; this.quotecom = quotecom; this.taifexcom = taifexcom; this.brokerid = brokerid; this.account = account; this.BuyQty = BuyQty; //this.StopLossRatio = stoplossratio; //this.LockGainPrice = lockgainprice; this.AmountThreshold = amountthreshold; this.buy_mode = buymode; this.stoplossmode = stoplossmode; this.lockgainmode = lockgainmode; this.trade_status = TradeStatus.StandBy; OnStatusChange(this.trade_status, stockid + ":待命中"); //初始化成交明細下載目錄 this.MatchLogFolder = Path.Combine(Directory.GetCurrentDirectory(), DateTime.Now.ToString("yyyyMMdd")); //建立目錄 if (!Directory.Exists(this.MatchLogFolder)) { Directory.CreateDirectory(this.MatchLogFolder); } }
private double StopLossRatio = 0.0; //停損百分比 public TradeBot(String stockid, string brokerid, string account, ushort BuyQty, Intelligence.QuoteCom quotecom, Smart.TaiFexCom taifexcom, double stoplossratio) { this.stockid = stockid; this.quotecom = quotecom; this.taifexcom = taifexcom; this.brokerid = brokerid; this.account = account; this.BuyQty = BuyQty; this.StopLossRatio = stoplossratio; }
public TradeBotBase(String stockid, string brokerid, string account, ushort BuyQty, Intelligence.QuoteCom quotecom, Smart.TaiFexCom taifexcom, double stoplossratio, double lockgainprice, int amountthreshold, BuyMode buymode, StopLossMode stoplossmode, LockGainMode lockgainmode) { this.stockid = stockid; this.quotecom = quotecom; this.taifexcom = taifexcom; this.brokerid = brokerid; this.account = account; this.BuyQty = BuyQty; this.StopLossRatio = stoplossratio; this.LockGainPrice = lockgainprice; this.buy_mode = buymode; this.stoplossmode = stoplossmode; this.lockgainmode = lockgainmode; }