Table of Contents

Class OandaMessageAdapter

Namespace
StockSharp.Oanda
Assembly
StockSharp.Oanda.dll

The messages adapter for OANDA.

[OrderCondition(typeof(OandaOrderCondition))]
[MediaIcon("Oanda_logo.svg")]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Oanda", Description = "ForexConnector", GroupName = "Forex")]
[MessageAdapterCategory(MessageAdapterCategories.FX|MessageAdapterCategories.History|MessageAdapterCategories.RealTime|MessageAdapterCategories.Free|MessageAdapterCategories.Candles|MessageAdapterCategories.MarketDepth|MessageAdapterCategories.Level1|MessageAdapterCategories.Transactions)]
public class OandaMessageAdapter : MessageAdapter, IMessageAdapter, IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable, INotifyPropertyChanged, ITokenAdapter, IDemoAdapter
Inheritance
OandaMessageAdapter
Implements
ICloneable<IMessageChannel>
IPersistable
Inherited Members
Extension Methods

Constructors

OandaMessageAdapter(IdGenerator)

Initializes a new instance of the OandaMessageAdapter.

public OandaMessageAdapter(IdGenerator transactionIdGenerator)

Parameters

transactionIdGenerator IdGenerator

Transaction id generator.

Fields

DefaultHeartbeatInterval

Default value for HeartbeatInterval.

public static readonly TimeSpan DefaultHeartbeatInterval

Field Value

TimeSpan

Properties

AllTimeFrames

Possible time-frames.

public static IEnumerable<TimeSpan> AllTimeFrames { get; }

Property Value

IEnumerable<TimeSpan>

AssociatedBoards

The adapter can process subscription only with instruments associated with the specified board.

public override string[] AssociatedBoards { get; }

Property Value

string[]

FeatureName

Feature name.

public override string FeatureName { get; }

Property Value

string

IsDemo

Connect to demo trading instead of real trading server.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Demo", Description = "DemoTradingConnect", GroupName = "Connection", Order = 2)]
public bool IsDemo { get; set; }

Property Value

bool

IsSupportExecutionsPnL

Adapter fills PnL.

public override bool IsSupportExecutionsPnL { get; }

Property Value

bool

IsSupportTransactionLog

Adapter translates orders changes on reply of OrderStatusMessage.

public override bool IsSupportTransactionLog { get; }

Property Value

bool

LogOnlyTransactions

Write log messages only for transaction stream.

[Display(ResourceType = typeof(LocalizedStrings), Name = "OnlyTransactions", Description = "OnlyTransactionsLog", GroupName = "Connection", Order = 3)]
public bool LogOnlyTransactions { get; set; }

Property Value

bool

TimeFrames

Get possible time-frames for the specified instrument.

protected override IEnumerable<TimeSpan> TimeFrames { get; }

Property Value

IEnumerable<TimeSpan>

Token

Token.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Token", Description = "TokenDot", GroupName = "Connection", Order = 1)]
public SecureString Token { get; set; }

Property Value

SecureString

UseCompression

Compression.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Compression", Description = "CompressionDot", GroupName = "Connection", Order = 2)]
public bool UseCompression { get; set; }

Property Value

bool

Methods

IsAllDownloadingSupported(DataType)

Is for the specified dataType all securities downloading enabled.

public override bool IsAllDownloadingSupported(DataType dataType)

Parameters

dataType DataType

Data type info.

Returns

bool

Check result.

Load(SettingsStorage)

Load settings.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

OnSendInMessage(Message)

Send message.

protected override bool OnSendInMessage(Message message)

Parameters

message Message

Message.

Returns

bool

true if the specified message was processed successfully, otherwise, false.

Save(SettingsStorage)

Save settings.

public override void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.