REALLY strange behaviour of MQL4 when trying to do a simple division operation.

 

Look at the following simple line of code:

double ratio = candles[0].body / candles[1].body;

When trying to debug this simple line, I get the following results:

Debugging Results

This result is all wrong! In other words, instead of:

candles[0].body / candles[1].body // this is what I want to do...

it does the following for me:

candles[1].body / candles[0].body // this is I actually get!!!!
 
I know that it is not obvious, but topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I will move your topic to the MQL4 and Metatrader 4 section.
 
josephcom:

Do I need to post this again? In MQL4 section?

Keith Watford:
I will move your topic to the MQL4 and Metatrader 4 section.

I have moved it.