Skip to content
All library documents

MT4 OCO Expert Advisor Order Inputs and Risk Settings

Article MQL5 code base

Summary

This document describes an MT4 expert advisor that places one-cancels-the-other orders alongside one-pip limit and stop orders. It lists global variables for buy and sell limit or stop prices, plus a confirmation setting used to enable the advisor after order prices are entered.

The OCO switch controls whether placement of one order cancels the others. Separate inputs specify stop-loss and take-profit distances in pips. The document provides configuration names and brief descriptions, but no implementation details, execution examples, broker-specific behavior, testing, or evidence about order handling. It is a basic operational reference rather than a full explanation of OCO trading or risk management.

Key ideas

  • The MT4 expert advisor places OCO orders and one-pip limit and stop orders.
  • Global variables define the prices for buy and sell limit and stop orders.
  • A confirmation variable enables the advisor after order prices are supplied.
  • An OCO setting controls whether one filled order cancels the other orders.
  • Stop-loss and take-profit distances are configurable in pips.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.