2010.09.01 19:44:36 Core 1 2010.06.01 00:00:01 Array out of range in 'trend_v3.mq5' (71,9) 2010.09.01 19:44:36 Core 1 2010.06.01 00:00:01 Array out of range in 'trend_v3_5.mq5' (83,9)
So it's all about the indicators? The tester is giving me an error
2010.09.01 19:44:36 Core 1 2010.06.01 00:00:01 Array out of range in 'trend_v3.mq5' (71,9) 2010.09.01 19:44:36 Core 1 2010.06.01 00:00:01 Array out of range in 'trend_v3_5.mq5' (83,9)
alexvd:
Array overrun.
See code 'trend_v3.mq5'. Even specific lines are specified.
See code 'trend_v3.mq5'. Even specific lines are indicated.
Most likely it is the indicator, I redid it with mql4, it works, but there is an error, new bar is not considered yet, I can't figure out how to do it correctly so there will be no conflict with mql5
here is trend_v3. Do you mean line 9?
//+------------------------------------------------------------------+//| trend_v3.mq5 |//| Copyright 2010, MetaQuotes Software Corp. |//| http://www.mql5.com |//+------------------------------------------------------------------+#property copyright "Copyright 2010, MetaQuotes Software Corp."#property link "http://www.mql5.com"#property version "1.00"#property indicator_chart_window#property indicator_buffers 1#property indicator_plots 1#property indicator_type1 DRAW_LINE#property indicator_color1 Blueinputint period =20;
double A[];
//+--------------//+------------------------------------------------------------------+//| Custom indicator initialization function |//+------------------------------------------------------------------+intOnInit()
{
//--- indicator buffers mappingSetIndexBuffer(0,A, INDICATOR_DATA);
ArraySetAsSeries(A,true);
//---return(0);
}
//+------------------------------------------------------------------+//| Custom indicator iteration function |//+------------------------------------------------------------------+intOnCalculate(constint rates_total,
constint prev_calculated,
constdatetime& time[],
constdouble& open[],
constdouble& high[],
constdouble& low[],
constdouble& close[],
constlong& tick_volume[],
constlong& volume[],
constint& spread[])
{
//int counted_bars=IndicatorCounted();int i, j, k, q, limit;
double X[4][4], Y[4], B[4], x[4][2000], y[2000], a;
// int Bar=Bars("EURUSD",_Period);ArraySetAsSeries(close,true);
// limit=BarsCalculated-counted_bars;for(q=prev_calculated;q<rates_total;q++)
{
//for(q=0; q<Bar; q++)// {ArrayInitialize(X,0);
ArrayInitialize(Y,0);
ArrayInitialize(B,0);
ArrayInitialize(x,0);
ArrayInitialize(y,0);
//===========================================for (i=0; i<=period; i++) {
x[0][i]=1;
x[1][i]=i+q;
y[i]= close[i+q];
}
//===========================================for (k=1; k<=period; k++) {
for (j=0; j<=1; j++) {
for (i=0; i<=1; i++) {
X[i][j]=x[j][k]*x[i][k]+X[i][j];
}
Y[j]=y[k]*x[j][k]+Y[j];
}}
//===========================================
k=0;
j=1;
a=X[k][j]/X[k][k];
for (i=0; i<=3; i++){
X[i][j]=X[i][j]-X[i][k]*a;
}
Y[j]=Y[j]-Y[k]*a;
//========================================== for (k=2; k>=1; k--){
a=0;
for (i=1; i>=k; i--){
a=X[i][k-1]*B[i]+a;
}
B[k-1]=(Y[k-1]-a)/X[k-1][k-1];
}
//=========================================
A[q]=B[0]+B[1]*q;
}
//---//--- return value of prev_calculated for next callreturn(rates_total);
}
//+------------------------------------------------------------------+
Можно ли торговать этим инструментом в понедельник? Хватит ли денег на открытие позиции? Какой размер убытка мы получим, если сработает Stop Loss? Как ограничить количество отложенных ордеров? Была ли выполнена торговая операция на этом баре или это было на предыдущем? Если торговый робот не может сделать подобные проверки, то любая прибыльная торговая система может превратиться в проигрышную. В этой статье показаны примеры проверок, которые пригодятся в любом эксперте.
Most likely it is the indicator, I have redesigned it with mql4, it is drawn, but there is an error, new bar is not considered yet, I can not understand how to do it correctly, so that there would be no conflicts with mql5
here is trend_v3. Do you mean line 9?
71 stocks, 9 characters...
As I see it, this is the place where it's getting annoyed.
it turns out it is all about the indicators?
2010.09.01 19:44:36 Core 1 2010.06.01 00:00:01 Array out of range in 'trend_v3.mq5' (71,9)
2010.09.01 19:44:36 Core 1 2010.06.01 00:00:01 Array out of range in 'trend_v3_5.mq5' (83,9)
Array is out of range.
See code of 'trend_v3.mq5'. Even specific lines are given.
So it's all about the indicators? The tester is giving me an error
2010.09.01 19:44:36 Core 1 2010.06.01 00:00:01 Array out of range in 'trend_v3.mq5' (71,9)
2010.09.01 19:44:36 Core 1 2010.06.01 00:00:01 Array out of range in 'trend_v3_5.mq5' (83,9)
Array overrun.
See code 'trend_v3.mq5'. Even specific lines are specified.
Out of range of an array.
See code 'trend_v3.mq5'. Even specific lines are indicated.
Most likely it is the indicator, I redid it with mql4, it works, but there is an error, new bar is not considered yet, I can't figure out how to do it correctly so there will be no conflict with mql5
here is trend_v3. Do you mean line 9?
Most likely it is the indicator, I have redesigned it with mql4, it is drawn, but there is an error, new bar is not considered yet, I can not understand how to do it correctly, so that there would be no conflicts with mql5
here is trend_v3. Do you mean line 9?
71 stocks, 9 characters...
As I see it, this is the place where it's getting annoyed.
71 stoka, 9 character...
As I understand it, this is where it fouls up
Is there a software way to look for the line number and character, rather than manually counting?
Of course there is. Edit menu, go to line(Ctrl+G)...
PS
The line number and positions are written at the bottom. There is also a way to quickly jump to functions (by their name)...
Of course there is. Edit menu, go to line item...
PS
The line number and position are written at the bottom. There is also a way to quickly jump to functions (by their name)...
and what's wrong with it?
Check the dimensionality of the array. But first, I would add a disability and data availability check to the EA itself...
can you be more specific, what do you mean by disability and data availability?
Something like this
PS
I would also formalise all the work with the turkeys as a class...