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

Automated Trading and Strategy Testing Forum

To add comments, please log in or register
They are making profit already using Jobs service. You can join them!
MetaQuotes Software Corp.
Moderator
147184
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

GBPUSD Technical Analysis - Monthly Forecast: Happy Bearish Pound Dollar!
MN price: Chinkou Span line of Ichimoku indicator came to be very near with the price to be ready for crossing it from above to below for good breakdown. If it will be happened so I am expecting it in the beginning of December for example. The nearest support level is 1.6052 and price is going to break this level. By the way, the price is located...
Rosh
Admin
5812
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
10431
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