[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 400

 
artmedia70:

Why are you teaching incorrect programming?

How do you know that this indicator's window descriptor == 1 ?

It's not my job to teach and tutor, but it's another thing to suggest it.

"Can you please tell me how to draw a vertical bar (histogram) from 0 to 4 (for example) in a sub-window (graphical object)?

And the subwindow number (but not the window descriptor, don't get confused) is sought from the name of the indicator, which is not there.

 
If you make a function call -
iBarShift(symb, i, TimeCurrent(), true);
- can a hole be created in the history? Or, will all the missing bars that have not been present in the terminal up to this point in time be loaded sequentially?
 
fore-x:
If you make a function call - can a hole be created in the history? Or, will all the missing bars that have not been present in the terminal up to this point in time be loaded sequentially?

You'd better solve this problem yourself. You can use the search line. For example, the search string "hole in the quotes history"
 
Mislaid:

It is best to sort out the problem yourself. Use a search engine. For example, search string "hole in quotes history".

There is nothing to understand, it is written in documentation, but it is not mentioned, whether it is one requested value that will be updated or all missing bars at request time - will be updated too. So I am asking those who know about it, or is it a secret information?

Группа функций, предназначенных для доступа к ценовым данным любого доступного символа/периода.

Если запрашивается информация с другого графика (название инструмента и/или значение таймфрейма отличаются от текущих), 
то возможна ситуация, что в клиентском терминале не открыт соответствующий график и необходимые данные должны быть 
запрошены у сервера. В этом случае в переменную last_error будет помещена ошибка ERR_HISTORY_WILL_UPDATED 
(4066 - запрошенные исторические данные в состоянии обновления) и необходимо через некоторое время повторить попытку запроса
 
costy_:

We're out of buffers ))

Good afternoon! Thank you for your reply!

If I understand you correctly? ....

1. 1 is the subwindow number?

#property indicator_separate_wi
ndow
#property indicator_minimum -8
#property indicator_maximum 8
void start()  {
   ObjectsDeleteAll(1);/*Удаление всех объектов с указанным типом и в указанном подокне графика. 
                           Функция возвращает число удаленных объектов. */

2.We will draw a stick with the properties of a trendline, for which 2 coordinates are given and xz is the price coordinate in the second pair.

ObjectCreate(i+" f",OBJ_TREND,1,iTime(0,0,i),0,iTime(0,0,i),xz);/*Создание объекта с указанным именем, тип и начальные координаты 
                          в указанном подокне графика. OBJ_TREND-Трендовая линия. Использует 2 координаты*/

3. Next, I am a bit confused.

ObjectSet(i+" f", OBJPROP_RAY, 0);/*Изменение значения указанного свойства объекта.
                          

OBJPROP_RAY - Gets/sets the ray property flag for objects like OBJ_TREND and the like, and 0 is why?

 
artmedia70:

Why are you teaching incorrect programming?

How do you know that the window descriptor of this indicator == 1 ?


Good afternoon! Thank you for your reply, Artyom!

the descriptor is ?????? I haven't come across this concept or, more likely, just don't remember it.

 
fore-x:

What is there to understand, but it is not specified in the documentation that it is written about it, whether one requested value will be updated or all missed bars at the time of request will also be updated. That's why I ask those who have worked on this, or is it a secret information?

If at the moment (when terminal opens, synchronization with quotation server) there is no historical data for example 5 min. ago, then terminal will update this data and send recalculation through IndicatorCounted(), dirk will disappear ).
 
kolyango:


Write the code, and then we'll see if it's worth it... It is desirable to simplify it first...

I need to understand how flags work, their return value, override, etc.

And coffee please!
 
LOA:

Good afternoon! Thank you for your reply!

If I understand you correctly? ....

1. 1 is the subwindow number?

2.We will draw a stick with the properties of a trendline, for which 2 coordinates are given and xz is the price coordinate in the second pair.

3. Next, I am a bit confused.

OBJPROP_RAY - Gets/sets the ray property flag for objects like OBJ_TREND and the like, and 0 is why?

1 Yes, it is defined as

int WindowFind( string name)

2 No, xz is the coordinate of the end of the stick (in this case 4 -4)(the vertical line has no start and no end).

3 Let's set trendline to show not as a ray but as a segment (in line properties, 0-deselect it, 1-check the "Ray" box)

R.S. You need to redraw 0 bar, therefore remove only 0

#property indicator_separate_window
#property indicator_minimum -8
#property indicator_maximum 8
void start()  {
   for(int i=0;i<WindowBarsPerChart();i++){
         if(Open[i]>iMA(0,0,5,1,1,4,i))
            double xz=4;
         else xz=-4;
         //
         
         string name=Time[i]+WindowExpertName();
         ObjectDelete(name);
         ObjectCreate(name,OBJ_TREND,1,Time[i],0,Time[i],xz);
         ObjectSet(name, OBJPROP_RAY, 0);
   }
   WindowRedraw();
}
void deinit(){ObjectsDeleteAll(WindowFind(WindowExpertName()));}
 
LOA:


Good afternoon! Thank you for your reply, Artyom!

descriptor is ?????? I haven't come across this concept or, more likely, just haven't remembered it.

Suppose you need to feed a tick to an offline chart for an indicator, but the "tekker" is on the eurdol chart, then you need to check the existence of the window via its descriptor, int WindowHandle( string symbol, int timeframe).