MT5 - BUG dividing 2 integer

 
Попробую GBPUSD но хз надо ли такую сову, потом можно текущие сеты наверное еще выровнять
 
Customer:

weekly and monthly only no daily but sure the line must show in all time frame the weekly for the current week monthly for the current month the daily will be more complicated that is why i ignore the daily.


no not at the same time should have an option show weekly line and show monthly line


ok

it will cost 70$ and 1 day

 

Nice topic. I suppose Fernando was saying it's not a bug. Please do some researches, hopefully you will find 'not empty' posts talking about integers division.

 

Luckily I remembered what I wrote, so I am posting it again. I'm not editing my previous post so the thread will make sense.

No it is not a bug and there is nothing to fix. It is called "integer" arithmetic and if you want to use "floating point" arithmetic instead, you have to typecast at least one of the variables.

int    A = 3, B = 4;        // Given two integer variables ...
double C =         A   / B; // This is "integer" arithmetic, before being typecast into a "double" by the assignment, so the result will be 0.0
double D = double( A ) / B; // This will now have at least one "double" for "floating point" arithmetic,              so the result will be 0.75
Reason: