Skip to content

Getting Started

Pine2Trade integrates with MetaTrader 5 and processes trading commands received in a specific JSON format. The EA receives a command string containing key trade parameters such as operation (buy/sell), symbol, stop loss, take profit, and additional details. It then parses the command, calculates trade sizes based on your risk management settings, and executes the appropriate trading actions.

Features

  • Real-Time Signal Processing: Receives and processes trading signals through a WebSocket connection.
  • Automated Trading: Executes buy, sell, and close operations automatically based on received commands.
  • Risk Management: Configurable parameters such as RiskPercent and MaxLots determine trade size.
  • Customizable Commands: Supports a flexible command format with parameters like tp, sl, comment.
  • Error Handling: Provides detailed feedback on execution status and errors for troubleshooting.

1. Sign Up and Choose a Plan

Create your account at pine2trade.com and choose one of our plans:

  • Free
  • Basic
  • Standard
  • Premium

2. Connect to TradingView

In your TradingView alerts, set the webhook URL to:

https://pine2trade.com/webhook/

3. Installation & Setup

  1. MetaTrader 5 Environment: Ensure MetaTrader 5 is installed on your system.
  2. EA Installation: Place the Pine2Trade.mq5 file in the appropriate Expert Advisors directory.
  3. Compilation: Open MetaEditor, compile the EA, and verify there are no compilation errors.
  4. Configure Input Parameters:
  5. license: Your license key (e.g., 123456789).
  6. RiskPercent: The fraction of your account balance to risk per trade (default is 0.01 = 1%).
  7. MaxLots: The maximum number of lots to trade (default is 50).
  8. Expert_MagicNumber: Unique identifier used to track trades (e.g., 26198).

Signal Command Format

Signals are sent to the EA via a webhook using a JSON structure similar to the following:

{
  "license": "123456789",
  "type": "signal",
  "signal": "123456789,buy,EURUSD,tp=100,sl=100,comment=123456"
}

➡️ To learn more about the command format, visit the Command Format section.