Problem is doing calculations ran in the code of one of my EA's, I for some reason now have to specify these changes, which in no way was required for me before hand. Just a few weeks ago my 2/100 = 0.02, but now its 0. This is an issue and I imagine it would be for many who are recompiling their code.
Problem is doing calculations ran in the code of one of my EA's, I for some reason now have to specify these changes, which in no way was required for me before hand. Just a few weeks ago my 2/100 = 0.02, but now its 0. This is an issue and I imagine it would be for many who are recompiling their code.
Before operations (except for the assignment ones) are performed, the data are converted into the maximum priority type. Before assignment operations are performed, the data are cast into the target type.
int i=1/2; // no types casting, the result is 0Print("i = 1/2 ",i);
int k=1/2.0; // the expression is cast to the double type,Print("k = 1/2 ",k); // then is to the target type of int, the result is 0double d=1.0/2.0; // no types casting, the result is 0.5Print("d = 1/2.0; ",d);
double e=1/2.0; // the expression is cast to the double type,Print("e = 1/2.0; ",e);// that is the same as the target type, the result is 0.5double x=1/2; // the expression of the int type is cast to the double target typr,Print("x = 1/2; ",x); // the result is 0.0
I simply try to do a simple 2 / 100 = 0.02, but it returns 0.0
try this
MessageBox("2/100: " + (string)(2.0/100.0) + "\n0.02");
I'm aware, that works.
Problem is doing calculations ran in the code of one of my EA's, I for some reason now have to specify these changes, which in no way was required for me before hand.
Just a few weeks ago my 2/100 = 0.02, but now its 0.
This is an issue and I imagine it would be for many who are recompiling their code.
I'm aware, that works.
Problem is doing calculations ran in the code of one of my EA's, I for some reason now have to specify these changes, which in no way was required for me before hand.
Just a few weeks ago my 2/100 = 0.02, but now its 0.
This is an issue and I imagine it would be for many who are recompiling their code.
https://www.mql5.com/en/docs/basis/types/casting
Before operations (except for the assignment ones) are performed, the data are converted into the maximum priority type. Before assignment operations are performed, the data are cast into the target type.
i dont see my <...> SIGNAL IN MT 4 SEARCH
It may be because of low rating, for example:
Forum on trading, automated trading systems and testing trading strategies
why my signal is not visible?
Eleni Anna Branou, 2019.03.29 13:57
New or high risk signals are not always rated or publicly available.
I want to deposit in my meta trader 5 and I don't know how to do that
If this is about your real trading account, contact your broker.
You cannot deposit money into any demo account that you may have with Metaquotes default MT5 terminal or any broker.