In the following code i always see error 'MqlDateTime' - struct or class already defined
I cant see why?
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)
int day = time.day;
int hour = time.hour;
int dayOfWeek = time.day_of_week;
What do you think "already defind" means?
Select the Statement and press "F1".
I see that already defined means I have declared MqlDateTime as a struct data type and so I cant declare it again. But, how come for example in the following code i can assign a struct data type as tradeSettings and then define this object as trade which then allows me to access the member variable of the structure
to create the slippage object. But, in the above code it doesn't let me define a new object as time using the declared MqlDateTime object? I've taken this all from the MQL4 reference and doesn't appear to work for me.
ulong slippage = trade.slippage = 50;
To add comments, please log in or register