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

 
barabashkakvn:
And when testing (without optimisation enabled), why should we load all the cores? After all, if testing with visualization, there is no hurry, while if testing without visualization, modern computers can do it like a sunflower on a single core.

Well I think if all cores would work in testing without visualization it would be even faster, I just feel that running quiet even with modern processor I lack speed, perhaps much depends on the correctness of the code, if it is well optimized then everything is fast, if not then long.

Can you tell me please,does OpenCL for GPU or video card affect speed of testing or is it just for writing code, if code is written forOpenCL then it will run much faster in testing mode, and if the code is just code.

 
7Konstantin7:


Can you tell me ifOpenCL has some effect on testing speed or if it's just for writing code, if code is written inOpenCL then it will run much faster in testing mode, and if the code is just code.

As far as I understand OpenCL in MT5 helps in working with "heavy" graphics, a video card is not involved in testing and optimization, otherwise everyone would have long ago been mining on the agent service, as in bitcoins.
 
evillive:
As far as I understandOpenCL in MT5 helps in working with "heavy" graphics, video card is not involved in testing and optimization, otherwise everyone would have been mining on agent service like on bitcoins long time ago.

It's a pity if so, I would like everything to be involved)

I just saw a robot code on that site mt5, downloaded it, ran the test and it took so long, especially on all ticks, it would be better to use all the cores instead of one, but it is likely that the majority of codes posted on that site are wrongly written, that is why the test is so long, my CPU is certainly not an Intel, but 8 cores 4.000GHz should fly, but I sit in the tester on a notebook, it is sad if mt5 is to blame for that, why it is so.

 
tara:

The variable should be there, not something else:

Variable? Mm-hmm. Thank you.
 
Tell me where the mistake is. My head already hurts. (
Files:
 
martovskiy_tigr:
Tell me where the mistake is. My head already hurts. (
Shall we talk? What's bothering you?
 

the indicator window hangs from -99999... to +99999...99

 
martovskiy_tigr:

the indicator window hangs from -99999... to +99999...99

The value of i is counted wrong, the loop will never be calculated, and there will also be exit outside the array in several places (the reasons are highlighted in red).

This is better:

   indx = rates_total-prev_calculated; //было indx = rates_total-prev_calculated-1; - что чаще всего < 0
   if(prev_calculated<1) indx=rates_total-2; //было if(indx<0) indx=0; - то есть всегда i=0 а цикл-то до 1, на i=0 цикл никогда не просчитается
   sm_bar = (Close[1] - Open[rates_total-1])/rates_total; //индекс не может быть [rates_total]
   i = indx;
   k = 0;
   ekviti[rates_total-1] = 0; //индекс не может быть [rates_total]
   while(i >= 0)
   {
    if(bar_n == TimeDayOfWeek(iTime(NULL,0,i)))
    {
     ekviti[i] = ekviti[i+1] + close[i] - open[i] - sm_bar;
     k++;
    }
    else ekviti[i] = ekviti[i + 1];
    i--;
   }
 
Thank you. I certainly wouldn't have figured it out on my own. I just didn't know.
 
Hello. Please help. Places orders and does nothing else. No errors.
Files:
test3_3.mq4  15 kb
Reason: