I am not seeing any price for any security (currency) for Oanda

I am not seeing any price for any security (currency) for Oanda
Atom
31.08.2020
Vladimir Vincent



I am following the lesson 01_Connect_and_get_security
I am not seeing any price for any security (currency) for Oanda
Please see image below.

public partial class MainWindow : Window
{
private Connector _connector = new Connector();
private string _connectFile = "ConnectFile";

public MainWindow()
{
InitializeComponent();
if (File.Exists(_connectFile))
{
_connector.Load(new XmlSerializer<SettingsStorage>().Deserialize(_connectFile));
}
}

private void Setting_Click(object sender, RoutedEventArgs e)
{
if (_connector.Configure(this))
{
new XmlSerializer<SettingsStorage>().Serialize(_connector.Save(), _connectFile);
}
}

private void Connect_Click(object sender, RoutedEventArgs e)
{
SecurityPicker.SecurityProvider = _connector;
SecurityPicker.MarketDataProvider = _connector;
//_connector.Connected += this.Connector_Connected;

_connector.Connect();
}

//private void Connector_Connected()
//{
// _connector.LookupSecurities(new Security(){Code = "USD/JPY"});
//}

private void SecurityPicker_SecuritySelected(Security security)
{
if (security == null) return;

_connector.RegisterSecurity(security);
}
}
image7488.png 65 KB (309)



Спасибо:


Support

Фотография
Дата: 01.09.2020
Ответить


Hello Vladimir,

Please try this variant of SecurityPicker_SecuritySelected

Код
private void SecurityPicker_SecuritySelected(Security security)
        {
            if (security == null) return;
            //_connector.RegisterSecurity(security); // - out of date
            _connector.Subscribe[b]MarketDepth[/b](security);
        }


Oanda does not provide Level1 and you need to subscribe on MarketDepth.
Спасибо:

Vladimir Vincent

Фотография
Дата: 01.09.2020
Ответить


No function SubscribeMarketDepth on _connector
Спасибо:

Support

Фотография
Дата: 01.09.2020
Ответить


From where you download Lesson package? Can you provide link?
Спасибо:

Vladimir Vincent

Фотография
Дата: 01.09.2020
Ответить


Спасибо:

Vladimir Vincent

Фотография
Дата: 01.09.2020
Ответить


Спасибо:

Vladimir Vincent

Фотография
Дата: 01.09.2020
Ответить


I have use the nuget pkg StockSharp 4.4.16
Спасибо:

Support

Фотография
Дата: 01.09.2020
Ответить


Please download 5.X version.
Спасибо:

Vladimir Vincent

Фотография
Дата: 02.09.2020
Ответить


I have downloaded the nuget pkg StockSharp 5. Now I do not see any broker list from the Connection settings when i click on the plus button

// here is the code below

public partial class MainWindow : Window
{
private Connector _connector = new Connector();
private string _connectFile = "ConnectFile";

public MainWindow()
{
InitializeComponent();
if (File.Exists(_connectFile))
{
_connector.Load(new XmlSerializer<SettingsStorage>().Deserialize(_connectFile));
}
}

private void Setting_Click(object sender, RoutedEventArgs e)
{
if (_connector.Configure(this))
{
new XmlSerializer<SettingsStorage>().Serialize(_connector.Save(), _connectFile);
}
}

private void Connect_Click(object sender, RoutedEventArgs e)
{
SecurityPicker.SecurityProvider = _connector;
SecurityPicker.MarketDataProvider = _connector;
////_connector.Connected += this.Connector_Connected;

_connector.Connect();
}

//private void Connector_Connected()
//{
// _connector.LookupSecurities(new Security(){Code = "USD/JPY"});
//}

private void SecurityPicker_SecuritySelected(Security security)
{
if (security == null) return;
_connector.SubscribeFilteredMarketDepth(security);
//_connector.RegisterSecurity(security);
}
}
image5418.png 43 KB (283)
Спасибо:

Vladimir Vincent

Фотография
Дата: 02.09.2020
Ответить


I got the currency list to show by adding the Oanda nuget pkg, but I am not seeing the price of the security when i click on a currency.
Спасибо:


Добавить файлы через драг-н-дроп, , или вставить из буфера обмена.

loading
clippy