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.
//+------------------------------------------------------------------+//| Песнь об аллигаторе |//+------------------------------------------------------------------+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);
}
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, 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.
Are we talking about the whole code of the indicator, or just the passage I gave?
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?
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.