How do you programmatically distinguish between a PROFESSIONAL fetus and a DILIETAN fetus? - page 14

 
Vinin:


Your code can be sped up a bit if you like. If you optimise it, it will make a big difference.

It's just a weekend challenge.


It's not my code:) The comments are mine:)
 
Man, you're intriguing.
 
Are we talking about the whole code of the indicator, or just the passage I gave?
 
grell:
Man, that's intriguing.


But it doesn't say anything about professionalism. A little bit about efficient algorithms. Nothing more.

I don't think of myself asa professional, though.

 
grell:
Are we talking about the whole code of the indicator, or just the passage I gave?
Only about the code I quoted. We don't see the rest (I apologise for the plural - there are enough viewers)
 
OK, I'll let you know on Sunday, maybe sooner.
 
grell:
OK, I'll report back on Sunday, or maybe sooner.


Logical operations are the hardest (only arrays operations are harder). I have to get rid of unnecessary ones.

And what is the limit?

 
Vinin:


Logical operations are the heaviest (only arrays are heavier). We have to get rid of unnecessary ones.

And what does limit equal?


Most often, Limit eliminates the need to recalculate all of the indicator values on the current bar. And this means that during testing, especially at opening prices, the indicator will be completely recalculated. So we can simply limit ourselves to the necessary number of bars for the calculation.
 
Not such a universal task. But another extern dept can be added. I don't see any other options, alas.
 
//+------------------------------------------------------------------+
//| Песнь об аллигаторе                                              |
//+------------------------------------------------------------------+
int start()
  {
                                   
   for(int i=0; i<dept; i++)
     {
      ExtBlueBuffer[i]=iMA(NULL,0,JawsPeriod,0,MODE_SMMA,PRICE_MEDIAN,i); //А почему у тебя такой рот? 
      ExtRedBuffer[i]=iMA(NULL,0,TeethPeriod,0,MODE_SMMA,PRICE_MEDIAN,i); //А почему у тебя такие зубы?
      ExtLimeBuffer[i]=iMA(NULL,0,LipsPeriod,0,MODE_SMMA,PRICE_MEDIAN,i); //А почему у тебя такие губы?
     }
   return(0);
  }