Or just divide by 10
253 * 0.1 = 25.3
253 / 10 = 25.3
So, both will have fraction at end and it will give same warning truncation of constant value
TP = int(SL*0.1)
So, this is the way to remove fraction from Int?. For example, if the value is 1.6 it will remove 0.6 and change this to 1 or it will change it to 2 (because above 5 is round off to next number and below 5 is round of to same real number)?
253 * 0.1 = 25.3
253 / 10 = 25.3
So, both will have fraction at end and it will give same warning truncation of constant value
So, this is the way to remove fraction from Int?. For example, if the value is 1.6 it will remove 0.6 and change this to 1 or it will change it to 2 (because above 5 is round off to next number and below 5 is round of to same real number)?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I am changing my EA code from Pips to Point directly.
Previously it was like
Now, i decided to change directly to point to avoid confusion after discussing with @Vladislav Boyko (Post Link). Vladislav also suggested while using Point directly we do not need decimal/fraction and we can directly use it in Integer value on the same Post. I am trying like this now
In Output of TP = SL * 0.1, EA automatically avoiding decimal and taking only the Real numbers but with a warning truncation of constant value
How to solve this?.