Custom MessageAdapter
Atom
8/11/2020


Rob

Avatar
I'm in the process of creating a custom adapter.
After adding the adapter to the connector and attempting to configure:
Code

var gc = new GainCapitalMessageAdapter(_connector.TransactionIdGenerator);
_connector.Adapter.InnerAdapters.Add(gc);

if (_connector.Configure(this))
new XmlSerializer<SettingsStorage>().Serialize(_connector.Save(), _connectFile);

The following error is produced:
Code

Message=Description of connection GainCapital.GainCapitalMessageAdapter not found. (Parameter 'adapter')

If added the following attributes to the custom MessageAdapter:
Code

[CategoryLoc("Forex")]
[DescriptionLoc("Str1770", LocalizedStrings.GainCapitalKey)]
[DisplayNameLoc(LocalizedStrings.GainCapitalKey)]

Also, while Unit Testing, the connect event is not firing but sending the ConnectMessage works:
Code

var gc = new GainCapitalMessageAdapter(_connector.TransactionIdGenerator);
_connector.Adapter.InnerAdapters.Add(gc);
_connector.Connect(); //-- does not work
gc.SendInMessage(new ConnectMessage { Adapter = gc }); //-- works

If this is included in a lesson, let me know. Otherwise, any advice is appreciated.

Thank you.



Thanks:


Support

Avatar
Date: 8/11/2020
Reply


Hello

We have GainCapital connector and it is already passed the certification. Unfortunately, it is not compatible with .NET Core and not available on cross-platform mode. We can publish it for .NET 4.8 version if it necessary for you.
Thanks:

Rob

Avatar
Date: 8/11/2020
Reply


Hello,

Thank you for the response. The current one only provides market data, does this connector enable account transactions trading? If so, if you could publish it, I can use the .NET 4.8 version while I work through the course and will then try to finish a dotcore version later when I move to a cloud Linux server for 24/7 strategy execution.

Thanks again!
-Rob
Thanks:


Attach files by dragging & dropping, , or pasting from the clipboard.

loading
clippy