Guideline to use ALGOGENE DLL in MetaTrader
We are pleased to announce that ALGOGENE is now available as a plugin for MetaTrader (MT4 and MT5)!
ALGOGENE developed dynamic linked libraries (DLL) that can be easily imported in your local machine. With the library, it allows you to interact between MetaTrader and ALGOGENE's resources. The DLL is currently available as
- 32 bit version: Algogene_x86.dll
- 64 bit version: Algogene_x64.dll
What is it used for?
- To enable users to subscribe and obtain trading signals from ALGOGENE's trading bots
- To allow users to publish and distribute trading signals from your local MetaTrader onto ALGOGENE platform for advanced analysis
Set up MetaTrader
Github Download: https://github.com/algogene-fintech/metatrader_dll
- Download above repository to your local machine
- For MT4 user, please go to /MetaTrader4_DLL
- For MT5 user, please go to /MetaTrader5_DLL
- In your MetaTrader terminal, open "MetaQuote Language Editor"
- Copy Algogene_x64.dll (or Algogene_x86.dll if you are using MT4) to your MetaTrader's Library folder
- Copy AlgogeneMT5.mqh (or AlgogeneMT4.mqh if you are using MT4) to your MetaTrader's Include folder
- Open the header file AlgogeneMT4.mqh, update your DLL path, and then compile the script
- Copy the 3 sample files to your MetaTrader's ExpertAdvisors folder
- For the ExpertAdvisors, update your ALGOGENE's account info accordingly
- Finally, in your MetaTrader, enable "Auto Trading" and "Allow DLL imports" under Tools > Options > ExpertAdvisors
Get Trading Signals from Algogene
- "AG_WebSocket" is a class for establishing a websocket connection with Algogene's server
- "AG_Signal" configures the structure of signals received from the server, whereas users can print the full trading signals by calling "printSignal()"
- Extract/Access information from signal by accessing the data members of "AG_Signal" instance
- Below are all the information/ data members available in a trading signal
- With the spontaneous extraction of details of the obtained trading signals, users can place orders in a convenient manner
- Refer to AlgogeneGetSignal for relevant examples
Publish Trading Signals to Algogene
- AG_Order defines the structure of an order with the following fields available for users to input
- instrument (required)
- Publish Open Order Signals
- After doing OrderSend on MetaTrader, users can record their transactions on Algogene's platform by calling "openOrder()"
- Refer to AlgogeneOpenOrder for relevant examples
- Publish Close Order Signals
- After doing OrderClose on MetaTrader, users can record their transactions on Algogene's platform by calling "closeOrder()"
- Refer to AlgogeneCloseOrder for relevant examples
- AG_Websocket connects to Algogene's Trade History Channel: https://algogene.com/RestDoc#/schemas/WebSocket-Trade
- Open order function calls Algogene's REST API: https://algogene.com/RestDoc#/operations/post-open_order
- Close order function calls Algogene's REST API: https://algogene.com/RestDoc#/operations/post-close_orders