Server version in Opener - page 15

 
prostotrader:

No way. I had workers from western Ukraine working for me, but they wouldn't let them in.

The house is still standing without a roof... It is sad.

With windows, but without a roof.


If you put the house on its side, it will have a roof but no window. Invite those who will let you in - they will put it on its side for a reasonable price :)

 
Artyom Trishkin:

If you put the house on its side, it will have roofs but no windows. Invite those who will let you in - they'll put it on its side for a reasonable price :)

And I'm not amused at all....

 
prostotrader:

No way. I had workers from western Ukraine working for me, but they wouldn't let them in.

The house is still standing without a roof... It is sad.

With windows, but without a roof.


Yeah, it's sad. But the season starts, others will come. The main thing is to survive the quarantine. I hope they won't extend it.

 
Alexey Viktorov:

Yeah, that's sad. But the season starts, others will come. The main thing is to survive the quarantine. I hope they won't extend it.

I have other thoughts. People are not taking the problem seriously.

I don't think we'll be able to control the virus by September.

 
To avoid a purge in the thread, please do not continue with the coronavirus topic.
 
Alexey Viktorov:

Something came out too easily. Please check it.

I have.

returned RTS-3.20

By the way, I would have done so

string newFutures(const string aSymbol, int month = 3) // Сюда можно вставить и 1 и 6
{
  MqlDateTime mqlDateTime;
  if(TimeToStruct(SymbolInfoInteger(aSymbol, SYMBOL_EXPIRATION_TIME)+month*PeriodSeconds(PERIOD_MN1), mqlDateTime) == true)// Получилось время экспирации следующего фьючерса
  {
    string symb = StringSubstr(aSymbol, 0, StringFind(_Symbol, "-")+1);
    return(symb+(string)(mqlDateTime.mon)+"."+(string)(mqlDateTime.year%1000));
  }
  return("");  
}

Added

Here,month*PeriodSeconds(PERIOD_MN1) may be wrong because sometimes the expiry time is shifted (exchange needs).

And in a month futures, if you run the Expert Advisor closer to the end of the month, you will definitely jump over the futures (e.g., the end of January).

Therefore, I recommend using my function.

Документация по MQL5: Константы, перечисления и структуры / Константы графиков / Периоды графиков
Документация по MQL5: Константы, перечисления и структуры / Константы графиков / Периоды графиков
  • www.mql5.com
Все предопределенные периоды графиков имеют уникальные идентификаторы. Идентификатор PERIOD_CURRENT означает текущий период графика, на котором запущена mql5-программа.
 
Artyom Trishkin:
To avoid a purge in the thread, please do not continue with the coronavirus thread.

OK

 
Artyom Trishkin:

If you put the house on its side, it will have a roof but no window. Invite those who will let you in - they will put it on its side for a reasonable price :)

The soldier turns the mug upside down and approaches the warrant officer:
- Look at this glass: it's iron, and the top is sealed.
- Wow, there's no bottom either!

 
prostotrader:

By the way, I would do this

Added

Here,month*PeriodSeconds(PERIOD_MN1) may not be correct, because sometimes the expiry time is shifted (exchange needs).

And in a month futures, if you run the Expert Advisor closer to the end of the month, you will definitely jump over the futures (e.g., the end of January).

So I recommend to use my function.

1. I agree, a check would not be superfluous.

2. How much can they shift? Maybe move to the next month?

3. Monthly futures expire, I looked at oil on the 3rd or 4th of the month. This is January and February. How much can it be shifted? But to jump because of the difference in the number of days... But I don't think that PeriodSeconds(PERIOD_MN1) counts the number of days or bars on the chart. Most likely it's from Windows parameters, and even leap year difference is taken into account there.

Tomorrow I will try to simulate on oil January, February, March as it will recalculate.

 
Artyom Trishkin:
To avoid a purge in the thread, please do not continue with the coronavirus topic.

You have to purge when you start arguing. We are calm, friendly and only raise issues in passing.