Lean  $LEAN_TAG$
QuantConnect.Securities.Forex.ForexExchange Class Reference

Forex exchange class - information and helper tools for forex exchange properties More...

Inheritance diagram for QuantConnect.Securities.Forex.ForexExchange:
[legend]

Public Member Functions

 ForexExchange ()
 Initializes a new instance of the ForexExchange class using market hours derived from the market-hours-database for the FXCM Forex market More...
 
 ForexExchange (SecurityExchangeHours exchangeHours)
 Initializes a new instance of the ForexExchange class using the specified exchange hours to determine open/close times More...
 
- Public Member Functions inherited from QuantConnect.Securities.SecurityExchange
 SecurityExchange (SecurityExchangeHours exchangeHours)
 Initializes a new instance of the SecurityExchange class using the specified exchange hours to determine open/close times More...
 
void SetLocalDateTimeFrontierProvider (LocalTimeKeeper timeProvider)
 Set the current datetime in terms of the exchange's local time zone More...
 
bool DateIsOpen (DateTime dateToCheck)
 Check if the date is open. More...
 
bool DateTimeIsOpen (DateTime dateTime)
 Check if this DateTime is open. More...
 
bool IsOpenDuringBar (DateTime barStartTime, DateTime barEndTime, bool isExtendedMarketHours)
 Determines if the exchange was open at any time between start and stop More...
 
bool IsClosingSoon (int minutesToClose)
 Determines if the exchange is going to close in the next provided minutes More...
 
void SetMarketHours (IEnumerable< MarketHoursSegment > marketHoursSegments, params DayOfWeek[] days)
 Sets the regular market hours for the specified days If no days are specified then all days will be updated. More...
 

Properties

override int TradingDaysPerYear [get]
 Number of trading days per year for this security, used for performance statistics. More...
 
- Properties inherited from QuantConnect.Securities.SecurityExchange
SecurityExchangeHours Hours [get]
 Gets the SecurityExchangeHours for this exchange More...
 

Additional Inherited Members

- Public Attributes inherited from QuantConnect.Securities.SecurityExchange
DateTimeZone TimeZone => Hours.TimeZone
 Gets the time zone for this exchange More...
 
virtual int TradingDaysPerYear => 365
 Number of trading days per year for this security. By default the market is open 365 days per year. More...
 
DateTime LocalTime => _timeProvider.LocalTime
 Time from the most recent data More...
 
bool ExchangeOpen => Hours.IsOpen(LocalTime, false)
 Boolean property for quickly testing if the exchange is open. More...
 
bool ClosingSoon => IsClosingSoon(minutesToClose:10)
 Boolean property for quickly testing if the exchange is 10 minutes away from closing. More...
 

Detailed Description

Forex exchange class - information and helper tools for forex exchange properties

See also
SecurityExchange

Definition at line 22 of file ForexExchange.cs.

Constructor & Destructor Documentation

◆ ForexExchange() [1/2]

QuantConnect.Securities.Forex.ForexExchange.ForexExchange ( )

Initializes a new instance of the ForexExchange class using market hours derived from the market-hours-database for the FXCM Forex market

Definition at line 37 of file ForexExchange.cs.

◆ ForexExchange() [2/2]

QuantConnect.Securities.Forex.ForexExchange.ForexExchange ( SecurityExchangeHours  exchangeHours)

Initializes a new instance of the ForexExchange class using the specified exchange hours to determine open/close times

Parameters
exchangeHoursContains the weekly exchange schedule plus holidays

Definition at line 47 of file ForexExchange.cs.

Property Documentation

◆ TradingDaysPerYear

override int QuantConnect.Securities.Forex.ForexExchange.TradingDaysPerYear
get

Number of trading days per year for this security, used for performance statistics.

Definition at line 28 of file ForexExchange.cs.


The documentation for this class was generated from the following file: