MT5-TradingToolCrypto icon indicating copy to clipboard operation
MT5-TradingToolCrypto copied to clipboard

Canceling orders with ID's

Open TradingToolCrypto opened this issue 1 year ago • 3 comments

bool MEXC_Cancel_Trade(string sym, string orderId, string clientOrderId) export

input a string

bug in logic (check binance api library ) if(orderId>0)

TradingToolCrypto avatar Jan 15 '24 07:01 TradingToolCrypto

if(orderId!="") || if(clientOrderId!="")

TradingToolCrypto avatar Jan 15 '24 07:01 TradingToolCrypto

Orders

  • call exchange rest api directly.
    • within function call a. save the order information to global variables b. create text object label, and buttons to close the orders from the chart.
  1. the creation of chart_objects are within the open source file ExchangeHelper.mqh
  2. the creation of global_variables exist within the *Exchanges.ex5 libraries.

TradingToolCrypto avatar Jan 16 '24 13:01 TradingToolCrypto

  1. exchange orderID : order_id chart object
  2. exchange clientOrderID : client_order_id chart object
  3. when canceling orders, either the client or order ids can be used. if client_order_id exists, then use this as default else use the order_id.
  4. a client_order_id is created automatically when using the CBP Framework.

TradingToolCrypto avatar Jan 16 '24 13:01 TradingToolCrypto