Download MetaTrader 5

array out of range in

To add comments, please log in or register
Interested in Signals activity? Come and track!
Max Enrik
816
Max Enrik 2016.11.03 04:57 

Hi,

How can I fix this fatal error?

_Price_High = MathRound( ( High[Highest ( NULL, 0, MODE_HIGH, Bars - MODE_HIGH, 2 )] * (1 / Point) ) * 2 );
_Price_Low  = MathRound( ( Low [Lowest  ( NULL, 0, MODE_LOW,  Bars - MODE_LOW,  2 )] * (1 / Point) ) / 2 );
//---
fatal error: 'array out of range in'

Thanks. 

Mladen Rakic
15541
Mladen Rakic 2016.11.03 08:40  
Max Enrik:

Hi,

How can I fix this fatal error?

_Price_High = MathRound( ( High[Highest ( NULL, 0, MODE_HIGH, Bars - MODE_HIGH, 2 )] * (1 / Point) ) * 2 );
_Price_Low  = MathRound( ( Low [Lowest  ( NULL, 0, MODE_LOW,  Bars - MODE_LOW,  2 )] * (1 / Point) ) / 2 );
//---
fatal error: 'array out of range in'

Thanks. 

remove the "- MODE_HIGH" and "- MODE_LOW" after the Bars for start, but the error is not (just) in that.

You should post the whole code (not just those two lines), since this way it is not visible where the error comes from

Max Enrik
816
Max Enrik 2016.11.04 01:08  
Mladen Rakic:

remove the "- MODE_HIGH" and "- MODE_LOW" after the Bars for start, but the error is not (just) in that.

You should post the whole code (not just those two lines), since this way it is not visible where the error comes from

Thanks.

After remove them, runs good so far. 

To add comments, please log in or register