if( CurrentBar >= Bars.Count - 2 )
{
Print("");
Print( Instrument.FullName );
Print( Time[ CurrentBar ].Date +" - "+ Time[0].Date );
Print( "CurrentBar: "+ CurrentBar .ToString( "### ### ### ### ###" ) );
int loops = 10000;
DateTime start = DateTime.Now;
double sum = 0;
for( int i = 0; i <= CurrentBar; i++ )
{
for( int j = 0; j < loops; j++ ) sum += Close[i];
}
Print( sum.ToString( "0.00" ) +" "+ DateTime.Now.Subtract( start ).TotalMilliseconds.ToString( "### ### ### ### ###.00"+" msec" ) );
}
(Tested on Windows 10 x64).

Comment