GRat Crypto Manual – Trading Systems – 29 November 2022

0
12

1. Run MT5 on any account (even demo).
2. In MT5 go to Tools – Options.
a. On the Letters tab, enter Maximum bars in chart: the default number of bars to load from the exchange (Although it cannot load more bars than is available through the exchange API).
b. On the Specialist Advisors tab, check Allow WebRequest for listed URL:

stream.binance.com

fstream.binance.com

testnet.binance.vision

stream.binancefuture.com

stream.bybit.com

stream-testnet.bybit.com

ws-api.kucoin.com

push-private-sandbox.kucoin.com

https://www.okx.com

ws.okx.com

wspap.okx.com

3. Run GRat_Crypto EA on any chart.
4. On the Inputs tab enter the parameters:

Magic – Important! Everyone copy of GRat_Crypto running on the same terminal must have a unique magic number.

Mode Nutrition Only only feeds market data for the selected currency/pair for charts; Business Only – only trades on the selected currency/pair (you have to feed marked data with another GRat_Crypto case); Nutrition and Business – both food and business.

WebSocket – if true (recommended), then market data is requested by WebSocket API (possible for Binance, Bybit, KuCoin and OKX), otherwise – by REST API.

UpdateMilliseconds – frequency of quote request (0 – minimum possible for the exchange).

QuotesBeginning – the start date of the citation history. If 1970.01.01 00:00:00 is fixed, then no more than the number of bars specified in the Maximum bars in chart: terminal configuration will be loaded.

Simulation – if true then the EA does not open real trades on crypto exchanges, but only draws lines on the chart and displays the trades in Trade panel. Use it for testing. For a real business set false.

Business Alerts – if true then an alert will appear on each business event, otherwise just a record in the log.

Error Alerts – if true then an alert will appear for each error, otherwise just a record in the log.

ShowTradesOnChart – if true then the chart will show lines from opening to closing positions.

=== CopyFrom ===

Exchange on Start – when you start GRat_Cryptoif there are open orders or positions in the cryptocurrency exchange, you will be asked to copy them to the EA.

Symbol – you can run any EA or trade manually in any account (even demo) and GRat_Crypto will copy all orders and trades made by other EAs of the specified symbol (not empty) to the cryptocurrency exchange.

magic – you can run any EA on any account (even demo) and GRat_Crypto will copy all orders and trades made by other EAs with the specified magic number (not zero) to the cryptocurrency exchange.

File – if true then GRat_Crypto will copy orders from OrderExchange.csv file (added after GRat_Crypto start only). See below how to add orders to this file.

common – if truethen the OrderExchange.csv file is located in the shared directory of all client terminals ..TerminalCommonFilesif false – in the directory of the current terminal ..MQL5Files.

=== Exchange === – cryptocurrency exchange (Binance, Bybit, Kraken, KuCoin or OK).

Coin – currency or instrument to trade, e.g. Binance – BTCBybit – BTCKraken – XBTKuCoin – BTCOK – BTC or BTC_USD_SWAP or BTC-USDT-220624.

Base – balanced currency, e.g., Binance – USDTBybit – USDTKraken – American dollarKuCoin – USDTOK – USDT or American dollar.

APKkey – exchange API public key.

APISecret – exchange API private key.

Book Depth – the number of entries in the order book (0 – disabled). To see, open the “Market Depth” window in MT5.

WalletType – business wallet type: Exchange – location, margin – (Binance only) or Futures (Binance, KuCoin and OKX only).

Leverage – leverage depending on the capacity of the exchange (eg, Binance Futures wallet – 1..125).

KuCoin Passphrase – required only for KuCoin.

OKX Passphrase – required only for OKX.

=== Dashboard ===

ScalePercent – size of panels in percentage to original (in case of custom system font).

PerPage – the number of lines per page in the Trades and History panel.

Maximum History – the maximum number of trades in the History panel.

4928215083042

1. By default, the order volume is in the currency to be traded. press BTC: (or other currency) button to set it as balance currency or a percentage of the total balance (it will change to Risk %). Enter the order volume.
2. Enter Leverage: (for some exchanges only).
3. Enter Price: if you want to submit a pending order.
4. Enter Stop Limit: price (for Stop Limit orders only).
5. Enter SL: price
6. Enter TP: price
7. Press Buy Sell @.. button to submit a Market order.
8. Press Buy Stop / Sell Stop button to open a Stop order.
9. Press Buy Limit / Sell Limit button to open a Limit order.
10. Press Buy Stop Limit / Sell Stop Limit button to open a Stop Limit Order.
11. Press Businesses button to display Businesses panel (see below).
12. Press History button to display History panel (see below).

6251140410641

1. In SL column press 1643219699193 button to remove a stop loss, or 3703131497579 button to set stop loss according to panel settings.
2. In TP column press 1983684565617 button to remove take-profit, or 3970946053444 button to set profit according to panel settings.
3. In Rear Stop column press the button to set stop-loss parameters: distance, step and start level.
4. In Advance Profit column press the button to set subsequent take-profit parameters as well.
5. In close column enter the part of closing volume (optional, only for position) and press 2677177653447 to close a position or delete an order.

4454568185704

GRat_Crypto can copy orders from an external file OrderExchange.csv (where magic is GRat_Crypto unique magic number). For example, OrderExchange10000.csv. The file can be located either in the final directory ..MQL5Files and in the common folder of all client terminals ..TerminalCommonFiles. The GRat_IndiTrade product creates such a file. Or use Order Export() function of the attached submodule ..MQL5IncludeGRat_OrderExport.mqh to add an order from your script code:

#include <GRat_OrderExport.mqh>
…
MqlTradeRequest request = {};

request.action  = TRADE_ACTION_DEAL;
request.symbol  = Symbol();
request.volume  = 0.2;
request.type   = ORDER_TYPE_SELL;
request.price  = SymbolInfoDouble(Symbol(), SYMBOL_BID);
request.magic  = 10000;
OrderExport(request);

You should fill out more MqlTradeRequest fields for actions TRADE_ACTION_DEAL (for closing positions), TRADE_ACTION_SLTP, TRADE_ACTION_REMOVE and TRADE_ACTION_MODIFY:

  • type
  • volume (positive for buy, negative for sell)
  • price (for pending orders only)
  • stop limit (for Stop Limit orders only)
  • sl
  • tp
  • position (positive, only for closing positions)

Source

LEAVE A REPLY

Please enter your comment!
Please enter your name here