Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 678

 
atztek:

1. By real time, I meant working time. Or did you mean something else?
2. I don't understand what code you were asking about? There is EA code that generates values that then need to be displayed on a chart. At this point I want to figure out how to properly solve the problem, what options exist.

Show me the code in which you are calling ICustom.
 
barabashkakvn:
Show the code where you call ICustom.

The part of the code with iCustom call is not there yet, as it's not clear how to avoid windows multiplication (due to indicator_separate_window application in the indicator). Basically there is an array with values (e.g. Close[] prices for the last 500 bars on the main chart), one of which is updated in real time, the rest are fixed. If you can, please explain in general terms how to pass these prices to iCustom so that the data is displayed in only one single window under the chart.
 
atztek:

The part of the code with iCustom call as such is not there yet, as it's not clear how to avoid windows multiplication (due to indicator_separate_window application in the indicator). Basically there is an array with values (e.g. Close[] prices for the last 500 bars on the main chart), one of which is updated in real time, the rest are fixed. If you can, please explain in general terms how to pass these prices to iCustom so that the data is displayed in only one single window under the chart.

You have a poltergeist - there is no code, but the windows multiply. Are you trying to cheat a bug?
 
barabashkakvn:
You have a poltergeist - no code, but the windows are multiplying. Are you trying to trick the bug?
If you put iCustom in the code and pass it one value at a time, you probably won't have any reproduction problems. I'm trying to figure out how to feed it with the whole array. If I want to arrange a "for" loop and put iCustom there, the problem will not be avoided.

. . .

Now I have added iCustom in the code and started multiplying windows.
Below is an example of the indicator iCustom refers to.

#property indicator_separate_window

#property indicator_buffers 1
#property indicator_width1  2
#property indicator_color1  clrNavy


extern double  Price_Draw                  = 0.0;
extern int     Price_Shift                       = 0;
extern int     Bar_Width                        = 2;
extern color   Bar_Color                       = clrNavy;


double         Buffer_Draw[];


int init() {

   IndicatorBuffers(1);
   IndicatorDigits(Digits);
   IndicatorShortName("Bar_Draw");

   SetIndexStyle( 0, DRAW_ARROW, STYLE_DOT, Bar_Width, Bar_Color);
   SetIndexBuffer(0, Buffer_Draw);
   SetIndexArrow( 0, 158);

   return(0);

}



void start() {

   Buffer_Draw[Price_Shift]                     = Price_Draw;
   return;

}
 
atztek:
If you put iCustom in the code and pass it one value at a time, you probably won't have any reproduction problems. I'm trying to figure out how to feed it the whole array. If I arrange a "for" loop and put iCustom in it, the problem won't be avoided, is there another solution?


And what problems, for example, won't be avoided when calling iCustom in a loop? It's easier to write the code and check it than to waste so much time here on the forum.
 
evillive:

and what problems, for example, cannot be avoided by calling iCustom in a loop? It's easier to already write the code and check it than to waste so much time here on the forum.

I already checked it, but what's the point of posting something that obviously doesn't work?
Above I've described an example and asked to tell in general how to write a call to iCustom for it not to multiply windows.
 
 SetIndexStyle( 0, DRAW_ARROW, STYLE_DOT, Bar_Width, Bar_Color); ????????????
 
evillive:

Don't divert the subject.
 
Well then make another little effort and write the same EA template with this indicator call, it's not clear what you want from it.
 

I may be completely ignorant, but I think you're all looking in the wrong direction.

TASK: The ADVISOR collects data and the INDICATOR needs to retrieve data from the ADVISOR via iCustom(). INDICATOR accesses data from COUNTER...

atztek:
Question for iCustom. The indicator in a separate window displays the price that is received from the Expert Advisor through iCustom.
At the same time every time iCustom is called for new values from the Expert Advisor, a new window is opened, it should be prevented.

In this case, how to organize the interaction between the Indicator and the Expert Advisor to draw new values coming from the Expert Advis or in the same window under the main price chart?


Is it real?

Reason: