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

Automated Trading and Strategy Testing Forum

Update to MetaTrader 4 build 735 and Test the VPS for Free
To add comments, please log in or register
The entire history on a single page!
MetaQuotes Software Corp.
MetaQuotes 2010.08.03 18:50

New article Limitations and Verifications in Expert Advisors is published:

Is it allowed to trade this symbol on Monday? Is there enough money to open position? How big is the loss if Stop Loss triggers? How to limit the number of pending orders? Was the trade operation executed at the current bar or at the previous one? If a trade robot cannot perform this kind of verifications, then any trade strategy can turn into a losing one. This article shows the examples of verifications that are useful in any Expert Advisor.

Author: MetaQuotes

sgarbo.fra | 21 October 2014, 11:44 | Views: 24
The dollar to weaken in the wake of China's data confirm that the slowdown of the second world economy with possible repercussions on the global economic cycle. The cross Eur / Usd back above 1.28 is placed below the resistance at 1.2850 which is the first Fibonacci level of bearish movement that led to the exchange rate from 1.40 in...
Rosh 2010.08.18 10:16

Due to changes in MQL5, now the maximal overall volume allowed for one symbol can be obtained as following:

//--- get symbol limitation for volume
   double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_LIMIT);

Do not use the old variant! It was like this:

//--- get symbol limitation for volume
   double max_volume=AccountInfoDouble(ACCOUNT_LIMIT_VOLUME);
The article has been corrected and the new Check_Order_And_Volume_Limits.mq5 expert code has been attached to it.

Jinsong Zhang
song_song 2010.08.18 10:40

(build 306)

void OnStart()
double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_LIMIT);


compile errors: 


 'SYMBOL_VOLUME_LIMIT' - undeclared identifier test.mq5 4 46
'SymbolInfoDouble' - no one of the overloads can be applied to the function call test.mq5 4 20

To add comments, please log in or register