Download MetaTrader 5

possible loss of data due to type conversion ..ihigh Mt5

To add comments, please log in or register
turtle1000
128
turtle1000  
Hi..
possible loss of data due to type conversion   ,,,being the Mt5 compile warning message 
Also the Ea compiles and works in mt4,But mt5 compile has 0 errors and many warnings all with ihigh , ihighest
,low,lowest. There is a variable inserted, being ""cntT"" in this particular example."
iHigh(NULL,PERIOD_M1,cntT)  ,,also it wont run in mt5 strat tester.
In strategy tester journal its says, Mql5, wrong type loading of Eaxyz failed
Also, iHigh(NULL,PERIOD_M1,3)  ,, and other whole numbers compiles in mt5 without any error message.
but never with a variable replacing the whole number.
Is it possible to keep this variable as it increments ihigh and other tasks.
Thanks in advance.
Onarius Mandel
26
Onarius Mandel  

Dear Turtle1000!

I cant say for sure since i didnt see your code but probably uwant to compare or save iHigh/hightest.... in integer but these functions return double, pls post your codes problematic part to see the problem better

Thank you 

Marco vd Heijden
Moderator
4944
Marco vd Heijden  

In MQL5 it will return an int with the handle whereas in MQL4 it will return a double with the values.

These are not compatible with each other.

Please read the documentation.
turtle1000
128
turtle1000  
Ok, thanks for your ideas, it got me to 0 errors, 0 warnings in the Mt5 compiler.However in the Strategy tester journal, it says ""wrong type, loading of ea123 311112 failed""
Any suggestions, as one might think the compiler would have mentioned that before 
placing it in the strat tester Ea examples, when all other examples their, i can run backtests on.
To add comments, please log in or register