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;
 }
Пример #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 = false)
 {
     return(new TradeTransactionResponse(connector.ExecuteCommand(CreateTradeTransactionCommand(cmd, type, price, sl, tp, symbol, volume, order, "", 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 = false)
 {
     return(CreateTradeTransactionCommand(cmd, type, price, sl, tp, symbol, volume, order, "", expiration));
 }
Пример #4
0
        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));
        }