# EA Testing, Seconds Modelling

13

I am new to mql4, and I would like to see the algorithm of how the seconds are modeled in MQL4 back testing, Thanks.
Moderator
10614

fxscout:
I am new to mql4, and I would like to see the algorithm of how the seconds are modeled in MQL4 back testing, Thanks.
Seconds are not modeled as such, ticks are.

I can only guess that the seconds are calculated by dividing the time-frame seconds by the tick volume for use with TimeCurrent()
13

I do not know if I understand it wrong, but in this link talks about modeling seconds https://docs.mql4.com/dateandtime/seconds  Note At the testing, the last known server time is modelled.
Seconds - Date and Time - MQL4 Reference
• docs.mql4.com
Seconds - Date and Time - MQL4 Reference
Moderator
10614

fxscout:
Note At the testing, the last known server time is modelled.
TimeCurrent() is modeled in the tester and has been for a long time, not sure about Seconds()
13

How to get the value of Close  in MQL4        double CL = Close[0]   What is the equivalent in MQL5
2958

fxscout: How to get the value of Close in MQL4  "double CL = Close[0]" What is the equivalent in MQL5

Please read the article, Migrating from MQL4 to MQL5, specifically section 3. Predefined Variables for "Close[]", and I quote:

### 3. Predefined Variables

MQL4
MQL5Description
`double Close[]`
```double Close[];
int count;   // number of elements to copy
ArraySetAsSeries(Close,true);
CopyClose(_Symbol,_Period,0,count,Close);```
Close
Series array that contains close prices for each bar of the current chart.
CopyClose, ArraySetAsSeries
Close - Predefined Variables - MQL4 Reference
• docs.mql4.com
Close - Predefined Variables - MQL4 Reference