MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Source code library - Expert Advisors, Indicators and Scripts

Read Financial Magazines in MetaTrader 4 and MetaTrader 5!
To post a new code, please log in or register

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2010.05.17 08:14
Script opening orders

Script opening orders

| English Russian

Downloads:
10306
Views:
6242
Rating:
votes: 1
Files:

Sometimes you want to help the advisor and add the order, but that Advisor has its own Magic number needed to be placed orders with its number.

Variables:
  • stoploss - level exhibiting SL, if 0, then SL is not exposed
  • takeprofit - level exhibiting TP, if 0, then TP is not exposed
  • Magic - a unique order number
  • SELL - open SELL order
  • BUY - open BUY order
  • Lot - Order Quantity
  • slippage - the maximum deviation of the price for market orders

The simultaneous installation of different directions of orders for this variable SELL BUY and set to true.

When failures of connection or a sharp price movement will be exhibiting 10 attempts to place an order, after that the script stops.

To run the script, drop it on the chart window and the menu will appear, select the options and type of the opened orders.


Translated from Russian by MetaQuotes Software Corp.
Original code: http://www.mql5.com/ru/code/9673