RTH on MT5

 
Hey, Is there any code or indicator that makes the chart only show the regular trading hours in the CFDs ? I am looking for this information for several weeks now, and cannot find anything.
 
Rodrigo:
Hey, Is there any code or indicator that makes the chart only show the regular trading hours in the CFDs ? I am looking for this information for several weeks now, and cannot find anything.

There are indicators out there that highlight trading sessions. Try searching the keywords like "trading session indicator" 

 
Yashar Seyyedin #:

There are indicators out there that highlight trading sessions. Try searching the keywords like "trading session indicator" 

Those inidcators only indicate when the sessions begins and ends. I am trying to hide the non regular trading hour bars.
 
Rodrigo #:
Those inidcators only indicate when the sessions begins and ends. I am trying to hide the non regular trading hour bars.
Only possible with custom symbols.

You cannot do that with standard symbols, provided by your broker.
 
Rodrigo:
Hey, Is there any code or indicator that makes the chart only show the regular trading hours in the CFDs ? I am looking for this information for several weeks now, and cannot find anything.

By regular you mean within the European and US sessions ? 

The first problem you'll run into , is you'll need your ticks to be in GMT to construct that.

 
Hi, did you get a solution ? i am looking the same
 
Dominik Egert #:
Only possible with custom symbols.

You cannot do that with standard symbols, provided by your broker.

Just to expand upon your accurate post, CustomSymbolSetSessionQuote() is the key MQL5 standard function.

MQL5 Book: Configuring quoting and trading sessions / Advanced language tools
MQL5 Book: Configuring quoting and trading sessions / Advanced language tools
  • www.mql5.com
Two API functions allow setting quoting and trading sessions of a custom instrument. These two concepts were discussed in the section Schedules of...
 

And for some basic instruction regarding custom symbols...

Articles

Custom symbols: Practical basics

Stanislav Korotky, 2020.11.30 08:27

The article is devoted to the programmatic generation of custom symbols which are used to demonstrate some popular methods for displaying quotes. It describes a suggested variant of minimally invasive adaptation of Expert Advisors for trading a real symbol from a derived custom symbol chart. MQL source codes are attached to this article.