Find Closest Institutional Level

 

Hey! I am trying to find an efficient way to locate the closest institutional levels of a forex pair.


For example: I pass the latest close price of EURUSD at 1.25432.
The institutional levels I am looking for are the ones ending in 000,200,500 and 800.

If I was looking for sell setups (predetermined by other parameters), I would need an efficient way to find the value 1.25200 from the value 1.25432.
1.25130 would become 1.25000, 1.25900 would become 1.25800 and so on...

If I was looking for buy setups,1.25432 would become 1.25500, 1.25130 would become 1.25200, 1.25900 would become 1.26000 and so on...


Thanks for the help, and if I am unclear just let me know!

 
IbiamO: I would need an efficient way to find the value 1.25200 from the value 1.25432.
MT4:NormalizeDouble - General - MQL5 programming forum
How to Normalize - Expert Advisors and Automated Trading - MQL5 programming forum