messtone.com.wordpress

Symbol Chart

string_Symbol Random functionx=_RandomSeed*214013+2531011;_RandomSeed=x;x=(x>>16)&0x7FFF;int MathRand( );void MathRand(int seed //initializing number );time settings on Messtone computer,functiondateTime TimeCurrent();dateTime TimeCurrent(MqlDateTime&dt_struct //structure type variable uint GetTickCount( );if a computer works uninterruptedly Example:#define MAX_SIZE 40 //+——————————-+// | Script for measuring computation time of 40 Fibonacci numbers | //+————————————+void OnStart( ){//—Remember the initial value uint start=GetTickCount( );struct MqlDateTime{int year;//Year int mon;//Month int day;//Day int hour;//Hour int min;//Minutes int sec;//Seconds int day_of_week;//Day of week(0-Sunday,1-Monday,…,6-Saturday) int day_of_year;//Day number of the year(January 1st is assigned the number value of zero)};day for non-leap year Example`void OnStart( ){//—daytime date1=D’2008.03.01′:datetime date2=D’2009.03.01′;MqlDateTime str1,str2;TimeToStruct(date1,str1);TimeToStruct(date2,str2);print f (“%02d.%02d.%4d.day of year=%d’,str1.day,str1.mon,str1.year,str1.day_of_year);print f (“%02d.%02d.%04d,day of year=%d”,str2.day,str2.str2.day of year,str2.day_of_year);}/*Result:01.03.2008,day of year=60 01.03.2009,day of year=59*/

Leave a comment