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); }