yes tick size is a number expressed in the unit called ''_POINT" and the tick size is the minimal price jump allowed by the broker for the asset. So the tick size varies from brokers to brokers and given a broker, from his assets to assets. Same thing for his unit ''_POINT".
so to know everything about an asset of a broker, first run their script here https://docs.mql4.com/constants/environment_state/marketinfoconstants
for the normalization, I do
double tickSize = SymbolInfoDouble(symbol, SYMBOL_TRADE_TICK_SIZE); //Ticke size to normalize in a correct way MathRound(NUMBER_TO_NORMLIZE*1.0/tickSize)*tickSize
this outputs a double. you have to check that
1.0/tickSize
gives really the inverse of the ticksize, because inverting a double is always risky. If does not give the right answer, you have to use MathCeil(1.0/SymbolInfoDouble(symbol, SYMBOL_TRADE_TICK_SIZE)).
- docs.mql4.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Here's the formula I use to normalize
Thanks