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

 
There are 2 terminals running incomprehensibly. In Task Viewer I see 3 terminals.exe Unsymmetrical at all!
 
Dimka-novitsek:
There are 2 terminals running incomprehensibly. In Task Viewer I see 3 terminals.exe Unsymmetrical at all!
Maybe the mirror is wrong?
 

Please advise, I am making an indicator in which the program has to run through all the uncounted bars not once but twice:

One buffer is counted, the line is drawn. Then on the basis of first buffer counting the second buffer is calculated - the second line is built.

And at what moment does the number returned by IndicatorCounted() change - at the moment of exit from the special function Start or it changes during calculations in the function body?

Is it possible to make two passes over the bars this way:

Counted_bars=IndicatorCounted();

i=Bars - Counted_bars-1;

while(i>=0)//--------First pass

{

Buf_1[i]=A(counted);

i- -;

}

Counted_bars=IndicatorCounted();

i=Bars - Counted_bars-1;

while(i>=0) //--------Second pass

{

Buf_2[i]=Buf_1[i]+x;

i--;

}

 
Trendy:

Please advise, I am making an indicator, in which the program should run through all un-calculated bars not once but twice:

One buffer counted, the line is plotted. Then on the basis of first buffer counting the second buffer is calculated - the second line is built.How to organize it?

And at what moment the number returned by IndicatorCounted() changes - at the moment of exit from special function Start or it changes during calculations in the function body?

Is it possible to make two passes over the bars in this way:

You're in no hurry to ask questions. Who prevents you from doing it this way:

 Counted_bars=IndicatorCounted();
  
   i=Bars - Counted_bars-1;
   Print ("Bar(1) ", i);
   while(i>=0)                           //--------Первый проход

     {

         Buf_1[i]=A(расчёты);

       i- -;

      }

Counted_bars=IndicatorCounted();
  
   i=Bars - Counted_bars-1;
   Print ("Bar(2) ", i);
   while(i>=0)                         //--------Второй проход

    {

      Buf_2[i]=Buf_1[i]+x;

      i--;

      }

it's the easiest way to get the REAL answer, rather than listening to someone else's abstruse nonsense... (in most cases) :))

P.S. In most cases one cycle is enough.

 
How do you colour the chart (background, text, bars, etc...) programmatically?
 

I run the optimisation, it makes one pass and that's it. What can be the problem, that optimisation does not work in the tester? Do I need to write code for optimisation in the EA code?

 

Please tell me how to use int GetSignal() function, which gives: 1 - buy signal, -1 - sell signal, 0 - no signal.

How to make an indicator to see the bar closing signals on the history? (then output it in Excel, to compare it with the indicator of another platform)

Perhaps, I should pass i candlestick parameters to the function?

Maybe this has been discussed and there is a solution?

 
pa0905:

Please tell me how to use int GetSignal() function in my Expert Advisor. It gives: 1 - buy signal, -1 - sell signal, 0 - no signal.

How to make an indicator to see the signals on the closing of the bar of history? (then output it in Excel, to compare it with the indicator of another platform)

Perhaps, I should pass the parameters of i candle to the function?

Maybe this has been discussed and there is a solution?

The ram of history?! That's awesome!
 
_new-rena:
How do you colour the chart (background, text, bars, etc...) programmatically?

see
Files:
servicesmt4.mqh  106 kb
 
pako:

check out
Not there. I made provision for it in the class, but I didn't implement it in the library. I will do it if I have to.