Documentation
WebsiteReleases
  • What is TradersPost?
  • Getting Started
  • What's new?
  • Core Concepts
    • Brokers
      • TradeStation
      • Alpaca
      • Tradier
      • Robinhood
      • Tradovate
      • NinjaTrader
      • E*TRADE
      • tastytrade
      • Interactive Brokers
      • Coinbase
      • Bybit
      • Kraken
      • Webull
      • Binance
      • TDAmeritrade
      • Broker Roadmap
        • Schwab
    • Strategies
    • Subscriptions
    • Webhooks
  • Learn
    • Rate Limits
    • TradingView
    • Prop Firm Trading
    • TrendSpider
    • MetaTrader 5 - MT5
    • Backtesting
    • Order Behavior
    • Order Queueing
    • Order Classes
    • Paper Trading
    • Position Sizing
    • Fractional Shares
    • Custom Code Examples
    • Discord Trading Bot
    • API
  • Assets
    • Stocks
    • Futures
    • Options
    • Crypto
    • Forex
  • Strategies & Indicators
    • Strategy Developers
    • Example Strategies
      • Simple Strategy
      • EMA Crossovers
      • Automate Channel Trading
      • Range Trade Heikin Ashi RSI
      • Scheduled Alerts
      • Simple Trend Lines
      • 8-55 EMA Cross Strategy
      • High-Low Range Trend-Following
      • LuxAlgo SMC Trade Signals
      • Confluence of Alerts
      • Automated Channel
      • SSL Hybrid
      • Engulfing Candles
      • Supertrend and Bollinger Bands
    • Premium
    • Free
    • Build Your Own
  • Additional Information
    • Glossary
    • Error Messages
    • Troubleshooting
    • Frequently Asked Questions
    • Office Hours
    • Known Limitations
    • Trading Communities
    • Trade Journaling
    • Useful URLs
    • WebhookMessage Library
    • Maintenance Windows
    • Releases
  • Links
    • Discord
    • Community
    • Pricing
    • Register
    • Login
Powered by GitBook
On this page
  • MetaTrader 5 Expert Advisors (EA)
  • Why automate MetaTrader 5 with TradersPost?
  • Installing TradersPostWebhookRequest.mqh

Was this helpful?

Edit on GitHub
  1. Learn

MetaTrader 5 - MT5

MT5 webhook automation is possible by using the TradersPostWebhookRequest library and sending you trade signals through to a broker of your choice at TradersPost.

PreviousTrendSpiderNextBacktesting

Last updated 7 months ago

Was this helpful?

MetaTrader 5 Expert Advisors (EA)

With its advanced charting capabilities, customizable indicators, and support for algorithmic trading through Expert Advisors (EAs), MT5 offers both novice and experienced traders a robust environment to execute their trading strategies efficiently and effectively. However, it's less apparent how you might automate a strategy in MT5 through any broker of your choice.

TradersPost can support futures, stock, and crypto trading from MT5 using a library we've written that can help build the JSON message that is sent through a .

We have built an example EA that will trade on the next tick if it hasn't already and then never trade again after. It's meant to demonstrate only how you construct the JSON message and send the request to TradersPost.

Why automate MetaTrader 5 with TradersPost?

By integrating MT5 with TradersPost, users can automate their trading strategies across multiple asset classes, including stocks, futures, and cryptocurrencies. TradersPost supports a wide range of brokers such as TradeStation, Alpaca, Robinhood, E*TRADE, tastytrade, IBKR, Webull, and futures brokers like Tradovate and NinjaTrader as well as crypto exchanges like Coinbase, Kraken, Bybit, and Binance. This integration allows users to send automated signals from MT5 directly to TradersPost, where they can manage trade execution with advanced strategy rules, risk management, and position sizing features.

Can I use an MT5 server with a broker that TradersPost doesn't support?

Yes! In the examples we provide below, we're using a StoneX Futures account and routing a manually constructed trade to a paper broker using TradeStation market data.

Installing TradersPostWebhookRequest.mqh

Adding a library to the Include folder is fairly straight-forward.

Notably, , which means users can automate strategies on Bybit's MT5 platform and seamlessly route trades through their Bybit connection on TradersPost. This setup provides enhanced control and sophistication in trade execution, making it easy to automate strategies across different asset classes while utilizing TradersPost's robust automation tools. Although Bybit is currently the main broker supporting MT5 servers natively, users of other brokers supported by TradersPost can still leverage MT5 to create sophisticated automated strategies, taking full advantage of TradersPost's powerful automation framework.

Ensure you have enabled algorithmic trading on MT5 and added the TradersPost webhook domain to your allowed WebRequest URLs. .

Add the TradersPostWebhookRequest.mqh file to your Include folder. .

Then you can include TradersPostWebhookRequest.mqh in your EA scripts, define your webhook URL, and build JSON messages to send to TradersPost. See the .

If you are interested automating your MetaTrader 5 strategies, give TradersPost a try and your free account today! If you have any questions, join our or email us at .

Bybit offers its own MT5 servers
Read more on this here
Read more on this here
example EA here
Register
Community
support@traderspost.io
TradersPost webhook
Logometatrader5/MQL5/Experts/Advisors/TradersPostExample.mq5 at main · TradersPost/metatrader5GitHub
TradersPostWebhookRequest.mqh goes into your data folder under MQL5/Include.
In this example, the webhook request is sent immediately to TradersPost to automatically execute 1 contract of NQ with a take profit and stop loss order attached as a bracket order with the paper broker.
Adding the will demonstrate how a webhook request is made to buy 1 contract of NQZ2024 with a take profit and stop loss pre-configured.
TradersPostExample EA