Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

Libraries

BitMEX Trading API Header files - library for MetaTrader 5

Romeu Bertho

Views:
1024
Rating:
votes: 9
Published:
2019.11.15 04:45
Updated:
2019.11.15 04:51
\MQL5\Include\CryptoCharts\TradingAPI\BitMEX\\MQL5\Scripts\CryptoCharts\TradingAPI\BitMEX\
AmendOrder.mq5 (2.27 KB)view
Margin.mq5 (1.94 KB)view
Orderbook.mq5 (1.61 KB)view
Position.mq5 (2.2 KB)view
LimitOrder.mq5 (2.57 KB)view
OrderBulk.mq5 (2.24 KB)view



Getting Started

BitMEX Trading API library was built to be as easy to use as possible. Concern more with the trading strategy logic and less with the code.

All the header files are required to build your BitMEX EA or Script.

Download and install

To use BitMEX Trading API and run all the example codes, you must download all the files and install them in their corresponding folders.

  1. Download the files as ZIP
  2. Open MetaTrader 5
  3. Open Data Folder by pressing Ctrl + Shift + D
  4. Extract the corresponding CryptoCharts folder to \MQL5\Include\ and \MQL5\Scripts\ 

Running some examples

   I'm assuming you already have BitMEX Trading API and you correctly downloaded and installed all the required files above.

  1. Open MetaTrader 5
  2. Open MetaEditor by pressing F4
  3. Go to Scripts\CryptoCharts\TradingAPI\BitMEX in Navigator window
  4. Open one of the examples found there
  5. Set your BitMEX account credentials
  6. Compile the example
  7. Run it on MetaTrader 5 

To set your credentials, you should change the following variables:

//---Set BitMEX account credentials
   string apikey="BITMEX_API_KEY";
   string secret="BITMEX_SECRET";
   bool testnet_account=true;

By default all the examples files are to trade on BitMEX Testnet and XBTUSD symbol. If you want to move to real account, change the boolean variable testnet_account to false.

    LotLoss LotLoss

    Simple risk management tool.

    Coin Toss Trading Coin Toss Trading

    This script opens a buy or sell order randomly having equally spaced take-profit and stop-loss levels.

    Scalp All Scalp All

    This script opens random position at market price on all symbols having spread below specified value.

    MultiMartin MultiMartin

    This is a multi-currency expert adviser based on reversal strategy with martingale. Original idea is taken from ExpMartin for MT4.