Download MetaTrader 5
To add comments, please log in or register
Search in documentation is available via MetaTrader 5. Search and learn!
zifu wang
636
zifu wang 2011.09.13 05:35 
m_adjusted_point        =10;

The variable m_adjusted_point in MQL5 standard libary should be changed to 0.00010, correct?

m_adjusted_point        =0.00010;
Alexander Piechotta
6928
Alexander Piechotta 2011.09.13 18:13  


//--- tuning for 3 or 5 digits
   int digits_adjust=1;
   if(m_symbol.Digits()==3 || m_symbol.Digits()==5) digits_adjust=10;
   m_adjusted_point=m_symbol.Point()*digits_adjust;


zifu wang
636
zifu wang 2011.09.14 10:58  
FinGeR:


Yes, the default value of m_adjusted_point should be not 10.
nelsoneci
19
nelsoneci 2014.05.16 02:53  
FinGeR:

Hello there. 

Could you please help me understand why this adjustment is being done?

In the context of EURUSD, we've noticed that for MT5 (expert advisors) 1 point is 0.0001 (when setting take profits and stop losses). 

But when we send manual orders, one point is 0.00001. 

This is the current code (same thing as above):

 int digits_adjust=(m_symbol.Digits()==3 || m_symbol.Digits()==5) ? 10 : 1;
 m_adjusted_point=m_symbol.Point()*digits_adjust;
/
To add comments, please log in or register