Table of Contents

Class FXServer

Namespace
Balsam.DataServers
Assembly
Balsam.Backtester.dll

A specialized BarServer for serving up FX rates.

public class FXServer : AsciiBarServer, IBarServer
Inheritance
FXServer
Implements
Inherited Members
Extension Methods

Constructors

FXServer(string)

Initializes a new FXServer using the specified directory assuming a Date,Close file format.

public FXServer(string directory)

Parameters

directory string

FXServer(string, DataField[])

Initializes a new FXServer using the specified parameters.

public FXServer(string directory, DataField[] dataFields)

Parameters

directory string
dataFields DataField[]

Properties

BaseCurrency

Gets/sets the base currency, if any.

public string BaseCurrency { get; set; }

Property Value

string

Mappings

Gets the FX file mapping dictionary.

public FXMappingCollection Mappings { get; set; }

Property Value

FXMappingCollection

Methods

OnGetInstrument(string)

Returns a new forex instrument if symbol not found in instrument dictionary.

protected override Instrument OnGetInstrument(string symbol)

Parameters

symbol string

Returns

Instrument

OnGetSymbols()

Gets the available forex pairs.

protected override IEnumerable<string> OnGetSymbols()

Returns

IEnumerable<string>

OnLoadSymbol(string, DateTime, DateTime, int)

Overrides base implementation to try inverse if initial currency pair isn't found.

protected override BarSeries OnLoadSymbol(string symbol, DateTime startDate, DateTime endDate, int barsToLoad = 2147483647)

Parameters

symbol string
startDate DateTime
endDate DateTime
barsToLoad int

Returns

BarSeries

OnResolveFileName(string)

Uses the internal mapping dictionary to resolve filenames instead of the base implementation.

protected override string OnResolveFileName(string symbol)

Parameters

symbol string

Returns

string