예제 #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 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());
 }
예제 #4
0
 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());
 }
예제 #5
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);
 }
예제 #6
0
 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);
 }
예제 #7
0
 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);
 }