admin

Guideline to use ALGOGENE DLL in MetaTrader

Programming


We are pleased to announce that ALGOGENE is now available as a plugin for MetaTrader (MT4 and MT5)!


collaborate


Overview

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

  1. Download above repository to your local machine
    1. For MT4 user, please go to /MetaTrader4_DLL
    2. For MT5 user, please go to /MetaTrader5_DLL
  2. In your MetaTrader terminal, open "MetaQuote Language Editor"
  3. editor

  4. Copy Algogene_x64.dll (or Algogene_x86.dll if you are using MT4) to your MetaTrader's Library folder
  5. library

  6. Copy AlgogeneMT5.mqh (or AlgogeneMT4.mqh if you are using MT4) to your MetaTrader's Include folder
  7. Open the header file AlgogeneMT4.mqh, update your DLL path, and then compile the script
  8. header

  9. Copy the 3 sample files to your MetaTrader's ExpertAdvisors folder
    • AlgogeneGetSignal.mq5
    • AlgogeneOpenOrder.mq5
    • AlgogeneCloseOrder.mq5
  10. For the ExpertAdvisors, update your ALGOGENE's account info accordingly
  11. GetSignal

    openorder

  12. Finally, in your MetaTrader, enable "Auto Trading" and "Allow DLL imports" under Tools > Options > ExpertAdvisors
  13. enable


Functionalities

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
    • msg
    • timestamp
    • symbol
    • buysell
    • openclose
    • ordertype
    • quantity
    • takeProfitLevel
    • stopLossLevel
    • price
    • timeinforce
    • holdtime
    • tradeID
  • 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)
    • expiry
    • right
    • strike
    • buysell
    • volume
    • ordertype
    • price
    • orderRef
    • timeinforce
    • takeProfitLevel
    • stopLosslevel
    • holdtime
    • callback

  • 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

References


 
David
Hi algogene team, the trading signal function is very nice and useful to automate my MT5 account. 
 However, I have a few questions below: 
  • What are the available "bot_id" I can input?
  • Where can I check the details about a particular "bot_id"? (eg. what is it trading on? past performance? etc)
 
admin
Original Posted by - b'David': Hi algogene team, the trading signal function is very nice and useful to automate my MT5 account. 
 However, I have a few questions below: 
  • What are the available "bot_id" I can input?
  • Where can I check the details about a particular "bot_id"? (eg. what is it trading on? past performance? etc)
Hi David, bot_id and its trading details can be referred to our Algo Marketplace (eg. https://algogene.com/marketplace/algo/1 ). 
Upon valid subscription of a trading bot, you can then input the bot_id in MetaTrader's Expert Advisor and get its real-time trading signals from the terminal.