Download MetaTrader 5

Initialization of variable m_adjusted_point

To add comments, please log in or register
All activity of the MQL5.community members is displayed on a single page!
nelsoneci
19
nelsoneci 2014.05.16 19:04 

Hello there. 

   int digits_adjust=(m_symbol.Digits()==3 || m_symbol.Digits()==5) ? 10 : 1;

   m_adjusted_point=m_symbol.Point()*digits_adjust;

 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. 

PS: I posted a reply in another category that does not seem active. Reposting here, I hope it is OK : https://www.mql5.com/en/forum/4626 

 

Rogerio Figurelli
Moderator
39684
Rogerio Figurelli 2014.05.17 05:30  
nelsoneci:

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. 

PS: I posted a reply in another category that does not seem active. Reposting here, I hope it is OK : https://www.mql5.com/en/forum/4626 

 

Hi nelsoneci, because you have 4 and 5 digits brokers. Also, points are points and pips are pips.

Maybe the topic below can help you too.

Forum on trading, automated trading systems and testing trading strategies

points == pips?

newdigital, 2013.07.13 13:12

  • for example (in case of 5 digit broker): buy at 1,30305 and take profit at 1.30605. Profit is 30 pips, or 300 points.
  • the other example (in case of 4 digit broker): buy at 1,30305 and take profit at 1.30605. Profit is 30 pips, or 30 points.

pips = 4 digit points in case of 4 digit broker, and 1 pip = 10 points in case of 5 digit broker ... some people say that we will have 6 digit brokers soon :) who knows ...

Many traders are using pips (4 digit points) irrespective of how many digits are having the broker at the price.


To add comments, please log in or register