[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 350
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
How do I memorise my index bar? When new bars appear, the index changes. For example: A wave crossing occurred, the next bar will be a zero bar. I need to memorize the wave value on this bar and use it in indicator calculations on the following bars. How do I initialize this index? Or how to do it ?
How do I memorise an index bar?
Thank you very much, I'll try it that way.
Tried this, the result is the same - zero.
int mas2[10][2],min_1,min_2,min_V1,min_V2;
for(int i=1;i<Q_Bars;i++)
{
min_1 =ArrayMinimum(Volume, Q_Bars,1); //определяем индекс бара с минимальным объемом
min_V1=iVolume(0,0,min_1); //величина этого объема
mas2[i,0]=Volume[i]; //заполняем 1-ю часть двумерного массива объемами
mas2[i,1]=i; //вторую часть - соответствующими им индексами
}
ArraySort(mas2); //сортируем по величине объемов
min_V2=mas2[2,0]; //определяем второй после минимального объем
min_2=mas2[2,1]; //соответствующий ему индекс бара
H1= NormalizeDouble(High[min_2],4); //нормализуем level по знакам после запятой
create_line("", H1, Ex_col_2, 0, 2); //пытаемся нарисовать линию
return(0); //Bывод: ничего не рисуется, что еще ему надо - ????
}
//--------------------------------------------------------------------
void create_line(string name_line,double level,color c,int style,int w)
{
ObjectCreate(name_line, OBJ_HLINE, 0, 0,0);
ObjectSet(name_line, OBJPROP_PRICE1, level);
ObjectSet(name_line, OBJPROP_COLOR, c);
ObjectSet(name_line, OBJPROP_STYLE, style);
ObjectSet(name_line, OBJPROP_WIDTH, w);
}
And why is the object name empty? Write something: "Object_name" instead of "" when calling create_line("", H1, Ex_col_2, 0, 2 );
GBPUSD does not open
int start()
{
OrderSend("GBPUSD",OP_SELL,0.1,Ask,0,Ask+400*Point,Ask-100*Point);
Alert GetLastError();
return()
}
and at compilation it generates errors relating to Alert GetLastError();
Could it be that the broker's 100 points is too close (5 digits at the broker)?
GBPUSD does not open
int start()
{
OrderSend("GBPUSD",OP_SELL,0.1,Ask,0,Ask+400*Point,Ask-100*Point);
Alert GetLastError();
return();
}
and at compile time I get errors related to Alert GetLastError();
Could it be that the broker's 100 pips is too close (5 digits at the broker)?
Maybe, because at 4 digits it's only 10ppt. Put at least 101 instead of 100 and check.
GBPUSD won't open
and when compiling it writes errors related to Alert GetLastError();
could it be that the broker's 100 pips is too close (5 digits at the broker)?