public TradeTransInfoRecord(TRADE_OPERATION_CODE cmd, TRADE_TRANSACTION_TYPE type, double?price, double?sl, double?tp, string symbol, double?volume, long?ie_deviation, long?order, string comment, long?expiration) { this.cmd = cmd; this.type = type; this.price = price; this.sl = sl; this.tp = tp; this.symbol = symbol; this.volume = volume; this.order = order; this.expiration = expiration; customComment = comment; }
public static TradeTransactionResponse ExecuteTradeTransactionCommand(SyncAPIConnector connector, TRADE_OPERATION_CODE cmd, TRADE_TRANSACTION_TYPE type, double?price, double?sl, double?tp, string symbol, double?volume, long?ie_deviation, long?order, string comment, long?expiration, bool prettyPrint = false) { return(new TradeTransactionResponse(connector.ExecuteCommand(CreateTradeTransactionCommand(cmd, type, price, sl, tp, symbol, volume, order, "", expiration, prettyPrint)).ToString())); }
public static TradeTransactionCommand CreateTradeTransactionCommand(TRADE_OPERATION_CODE cmd, TRADE_TRANSACTION_TYPE type, double?price, double?sl, double?tp, string symbol, double?volume, long?ie_deviation, long?order, string comment, long?expiration, bool prettyPrint = false) { return(CreateTradeTransactionCommand(cmd, type, price, sl, tp, symbol, volume, order, "", expiration)); }
public static TradeTransactionCommand CreateTradeTransactionCommand(TRADE_OPERATION_CODE cmd, TRADE_TRANSACTION_TYPE type, double?price, double?sl, double?tp, string symbol, double?volume, long?order, string customComment, long?expiration, bool prettyPrint = false) { JSONObject args = new JSONObject(); args.Add("tradeTransInfo", (new TradeTransInfoRecord(cmd, type, price, sl, tp, symbol, volume, order, customComment, expiration)).toJSONObject()); return(new TradeTransactionCommand(args, prettyPrint)); }