The ATR indicator gives me decimal numbers. I want to get the parts after the comma as a whole number.how can I do that?
Forum on trading, automated trading systems and testing trading strategies
When you post code please use the CODE button (Alt-S)!
-
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
Messages Editor -
Perhaps you should read the manual, especially the examples.
They all (including iCustom) return a handle (an int). You get that in OnInit. In OnTick (after the indicator has updated its buffers,) you use the handle, shift and count to get the data.
How To Ask Questions The Smart Way. 2004
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
Technical Indicators - Reference on algorithmic/automated trading language for MetaTrader 5
Timeseries and Indicators Access / CopyBuffer - Reference on algorithmic/automated trading language for MetaTrader 5
How to start with MQL5 - General - MQL5 programming forum - Page 3 #22 2020.03.08
How to start with MQL5 - MetaTrader 5 - General - MQL5 programming forum - Page 7 #61 2020.07.05
How to call indicators in MQL5 - MQL5 Articles 12 March 2010 -
atrs return 0.02214, 0.2, 0.1957,0.34,0.1976 but ı want to 22140,20000, 19570,34000,19760
You do not want 22140, 20000, etc. ATR return a difference in prices (0.02214). If you want it in points (2214 or 221.4 on JPY pairs) divide by point.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
//for eample atrs return 0.02214, 0.2, 0.1957,0.34,0.1976 but ı want to 22140,20000, 19570,34000,19760