Libraries: iBarShift - page 4

 

Check it yourself (in mt4).

start it on a e.g. m5 chart. The script stops if your function (I renamed it to iBarShift_MQ5) returns an index less than 0.

I changed the returned negative values in order to know from where the negative index was returned (could have used e.g. __LINE__ as well).

Files:
 
Carl Schreiber:

Check it yourself (in mt4).

start it on a e.g. m5 chart. The script stops if your function (I renamed it to iBarShift_MQ5) returns an index less than 0.

I changed the returned negative values in order to know from where the negative index was returned (could have used e.g. __LINE__ as well).

?

This is a code for mql5/MT5. No point to use it under mql4/MT4.

 
This is a code for mql5/MT5. No point to use it under mql4/MT4.

Sure, as it makes it easier to port my actual mt4 codes to mt5 later!

 
Carl Schreiber:

Sure, as it makes it easier to port my actual mt4 codes to mt5 later!

So is there a problem under MT5 ?
 
May be, as the used function of your function exists in mt5 as well and will probably have the same results?
 
Carl Schreiber:
May be, as the used function of your function exists in mt5 as well and will probably have the same results?
mql5 is not mql4. There is no problem with this code when used with MT5 as it was designed.