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; }
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()); }
public static ProfitCalculationResponse executeProfitCalculationCommand(SyncAPIConnector connector, string symbol, double? volume, TRADE_OPERATION_CODE cmd, double? openPrice, double? closePrice , bool prettyPrint) { return new ProfitCalculationResponse(connector.executeCommand(createProfitCalculationCommand(symbol, volume, cmd, openPrice, closePrice, prettyPrint)).ToString()); }
public static MarginTradeResponse executeMarginTradeCommand(SyncAPIConnector connector, string symbol, double? volume, TRADE_OPERATION_CODE cmd, bool prettyPrint) { return new MarginTradeResponse(connector.executeCommand(createMarginTradeCommand(symbol, volume, cmd,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) { 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); }
public static ProfitCalculationCommand createProfitCalculationCommand(string symbol, double? volume, TRADE_OPERATION_CODE cmd, double? openPrice, double? closePrice ,bool prettyPrint) { JSONObject args = new JSONObject(); args.Add("symbol", symbol); args.Add("volume", volume); args.Add("cmd", cmd.longValue()); args.Add("openPrice", openPrice); args.Add("closePrice", closePrice); return new ProfitCalculationCommand(args,prettyPrint); }
public static MarginTradeCommand createMarginTradeCommand(string symbol, double? volume, TRADE_OPERATION_CODE cmd, bool prettyPrint) { JSONObject args = new JSONObject(); args.Add("symbol", symbol); args.Add("volume", volume); args.Add("cmd", (long)cmd.longValue()); return new MarginTradeCommand(args, prettyPrint); }