Questions from Beginners MQL5 MT5 MetaTrader 5 - page 540

 
error 'ST' - undeclared identifier test3.mq4 69 13 andpossible loss of data due to type conversion test3.mq4 85 15
 
error 'ST' - undeclared identifier test3.mq4 69 13 andpossible loss of data due to type conversion test3.mq4 85 15 help fix
 
vladislavch19:
writes error 'ST' - undeclared identifier test3.mq4 69 13 andpossible loss of data due to type conversion test3.mq4 85 15 help correct
The error message indicates that you are trying to use an undeclared identifier 'ST' (variable name) in line 69 and position 13, and in line 85 and position 15.
 

Ladies and gentlemen, I am relying on you!

Please advise conceptually how to handle the bars from 15 to 15.55 for the last 250 trading sessions. I'm a bit confused by the amount of information...

 
Stairway_2_7:

Ladies and gentlemen, I am relying on you!

Please advise me conceptually how to handle the bars from 15 to 15.55 for the last 250 trading sessions. I'm a bit confused by the amount of information...

Filter Saturdays and Sundays usingMqlDateTime
 

Aleks,

use an indicator with the function

OnCalculate(const int rates_total,

const int prev_calculated,

const datetime &time[],

const double &open[],

const double &high[],

const double &low[],

const double &close[],

const long &tick_volume[],

const long &volume[],

const int &spread[])

{

to access all history bars?

 

Guys, where can I read about weekend and holiday filtering?

I only need the trading days of the Asian session.

 
Stairway_2_7:

Guys, where can I read about weekend and holiday filtering?

I only need the trading days of the Asian session.

Are they on the chart?
 

pako,

const uint SecsPerDay = 60 * 60 * 24; // number of seconds in a day


datetime newtime = TimeCurrent() - SecsPerDay * 6; // calculation


Alert(newtime); // output result

I can find the last date like this. The answer is March 19, Saturday. And I only need weekdays.

 
Stairway_2_7:

pako,

const uint SecsPerDay = 60 * 60 * 24; // number of seconds in a day


datetime newtime = TimeCurrent() - SecsPerDay * 6; // calculation


Alert(newtime); // output result

I can find the last date like this. The answer is March 19, Saturday. And I only need weekdays.

You got me wrong,

There are no Saturdays and Sundays on the D1 chart.

Why look for something that doesn't exist?

https://www.mql5.com/ru/docs/constants/structures/mqldatetime

https://www.mql5.com/ru/code/download/10513/4Sessions.mq4

Документация по MQL5: Стандартные константы, перечисления и структуры / Структуры данных / Структура даты
Документация по MQL5: Стандартные константы, перечисления и структуры / Структуры данных / Структура даты
  • www.mql5.com
Стандартные константы, перечисления и структуры / Структуры данных / Структура даты - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
Reason: