SteveHopwood wrote:CrapMql4 insists that OrderModify() contains a ticket number declared as an integer. Global Variables, on which SB depends a lot, requires that the value it contains be a double. Gary said not to rely on the language making the appropriate conversion, 'cos it is crap, so I declared the relevant variable as a double. To make OrderModify work I had to declare a separate integer and copy the double into it.
You're kidding me. It gave you a RUN-TIME error!?
In a
proper language, it would automagically convert the double to a int, basically doing automatically what you did by hand.
A stupid language would give a compile error because it's too dumb to do the conversion. But it also generally gives you a language construct to force the conversion.
But to compile it without error, and then at runtime say "whoops, this isn't an integer" -- that's braindead.
It sounds like you need to be really careful with MQL. It's too stupid to do the right thing so you have to do it yourself. Be careful to use the right type for parameters -- converted to the right type of variable if necessary, like you did.