Пример #1
0
 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.ie_deviation = ie_deviation;
     this.order = order;
     this.comment = comment;
     this.expiration = expiration;
 }
Пример #2
0
 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)
 {
     return new TradeTransactionResponse(connector.executeCommand(createTradeTransactionCommand(cmd, type, price, sl, tp, symbol, volume, ie_deviation, order, comment, expiration, prettyPrint)).ToString());
 }
Пример #3
0
 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)
 {
     JSONObject args = new JSONObject();
     args.Add("tradeTransInfo", (new TradeTransInfoRecord(cmd, type, price, sl, tp, symbol, volume, ie_deviation, order, comment, expiration)).toJSONObject());
     return new TradeTransactionCommand(args, prettyPrint);
 }