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

 
AlexeyVik:

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...


Is this realistic???


No, it is not real )))) but it is vice versa what Aztec wants to do - the Expert Advisor transfers the data that should be displayed by the indicator through iCustom. The data may be transferred but it is not shown on the chart, only in memory and in the journal.
 
evillive:

No, not really ))) but Aztec wants to do the opposite - the Expert Advisor sends data via iCustom to the indicator, which the indicator should display.

Why don't you directly set the calculations required for the indicator?
 
borilunad:

Why not immediately set the calculations you need to show in the indicator?

he will come to that one day, but for now there is a long way to go.
 

Can you tell me what I'm doing wrong?

I can't calculate the Sharpe Ratio, it always returns zero:

double OnTester()   { 
   double sharp=TesterStatistics(STAT_SHARPE_RATIO);
   return(sharp);
}
 
evillive:

he will come to that one day, but for now there is a long way to go.

And the indicator is for that, indicar (indicar), pointer (indicador), index finger (índice). A lot of things are clearer to me in Spanish than in Russian. :)
 
evillive:

he will come to that one day, but for now there is a long way to go.
That's how long I've been silent. I had a little bit and couldn't take it...
 
evillive:

he'll get there one day, but for now there's a long way to go.

Let's go on with the flooding... The fact that the data from the Expert Advisor can be transferred to indicators via iCustom is a fact, at least in the tester it works (it is displayed only at the end of testing), I used it a lot in the past when coding EAs and setting strategies.
 
atztek:

Let's go on a rant... I have used it a lot in the past when coding EAs and setting strategies.


If you think about it, you will realize that every time you send data to a new copy of the indicator. That's why the tester becomes white with hundreds of indicator windows. Do not try to use the tool that was not designed for this purpose, it's much easier and more convenient to do all the calculations and collect the data for displaying the indicator in the indicator itself.
 
evillive:
try to declare double sharp on a global level.


The problem is not with the variable, because without it the result is the same - it always returns zero.

return(TesterStatistics(STAT_SHARPE_RATIO));
 
evillive:

If you think about it, you will realise that you are sending data to a new copy of the indicator each time. This is why the tester becomes white with hundreds of indicator windows. Do not try to use a tool that is not intended for this purpose, it's much easier and more convenient to do all the calculations and collect the data for displaying the indicator in the indicator itself.

I wrote about it without tons of unnecessary flooding. I wrote it without tons of unnecessary rubbish. That's why if the problem with indicator_separate_window in the indicator is not solved by iCustom, the code has nothing to do with it, I asked to describe a possible solution in general terms, if it exists for iCustom. If not, I will solve the problem differently.