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

Automated Trading Language Documentation

ALMA(Arnaud Legoux Moving Average) Indicator
ALMA(Arnaud Legoux Moving Average)
Author: igorad
Subscribe to signal
GajahEglo
182.79%, 989.44 USD
Screenshot
GBPUSD-, H4
Real
Ilan FREEIlan FREE Try product
Ilan FREE
Author: komposter
Automata-Based Programming as a New Approach to Creating Automated Trading Systems Automata-Based Programming as a New Approach to Creating...

Buy

Opens a long position with specified parameters.

bool  Buy(
   double        volume,          // position volume
   const string  symbol=NULL,     // symbol
   double        price=0.0,       // price
   double        sl=0.0,          // stop loss price
   double        tp=0.0,          // take profit price
   const string  comment=""       // comment
   )

Parameters

volume

[in]  Position volume.

symbol=NULL

[in]  Position symbol. If the symbol isn't specified, the current symbol will be used.

price=0.0

[in]  Price. If the price isn't specified, the current market Ask price will be used.

sl=0.0

[in]  Stop Loss price.

tp=0.0

[in]  Take Profit price.

comment=""

[in]  Comment.

Returned value

true - in case of successful check of the structures, otherwise - false.

Note

Successful completion of the Buy(...) method does not always mean successful execution of the trade operation. It's necessary to check the result of trade request (trade server return code) using ResultRetcode() and value, returned by ResultDeal().


Updated: 2010.12.15